The PerpetualVault
contract supports USDT as a collateral token
but doesn't account for USDT's non-standard approve/transferFrom implementation:
USDT has specific requirements:
Requires allowance to exactly match the transfer amount
Requires setting allowance to 0 before setting a new allowance
Will revert if allowance > transfer amount
This behavior is different from standard ERC20 tokens and can lead to failed deposits.
Causes failed transactions and wasted gas fees
Affects protocol adoption due to USDT being a major stablecoin
Add allowance validation check
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.