* 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> |
||
---|---|---|
.. | ||
cli | ||
js | ||
program | ||
README.md |
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.