Commit Graph

3 Commits

Author SHA1 Message Date
Michael Vines 80e29ef6b9 Port SPL to solana-program and `cargo build-bpf` 2020-10-24 19:21:38 -07:00
Jon Cinque 13de66817d
token-swap: Improve pool token supply on initialization, deposit, and withdrawal (#508)
* token-swap: Add token supply in invariant calculation

* Refactor state classes into curve components for future use
* Align pool initialization with Uniswap using geometric mean of token
  amounts
* Fix deposit and withdraw instruction to work as a proportion of pool
  tokens
* Add math utilities to calculate the geometric mean with u64

* Improve variable names

* Use a fixed starting pool size

* Run cargo fmt

* Update js tests with new pool numbers

* Run linting

* Remove math

* Fix BN type issues found by flow
2020-09-23 23:08:44 +02:00
Michael Vines 26ab9bb26a Reorganize crates based on program 2020-08-08 15:25:47 -07:00