solana-program-library/token-swap/program
Jon Cinque d336b8b714
stake-pool: Use checked_ceil_div for withdraw calc (#1482)
* stake-pool: Use checked_ceil_div for withdraw calc

When a stake account is totally removed from a stake pool by the
manager, there's a chance that the operation would not take enough of
the manager's pool tokens by 1 due to truncation.

Do a ceiling division instead, and refactor ceiling division into the
math library.

* Use new function name on CLI

* Cargo fmt
2021-03-23 00:33:51 +01:00
..
fuzz Bump Solana version to 1.6.1 2021-03-18 04:07:16 +00:00
inc Reorganize crates based on program 2020-08-08 15:25:47 -07:00
sim token-swap stable curve: 256-bit math added with tests (#886) 2020-11-25 21:19:25 +01:00
src stake-pool: Use checked_ceil_div for withdraw calc (#1482) 2021-03-23 00:33:51 +01:00
Cargo.toml Bump Solana version to 1.6.1 2021-03-18 04:07:16 +00: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