Some smart contracts accounts could not claim their ERC1155Quest reward #657
Labels
bug
Something isn't working
downgraded by judge
Judge downgraded the risk level of this issue
grade-b
QA (Quality Assurance)
Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax
sponsor acknowledged
Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Lines of code
https://github.com/rabbitholegg/quest-protocol/blob/main/contracts/Erc1155Quest.sol#L42
Vulnerability details
Impact
Some accounts are unable to claim their ERC1155 reward, despite having completed the quest. But this is a medium severity, because it concerns only the smart contracts-based accounts (not EOAs) who did not implement the
onERC1155Received
hook.Proof of Concept
If msg.sender of the
claim
function ofQuest
contract is a smart contract who did not implement aonERC1155Received
hook, then his rewards are stuck in the Quest contract.Recommended Mitigation Steps
Check if
onERC1155Received
hook is implemented in a participant contract before whitelisting him off-chain, for example by callingsupportsInterface(ERC1155HolderID)
and checking that the result is true, on the receiving contract.The text was updated successfully, but these errors were encountered: