-
Notifications
You must be signed in to change notification settings - Fork 0
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
Excess ether received in EntityForging::forgeWithListed
gets locked in the contract
#218
Comments
https://docs.code4rena.com/awarding/judging-criteria/severity-categorization Setting this as QA based on above criteria. |
koolexcrypto marked the issue as grade-c |
This previously downgraded issue has been upgraded by koolexcrypto |
koolexcrypto marked the issue as not a duplicate |
koolexcrypto marked the issue as selected for report |
koolexcrypto marked the issue as not selected for report |
koolexcrypto changed the severity to QA (Quality Assurance) |
koolexcrypto marked the issue as grade-c |
Lines of code
https://github.com/code-423n4/2024-07-traitforge/blob/main/contracts/EntityForging/EntityForging.sol#L126
Vulnerability details
Impact
If a user forges a new entity using the function
EntityForging::forgeWithListed
sending more ether than the specified forging fee, the excess amount gets locked in the contract and there is no way of recovering the funds.Proof of Concept
In the following foundry test a forge is done sending 0.04 more ether than needed, and the funds end up locked in the contract's balance.
Tools Used
Foundry
Recommended Mitigation Steps
Check that
msg.value
equals the forging fee.Assessed type
Payable
The text was updated successfully, but these errors were encountered: