787 B
787 B
Combine Stable Curve with Stake Pool for price discovery
Implement a curve for token-swap that accepts stake pool account and uses stable curve to swap assets. Stake pool account will be used for initial price discovery then stable curve would be used to derive price based on the size of the order and available reserves.
Links
- Stake pool implementation: https://github.com/solana-labs/solana-program-library/blob/master/stake-pool/program
- AMM implementation: https://github.com/solana-labs/solana-program-library/blob/master/token-swap/program
- Stable curve: https://github.com/solana-labs/solana-program-library/blob/master/token-swap/program/src/curve/stable.rs