Owner of the contract cannot register USDT
token on ETH mainnet.
As we can see protocol need to support all tokens that Aave V3 supports, mainly USDT
and USDC
:
Any ERC20 token supported by Aave V3, but mainly stablecoins like USDC, USDT are expected to be used for DIVA Donate.
and contracts will be deployed on:
Ethereum Mainnet
Polygon
Arbitrum One
Gnosis Chain
Ethereum Sepolia (Testnet)
The owner of the contract have to call registerCollateralToken()
function to register token. then this function will call _registerCollateralToken()
in AaveDIVAWrapperCore
, then this function approves max amount of collateral token to the Aave V3 pool:
The issue is above call will be revert on ETH mainnet for USDT
token.
DOS of registerCollateralToken()
function for USDT
token in ETH mainnet.
install foundry for hardhat with pnpm
pnpm add --save-dev @nomicfoundation/hardhat-foundry
run test with: forge test --fork-url ``ETH-MAINNET-RPC`` --mt test_poc
as we can see test will revert:
Manual Review
Consider using forceApprove()
of OpenZeppelin.
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.