solana-program-library/token-swap/program
akamutsu 4915c0910a
Implementation of stable curve methods (#1488)
* WIP: Implementation of the remainder of stablecurve methods

* Edits based on PR feedback

* revert SwapVersion

* PR fixes

* checked add / sub

* reverted to using RoundDirection instead of LiquidityProviderOperaiton

* removed LiquidityProviderOperation enum

* Revert flipped parameters

* initial attempt at noramlized_value

* use d for noramlize value for stable curve

* TradeDirection instead of RoundDirection for trading_tokens_to_pool_tokens

* reimplemented the trading_tokens_to_pool tokens function for stable

* Typo

* fix rounding errors in pool_tokens_to_trading_tokens

* try different values of amplification factor in test for stable curve

* fixed broken tests, use constant_product normalized_value function

* use cubic solver

* fix noramlize_value function bad maths

* redid noramlized value for one last time

* added more proptests

* Get tests to work

* Fixup for prod usage

Co-authored-by: Yutaro Mori <me@yutaromori.com>
Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
2021-05-19 02:44:01 +02:00
..
fuzz Bump solana crates to v1.6.7 2021-05-05 04:39:49 +00:00
inc Reorganize crates based on program 2020-08-08 15:25:47 -07:00
sim Implementation of stable curve methods (#1488) 2021-05-19 02:44:01 +02:00
src Implementation of stable curve methods (#1488) 2021-05-19 02:44:01 +02:00
Cargo.toml Implementation of stable curve methods (#1488) 2021-05-19 02:44:01 +02:00
Xargo.toml Reorganize crates based on program 2020-08-08 15:25:47 -07:00
cbindgen.toml Reorganize crates based on program 2020-08-08 15:25:47 -07:00
program-id.md Update rust stable to 1.49 (and add token swap program id) (#1158) 2021-02-04 14:20:15 +01:00