claim
function: Excess ether did not return to the user
#3
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
duplicate-109
🤖_04_group
AI based duplicate group recommendation
satisfactory
satisfies C4 submission criteria; eligible for awards
sufficient quality report
This report is of sufficient quality
Lines of code
https://github.com/code-423n4/2024-08-phi/blob/main/src/PhiFactory.sol#L264-L304
Vulnerability details
Impact
The
claim
function inPhiFactory
contract is used to claim an art reward. The mint fee is calculated by thegetArtMintFee
function and will be sent tomerkleClaim
orsignatureClaim
:Users are likely to send more ether than the actual fee in order to ensure that they can claim the art. However, the
claim
function did not return the excess ether, which would cause asset loss to the user.Proof of Concept
https://github.com/code-423n4/2024-08-phi/blob/main/src/PhiFactory.sol#L264-L304
Tools Used
Manual Review
Recommended Mitigation Steps
Consider following fix:
Assessed type
ETH-Transfer
The text was updated successfully, but these errors were encountered: