If A User Mistakenly Provides Too Much Ether To The passThruGate()
Function, This Additional Amount Will Be Forever Locked Within The Contract
#240
Labels
3 (High Risk)
Assets can be stolen/lost/compromised directly
bug
Something isn't working
duplicate
This issue or pull request already exists
Lines of code
https://github.com/code-423n4/2022-05-factorydao/blob/main/contracts/FixedPricePassThruGate.sol#L46-L56
Vulnerability details
Impact
The
passThruGate()
function acts as a proxy function to the beneficiary address by attaching Ether to the call. If an excess of Ether is provided to the call, onlygate.ethCost
will be sent to the beneficiary. Excess Ether will be forever be locked in the contract as there is no way to have it refunded to the caller.Recommended Mitigation Steps
Consider enforcing that
msg.value == gate.ethCost
such that users can not provide an excess of Ether.The text was updated successfully, but these errors were encountered: