Closed Lezek123 closed 7 months ago
Hmm, if this turns out to be correct, what is best fix? blocking AMM perhaps? seems most orderly anyway. please verify @ignazio-bovo , if this turns out to be accurate, we need to have @KubaMikolajczyk review designs and tweak.
I have written a test here: https://github.com/ignazio-bovo/joystream/commit/4c792880b0f0396cea450b8211a56907a6f6ca13 and in this scenario the split participation will throw an error saying that the treasury balance is too low.
and in this scenario the split participation will throw an error saying that the treasury balance is too low.
Ok, thank you for getting on top of this so soon, but should we keep this behaviour? seems more orderly to actually block AMM during splits?
I agree that is why I have opened a PR with the fix already. See #4784
Wow we still shipped this bug 🤦 Fixed in #5127
As I understand in the current runtime implementation of CRT:
activate_amm
orissue_revenue_split
seems to prevent this)token.ensure_can_modify_supply()
is not called insidebuy_on_amm
/sell_on_amm
, even though both those functions affect the token supply)participate_in_split
callThis means that it's possible to claim over 100% of holders' share of a revenue split, ie.:
revenue_split.allocation
)revenue_split.allocation
JOY, even though 100% oftoken.revenue_split.allocation
has already been claimedtoken.revenue_split.allocation
(the amount they can claim is only limited by the balance of CRT module account)