solana-program-library/stake-pool
jon-chuang e9e4d36211
Stake pool/withdrawal fee (#2107)
* stake-pool: Add new fee fields for liquid staking and arbitrage

* incorporate withdrawal fee to withdrawal instruction, refactor calculating fees into Fee method

* update withdraw instruction to take manager fee account, revert divide by 0 edge-case removal

* initialize with withdrawal fee, modify integration tests to incorporate withdrawal fee

* extra safety check, prevent divide by 0

* patch Initialize for other tests

* decrease HUGE_POOL_SIZE to fit compute budget

* set_withdrawal_fee, initialize conditions

* Handle current withdrawal fee = 0 case

* add tests for withdrawal fees

* baseline fee increase is explicit constant

* withdrawal_fee for cli for initialize

* fmt, fix cli

* obey clippy

* clean up cli, add increase from 0 tests.

* add cli: set-withdraw-fee

* apply suggestions for code review

* remove 1_000_000 denom limit

* remove denom limit tests, inline, checked muls

* apply suggestions for code review

* referral fee

* tests: use local copy to calculate_withdrawal_fee instead of fetching from chain

Co-authored-by: Jon Cinque <jon.cinque@gmail.com>
Co-authored-by: dhy1996 <dhy1996@live.com.sg>
2021-07-25 20:08:16 -04:00
..
cli Stake pool/withdrawal fee (#2107) 2021-07-25 20:08:16 -04:00
js stake-pool: Stake pool deserializer (#1656) 2021-06-23 14:18:45 +02:00
program Stake pool/withdrawal fee (#2107) 2021-07-25 20:08:16 -04: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.