solana-program-library/stake-pool
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
..
cli stake-pool: Use checked_ceil_div for withdraw calc (#1482) 2021-03-23 00:33:51 +01:00
program stake-pool: Use checked_ceil_div for withdraw calc (#1482) 2021-03-23 00:33:51 +01:00
README.md Fix broken stake-pool docs link and make readme's consistent (#805) 2020-11-06 09:15:27 +08:00

README.md

stake-pool program

A work-in-progress program for pooling together SOL to be staked by an off-chain agent running SoM (Stake-o-Matic).

Each SoM needs at least one pool. Users deposit stakes into the SoM pool and receives a pool token minus the fee. The SoM redistributes the stakes across the network and tries to maximize censorship resistance and rewards.

Full documentation is available at https://spl.solana.com/stake-pool

Javascript bindings are available in the ./js directory.