https://github.com/CodeHawks-Contests/2025-02-vyper-vested-claims/blob/main/src/Token.vy#L38
def transferFrom(_from: address, _to: address, _value: uint256) -> bool:
self.allowance[_from][msg.sender] -= _value # Potential underflow
self._transfer(_from, _to, _value)
return True
There is no check to ensure _from has enough balance before subtracting
Causes an underflow in Vyper, allowing transfers of more tokens than the _from address owns.
Add a check:
assert self.balanceOf[_from] >= _value, "Insufficient balance"
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.