-
Notifications
You must be signed in to change notification settings - Fork 117
CRT: Revenue splits and AMM may be active at the same time, causing unexpected states #4783
Copy link
Copy link
Closed
Labels
bugSomething isn't workingSomething isn't workingcrt-v1project_tokenProject tokensProject tokensruntime
Description
As I understand in the current runtime implementation of CRT:
- Revenue split and AMM can be active at the same time (nothing in either
activate_ammorissue_revenue_splitseems to prevent this) - Users can buy / sell CRT on AMM during an active revenue split (
token.ensure_can_modify_supply()is not called insidebuy_on_amm/sell_on_amm, even though both those functions affect the token supply) - The dividend paid to rev. split participants is calculated based on total supply and paid immediately on
participate_in_splitcall
This means that it's possible to claim over 100% of holders' share of a revenue split, ie.:
- Member A has 100 CRT which is 100% of the current total supply
- Member A stakes all the tokens on the current revenue split, claiming 100% of holders' share (
revenue_split.allocation) - Member B buys 100 CRT on AMM and stakes them on the same split
- Member B claims 50% of
revenue_split.allocationJOY, even though 100% oftoken.revenue_split.allocationhas already been claimed - Members A and B together have claimed 150% of
token.revenue_split.allocation(the amount they can claim is only limited by the balance of CRT module account)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcrt-v1project_tokenProject tokensProject tokensruntime