Refunds are not correctly handled and would be locked in PhiNFT1155.sol contract instances and PhiFactory #78
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
🤖_10_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/8c0985f7a10b231f916a51af5d506dd6b0c54120/src/abstract/Claimable.sol#L22
Vulnerability details
Impact
All refunds for signature/merkle claim calls occurring through the PhiNFT1155.sol contract instances are not sent to the msg.sender but would be permanently locked in the PhiNFT1155.sol contract instances themselves.
The same issue is also present in the PhiFactory.sol contract. When claims are made using the claim() function, the excess would be locked in the PhiFactory contract.
Proof of Concept
Tools Used
Manual Review
Recommended Mitigation Steps
Consider refunding msg.value - mintFee through the claim() function before making a call using the this keyword. For the phiNFT1155.sol contracts, check pre balance and post balance of the contract and refund the difference to the user.
Assessed type
Error
The text was updated successfully, but these errors were encountered: