Extra msg.value
is never returned back to the user in the tillIn()
function.
In the tillIn()
function:
there is only a check for msg.value < amount
but in case of msg.value > amount
, excess msg.value
is not returned to the caller.
As tillIn()
function is used everywhere to transfer funds from user to capital pool, excess msg.value
will be stuck forever inside the contract and won't be returned to the user.
Manual Analysis
Add a mechanism to return back excess msg.value to the caller in case of msg.value > amount
.
Invalid, these are by default, invalid based on codehawks [general guidelines](https://docs.codehawks.com/hawks-auditors/how-to-determine-a-finding-validity#findings-that-may-be-invalid). The check implemented is simply a sufficiency check, it is users responsibility to only send an appropriate amount of native tokens where amount == msg.value when native token is intended to be used as collateral (which will subsequently be deposited as wrapped token). All excess ETH can be rescued using the `Rescuable.sol` contract. > Users sending ETH/native tokens > If contracts allow users to send tokens acc111identally.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.