-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User receives proportional reward for burning contrary to docs #228
Comments
minhquanym marked the issue as duplicate of #241 |
MarioPoneder marked the issue as not a duplicate |
MarioPoneder marked the issue as duplicate of #9 |
MarioPoneder marked the issue as satisfactory |
This is not a duplicate of #9 and it is invalid. When fees are accrued the burner has not yet received his token on which to accrue rewards, so it all goes to previous holders. |
Agree with above statement |
Thank you for your comments! This was indeed duplicated too quickly and I admit to have overlooked it since the |
MarioPoneder marked the issue as not a duplicate |
MarioPoneder marked the issue as unsatisfactory: |
Lines of code
https://github.com/code-423n4/2023-11-canto/blob/335930cd53cf9a137504a57f1215be52c6d67cb3/1155tech-contracts/src/Market.sol#L230-L233
Vulnerability details
Impact
Comment in code states that user doesn't receive reward for his own burn, similar to buying.
However actually he does receive claimable fees for this burn. As a result, actual fee paid for burn is less, because user receives part of it in return.
Proof of Concept
Here you can see incorrect order of operations: it firstly increases
shareData[_id].shareHolderRewardsPerTokenScaled
by fees, then calculates user's rewardsBut must firstly calculate user's rewards, and only after split fees
Tools Used
Manual Review
Recommended Mitigation Steps
Assessed type
Other
The text was updated successfully, but these errors were encountered: