Skip to content
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

Some smart contracts accounts could not claim their ERC1155Quest reward #657

Closed
code423n4 opened this issue Jan 30, 2023 · 3 comments
Closed
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

Comments

@code423n4
Copy link
Contributor

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 of Quest contract is a smart contract who did not implement a onERC1155Received 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 calling supportsInterface(ERC1155HolderID)and checking that the result is true, on the receiving contract.

@code423n4 code423n4 added 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 labels Jan 30, 2023
code423n4 added a commit that referenced this issue Jan 30, 2023
@c4-judge c4-judge added downgraded by judge Judge downgraded the risk level of this issue QA (Quality Assurance) Assets are not at risk. State handling, function incorrect as to spec, issues with clarity, syntax and removed 2 (Med Risk) Assets not at direct risk, but function/availability of the protocol could be impacted or leak value labels Feb 6, 2023
@c4-judge
Copy link
Contributor

c4-judge commented Feb 6, 2023

kirk-baird changed the severity to QA (Quality Assurance)

@c4-sponsor c4-sponsor added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label Feb 7, 2023
@c4-sponsor
Copy link

waynehoover marked the issue as sponsor acknowledged

@c4-judge
Copy link
Contributor

kirk-baird marked the issue as grade-b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants