Judge has assessed an item in Issue #285 as High risk. The relevant finding follows:
1. Excess ether sent to FixedPricePassThruGate is lost (low)
passThruGate() redirects to a beneficiary only gate.ethCost, requiring that msg.value >= gate.ethCost. As there are no other ways to access native tokens held by this contract, the cumulative excess value, a sum of msg.value - gate.ethCost, will be permanently frozen within the contract.
Judge has assessed an item in Issue #285 as High risk. The relevant finding follows:
1. Excess ether sent to FixedPricePassThruGate is lost (low)
passThruGate() redirects to a
beneficiary
onlygate.ethCost
, requiring thatmsg.value >= gate.ethCost
. As there are no other ways to access native tokens held by this contract, the cumulative excess value, a sum ofmsg.value - gate.ethCost
, will be permanently frozen within the contract.Proof of Concept
Only
gate.ethCost
is now forwarded:https://github.com/code-423n4/2022-05-factorydao/blob/db415804c06143d8af6880bc4cda7222e5463c0e/contracts/FixedPricePassThruGate.sol#L53-L53
Recommended Mitigation Steps
Pass-though the whole msg.value as the excess is not used: