123 matches found
IERC20.transfer does not support all ERC20 token
Lines of code Vulnerability details Impact Proof of Concept Token like USDT known for using non-standard ERC20. Missing return boolean on transfer. Contract function handleDeposit will always revert when try to transferfrom this kind of tokens. Tools Used manual review Recommended Mitigation Step...
Solmate saftransfer and safetransferfrom does not check the codesize of the token address, which may lead to fund loss
Lines of code Vulnerability details In PirexGmx.sol and ERC4626Vault.sol, the contract uses the solmate library which does not check the existence of code at the token address. This is a known issue when using solmate's libraries. Reference: Impact Possible loss of funds and miscalculation. Proof...
ERC20 return values not checked
Lines of code Vulnerability details Impact 'token' is a ERC20 from LPToken.sol The ERC20.transfer and ERC20.transferFrom functions 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...
Tokens transfers do not verify that the tokens were successfully transferred
Lines of code Vulnerability details Impact Some tokens like zrx do not revert the transaction when the transfer/transferfrom fails and return false instead, which requires us to check the return value after calling the transfer/transferfrom function. Even though, the exchange seems to only suppor...
Solmate's safeTransfer function does not check the existence of the contract
Lines of code Vulnerability details Impact Miscalculation of transferred funds and finally, loss of funds Proof of Concept Solmate's safeTransfer and safeTransferFrom functions do not check the ext code size of the address of the recipient and so, it may lead to a miscalculation of funds as it...
PA1D._payoutTokens() won't work for USDT and other inconsistent ERC20 tokens.
Lines of code Vulnerability details Impact Some ERC20 tokens USDT, BNB, OMG do not return a boolean on succesful transfer. Checking the returned value of transfer for these tokens will always fail. Proof of Concept Usage of ERC20 interface and require statement in PA1D.sol. Recommended Mitigation...
_payoutToken[s]() is not compatible with tokens with missing return value
Lines of code Vulnerability details Impact Payout is blocked and tokens are stuck in contract. Proof of Concept PA1D.payoutToken and PA1D.payoutTokens call ERC20.transfer in a require-statement to send tokens to a list of payout recipients. Some tokens do not return a bool e.g. USDT, BNB, OMG on...
USE SAFEERC20 (SAFEAPPROVE/SAFEMINT/SAFETRANSFERFROM) INSTEAD OF APPROVE/MINT/TRANSFER FROM
Lines of code Vulnerability details Impact The classic openzepplin implementation of the ERC20 standard ie. functions : Approve, Transfer, TransferFrom and mint does not capture the fact that some ERC20 token do not return a boolean value eg. BNB, USDT, OMG. As results, these functions won't work...
No check transferFrom() return value
Lines of code Vulnerability details Impact The smart contract doesn’t check the return value of token.transferFrom, some erc20 token might not revert in case of error but return false. Proof of Concept as seen in several contests, for ex: Tools Used Visual inspection Recommended Mitigation Steps...
Ignores return value from L1GraphTokenGateway.outboundTransfer
Lines of code Vulnerability details Impact Not tracking values returned by token transfer from. So from was getted from parseOutboundData, and if encoded data is wrong, this can return not expected from address. Then from will passed into transferFrom and it not approve for escrow or allowance is...
The L1GraphTokenGateway does not work on non-standard compliant tokens like USDT
Lines of code Vulnerability details Vulnerability details The L1GraphTokenGateway function uses the standard IERC20 function for the transfer call and proceeds with a checkReturnCode function to handle non-standard compliant tokens that don't return a return value. However, this does not work as...
use safeERC20
Lines of code Vulnerability details Impact Some tokens contracts like USDT don't comply with the erc20 standard, the transfer doesn't return a boolean. Proof of Concept Tools Used Recommended Mitigation Steps Use the safeErc20 library from OpenZeppelin. --- The text was updated successfully, but...
Use safetransfer/safetransferFrom instead of transfer/transferFrom in ERC20
Lines of code Vulnerability details Impact Its a good to checks the return value of token transfer using safetransfer or safetransferFrom on Openzeppelin to ensure the token revert when transfer failure. Failure to do so will cause silent failures of transfer and affect token accountng in contrac...
Return value of transferFrom() does not check
Lines of code Vulnerability details Impact Return value of transferFrom inside deposit function does not checked: function deposituint256 id, uint256 assets, address receiver public override marketExistsid epochHasNotStartedid nonReentrant returns uint256 shares // Check for rounding error since ...
Missing Transfer Verification
Lines of code Vulnerability details Impact The ERC20 standard token implementation functions return the transaction status as a boolean. It is a good practice to check for the return status of the function call to ensure that the transaction was executed successfully. It is the developer's...
transferFrom() failure in _safeTransferFrom() could drain the pair
Lines of code Vulnerability details Impact For some tokens, tokenCon.transferFrom could fail and return false but not revert. Some malicious user can abuse it the addLiquidity/addLiquidityCANTO function to perform failure transferFrom but still get the liquidity, and later remove liquidity to dra...
ERC20 return value not checked and not compatible with tokens like USDT, OMG, etc
Lines of code Vulnerability details ERC20 return value not checked and not compatible with tokens like USDT, OMG, etc Detail The ERC20.transfer and ERC20.transferFrom functions return a boolean value indicating success. This parameter needs to be checked for success. Furthermore, some tokens like...
TRSRY.sol is susceptible to ERC20 approve functionality front-running exploit
Lines of code Vulnerability details Proof of concept The problem is perfectly described here The tldr; is that if you approved a person to spend 100 tokens and then you want to decrease his allowance to 50, if he spends his 100 tokens allowance before you set his allowance to 50 he will be able t...
Not calling approve(0) before setting a new approval might cause reverts when used with Tether (USDT)
Lines of code Vulnerability details Impact Some tokens do not implement the ERC20 standard properly but are still accepted by most code that accepts ERC20 tokens. For example Tether USDT's approve function will revert if the current approval is not zero, to protect against front-running changes o...
ERC20.approve can be error prone. It is known issue. ERC20.sol could not be safe.
Lines of code Vulnerability details Impact ERC20 - approve is not safe. Proof of Concept For approve, the entire contract depend on ERC20.approve assetContract.approveswapperAddress, borrowAmount; collateralContract.approveswapperAddress, collateralToSwap; Refer following articles for this issue...