Quest owner can withdraw the reward for unclaimed receipt. #632
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
duplicate-528
satisfactory
satisfies C4 submission criteria; eligible for awards
Lines of code
https://github.com/rabbitholegg/quest-protocol/blob/8c4c1f71221570b14a0479c216583342bd652d8d/contracts/Erc1155Quest.sol#L54-L63
Vulnerability details
Impact
Erc1155Quest.withdrawRemainingTokens()
will withdraw all tokens even if there are users who minted a receipt but didn't claimed their rewards beforeendTime
Proof of Concept
start
functionreceipts
but don't claim them.Erc1155Quest.withdrawRemainingTokens
, withdrawing all rewards (rewards who are entitled to receipts owners)This can happen without a malicious whitelisted account.
Tools Used
Manual review
Recommended Mitigation Steps
Consider the minted receipt number when withdrawing remaining rewards, similar to how it's done for Erc20Quest.
The text was updated successfully, but these errors were encountered: