feat: implement Suilend take rate from mint & redeem fees #24
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
The goal of this PR is to allow Suilend to keep a % of the mint & redeem fees that go to the liquid staking token (LST)'s creator.
Initially this will be drafted as a 50% take rate. However, Suilend may want to reduce their take rate for large players to incentivize them to keep using SpringSui.
The take rate % should be set to 50% by default. This should not be not changeable by the LST creator, only by the deployer of the smart contract (Suilend team).
Implementation
suilend_feesfield toLiquidStakingInfo, containing the balance of mint & redeem fees collectable by the Suilend teamcollect_suilend_fees(only callable by Suilend team / deployer of smart contract)suilend_take_rate_bpstoFeeConfigsuilend_take_rate_bpsto view take rate %set_suilend_take_rate_bps(only callable by Suilend team / deployer of smart contract)