Some safety guards that would allow users to lose their funds when depositing collateral are missing, which can result in double-spending.
Users can pay with either an ERC20 token or with native token. In most DeFi projects, there are checks to ensure that in the former case, the user shouldn't provide also the equivalent native amount, but this check is missing in Tadle:
This can result in the user double spending (by spending both ETH and the ERC20 amount).
Impact: Medium (Loss of user funds, but they can be manually rescued by the admin)
Likelihood: Low (User has to provide both the token and the native token at the same time)
Risk: Medium
Manual Review
In TokenManager
, ensure that msg.value
is zero when depositing an ERC20:
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.