Some tokens (e.g. USDT
, KNC
) do not allow approving an amount M > 0
when an existing amount N > 0
is already approved.
The approve()
function of CapitalPool.sol
:
This function directly approves to type(uint256).max
without approving to 0
first.
Tadle is supposed to be compatible with all the tokens that follow the ERC20 standard but the approve()
function of CapitalPool.sol
is not compatible with all the tokens like USDT
, KNC
and revert.
For more reference: https://github.com/d-xo/weird-erc20?tab=readme-ov-file#approval-race-protections
Manual Analysis
Modify the approve()
function to approve to 0
first and then approve to type(uint256).max
.
I believe this is invalid, - For weird ERC20s with front-running approval protection such as UDST (only known instance so far), max approval is likely only required to be invoked once, considering the supply cap of such tokens. (USDT supply is at 53.8 billion (53.8e9 * 1e9, so this is 100% sufficient) - If approvals are insufficient, a new proxy for tadle market can always be deployed via the TadleFactory contract and migrated
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.