The transfer
and transferFrom()
function from ERC20 standard emits boolean
as return value which shows a transaction is successful or not. But In the FjordAuction.sol
contract, in many instances the check is missing which may break the protocol's functionality.
The protocol's contracts are expected to used USDT, USDC and DAI. The contracts will be deployed on Any EVM compatible chain which also includes Ethereum mainnet itself. This issue is specifically for tokens like USDT and similar tokens etc on Ethereum mainnet.
The transfer()
and transferFrom()
funciton is used at following instances:
The issue here is with the use of unsafe transfer()
function. The ERC20.transfer()
function return a boolean value indicating success. This parameter needs to be checked for success. Some tokens do not revert if the transfer failed but return false instead.
Some tokens like USDT
don't correctly implement the EIP20 standard and their transfer() function return void instead of a success boolean. Calling these functions with the correct EIP20 function signatures will always revert.
Tokens that don't actually perform the transfer and return false are still counted as a correct transfer and tokens that don't correctly implement the latest EIP20 spec will be unusable in the protocol as they revert the transaction because of the missing return value. This will lead to loss of user funds.
Manual Review
Use OpenZeppelin's SafeERC20 versions with the safeTransfer()
function instead of transfer()
.
For example, consider below changes in FjordAuction.sol
:
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.