Submitted by nnez, also found by Bauchibred, 0x3b, p0wd3r, samuraii77, FastChecker, 0xHash, pep7siup, broccolirob, and dontonka
ETH being permanently locked in the contract under certain situations.
The forgeWithListed function contains a vulnerability in the fee checking mechanism. The line that checks the forging fee allows users to send more ETH than the required amount. Normally, users would want to send the exact amount of the forging fee to avoid overpayment. However, if the forging fee is somehow reduced between the time a user initiates a transaction and when its executed, the excess ETH becomes permanently locked in the contract.
See: EntityForging.sol#L102-L175:
The >= check in the require statement allows for overpayment, but the contract only distributes the exact forgingFee amount, leaving excess ETH locked in the contract.
Here is an example of a scenario that could get the fund stuck from allowing overpayment:
The severity is set to Medium because:
There are two available options:
The following test demonstrates that an overpayment is allowed, and excess amount get stuck in the contract. Combining with the detailed scenario above, it should prove the claimed impact.
Koolex (judge) decreased severity to Low
nnez (warden) commented:
Koolex (judge) increased severity to Medium
