Dust native tokens may exist in TokenManager
.
When users interact with functions that call tokenManager.tillIn{value: msg.value}(...amount...), any excess ETH sent (when msg.value > _amount) remains in the contract.
Take PreMarktes.listOffer
as an example, the tillIn
function invoked as follows:
The transferAmount
is calculated with getDepositAmount
, msg.value
may larger than transferAmount
since it depends on input, as a result, dust native tokens left.
Dust native tokens accumulated in the TokenManager
Manual
Adding refund mechanism or only allows msg.value == _amount
Note: corresponding logic like non-reentrant should be considered while refunding.
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.