Commit Graph

3 Commits

Author SHA1 Message Date
Jon Cinque de8433e815
ci: Split out test-bpf into separate workflows for each program (#1893)
* ci: Split token, token-swap, and token-lending out

* Remove token lending js in main runner

* token-swap: Update proptest to trigger build

* Remove unused Cargo.lock file

* lending: Update proptest to trigger lending build

* Fix lending test

* Try re-using action

* binary-oracle-pair: Bump token version to trigger build

* Reference action differently

* Add checkout step before local action

* Move out cargo test bpf step

* Add more programs

* Update example file to trigger job

* Update library file to trigger build

* Update name-service file to trigger build

* Update record file to trigger build

* Update shared memory file to trigger build

* Add pull request runners for each probram / library

* Fix pull-request yml file referencing unknown step
2021-06-11 22:35:00 +02:00
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
Yuriy Savchenko a0d0ae63ca
token-swap stable curve: 256-bit math added with tests (#886)
* Stable curve math rewritten to 256-bit, reference simulation added with test integration

* Formatting error fixed

* Clippy warnings fixed

* Fixed dependencies to remove crates not supportinf bpf

* Fixed indentations

* Fixed lint errors

* Fixed format warnings

* Fixing clippy lint errors

* U256 math and simulation library refactoring, checked math used everywhere, other small fixes

* Fixed conversion to optional u128
2020-11-25 21:19:25 +01:00