Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•12 views

VaultCore's withdrawETH uses transfer function, which can be unusable for some smart contracts

Lines of code Vulnerability details Impact When a user wishes to withdraw their collateral from a WETH vault, the funds are returned to the user with msg.sender.transfer. Using transfer is not recommended anymore, especially for critical operations like withdrawing collateral from a vault as it...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•11 views

Unchecked low level calls

Lines of code Vulnerability details Impact The contracts use low level Solidity .call without checking the success value. While these calls should never fail when the contract addresses are correct, we still recommend checking the success return value of these low-level calls. Note: All MIMO and...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•17 views

Non-standard ERC20 Tokens are Not Supported

Lines of code Vulnerability details When trying to call SuperVault.executeOperation the transaction reverts. This is because the call to asset.approve in line97 doesn't match the expected function signature of approve on the target contract like in the case of USDT. This issue exists in any call ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•7 views

Missing approve(0)

Lines of code Vulnerability details Impact Some tokens, like USDT see requirement line 199, require first reducing the address allowance to 0 by calling approvespender, 0 and then approve the actual allowance. When using one of these unsupported tokens, all transactions revert and the protocol...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•15 views

Users can use updateBoost function to claim unfairly large rewards from liquidity mining contracts for themselves at cost of other users.

Lines of code Vulnerability details Impact Users aware of this vulnerability could effectively steal a portion of liquidity mining rewards from honest users. Affected contracts are: SupplyMinerV2, DemandMinerV2, PARMinerV2 VotingMinerV2 is less affected because locking veMIMO in votingEscrow...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•12 views

Missing 0 approval

Lines of code Vulnerability details Impact When changing the allowance value from an existing non-zero value, certain tokens e.g., USDT must first be approved by zero before approving the actual allowance. Otherwise the token will not work. Proof of Concept There are two instances of missing zero...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•11 views

SuperVault's leverageSwap and emptyVaultOperation can become stuck

Lines of code Vulnerability details leverageSwap and emptyVaultOperation can be run repeatedly for the same tokens. If these tokens happen to be an ERC20 that do not allow for approval of positive amount when allowance already positive, both functions can become stuck. In both cases logic doesn't...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•5 views

Missing Validations In Chainlink's latestRoundData Function

Lines of code Vulnerability details Impact Here, latestRoundData is missing an additional validation to ensure that the round is complete. Proof of Concept core/contracts/inception/priceFeed/ChainlinkInceptionPriceFeed.sol:74: , int256 eurAnswer, , uint256 eurUpdatedAt, = eurOracle.latestRoundDat...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•6 views

SuperVault's aggregatorSwap doesn't check router call success, proceeding anyway

Lines of code Vulnerability details aggregatorSwap will not revert if router.call wasn't successful, leading to malfunctions of the emptyVaultOperation, rebalanceOperation and leverageSwap where it is used. Call failure can freeze the funds and make allowances unused which can make future approva...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•14 views

ERC20 tokens with no return value will fail to transfer

Lines of code Vulnerability details Although the ERC20 standard suggests that a transfer should return true on success, many tokens are non-compliant in this regard including high profile, like USDT . In that case, the .transfer call here will revert even if the transfer is successful, because...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•10 views

Usage of deprecated transfer to send ETH in VaultsCore.sol

Lines of code Vulnerability details Impact Smart contract is not robust as it depends on gas cost so it can fail in some circumstances. PoC The usage of transfer to send ETH is widely considered a bad practice as it limits the gas usage to 2300. msg.sender.transferamount; @Audit deprecated transf...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•14 views

Impossible to liquidate small amounts

Lines of code Vulnerability details Impact It might not be possible to liqudate small positions depending on the liquidateCallerReward. Function liquidate in PARMinerV2 first transfers liquidateCallerReward to the liquidator and then expects that the remaining par balance is greater than it was...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•10 views

ChainlinkInceptionPriceFeed can report stale price

Lines of code Vulnerability details As stale price is determined by time since last timestamp, the price that is most recent, but wasn't updated for more than PRICEORACLESTALETHRESHOLD say there were no trades on the market will be rejected, which makes system unavailable in such a case. This can...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•15 views

User can call liquidate() and steal all collateral due to arbitrary router call

Lines of code Vulnerability details Impact A malicious user is able to steal all collateral of an unhealthy position in PARMinerV2.sol. The code for the liquidate function is written so that the following steps are followed: User calls PARMinerV2.liquidate PARMinerV2 performs the liquidation with...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•16 views

GUniLPOracle can provide stale prices

Lines of code Vulnerability details As stale price is determined by assetUpdatedAt, which is the time since last timestamp, the price that is most recent, but wasn't updated for more than threshold, will be rejected, which makes system unavailable in such a case. In the same time real stale price...

6.5AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•10 views

Reentrancy Bugs in GenericMinerV2

Lines of code Vulnerability details Impact No ETH reentrancy decreaseStake: makes external call releaseRewards and updates the state variables afterwards totalStake, updateBoost increaseStake: makes call to releaseRewards and updates state variables afterwards totalStake, updateBoost Recommended...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•8 views

Missing Validations In Chainlink's latestRoundData Function

Lines of code Vulnerability details Impact Here, latestRoundData is missing an additional validation to ensure that the round is complete. Proof of Concept Affected code: core/contracts/inception/priceFeed/ChainlinkInceptionPriceFeed.sol:74: , int256 eurAnswer, , uint256 eurUpdatedAt, =...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•8 views

Chainlink's latestRoundData might return stale or incorrect results

Lines of code Vulnerability details Impact Chainlink's latestRoundData is used but there is no check if the return value indicates stale data. This could lead to stale prices according to the Chainlink documentation: Proof of Concept...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•12 views

PARMinerV2's liquidate can become stuck

Lines of code Vulnerability details PARMinerV2's liquidate can be run repeatedly for the same collateralToken with different arguments. For example, different Vaults can have the same token, so there can be unrelated runs with different vaultId / DEX data, but the same collateralToken and proxy. ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•9 views

Fund theft In PARMinerV2 with depositing in VotingEscrow and calling updateBoost() to update user.stakeWithBoost without updating accAmountPerShare and accParAmountPerShare. and then collecting more rewards

Lines of code Vulnerability details Impact Attacker can generate more PAR and MIMO reward for himself and steal others rewards by staking in VotingEscrow then calling updateBoost which updates user.stakeWithBoost based on user boost multiplier which is based on user VotingEscrow balance without...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•10 views

In GenericMinerV2 get more reward by staking in votingEscrow and calling syncStake()

Lines of code Vulnerability details Impact User can withdraw & deposit in votingEscrow contract and then call syncStake function of VotingMinerV2 to update his stake and stakeWithBoost with his new balance, and then he can call releaseRewards to get more reward than he spoused to. Proof of Concep...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:0 a.m.•7 views

withdrawETH might fail if msg.sender is a smart contract.

Lines of code VaultsCore.solL230 Vulnerability details Impact Vault owner might not be able to successfully call withdrawETH and withdraw collateral if said owner is a smart contract. Proof of Concept Native transfer used in withdrawEth has a hard coded 2300 gas limit that can fail if the vault...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•12 views

[WP-H1] A malicious early user/attacker can manipulate the vault's pricePerShare to take an unfair share of future users' deposits

Lines of code Vulnerability details This is a well-known attack vector for new contracts that utilize pricePerShare for accounting. / @notice Calculates the number of shares that should be minted or burnt when a user deposit or withdraw. @param tokens Amount of asset tokens @return Number of...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•13 views

Calculation without check may result in tiny loss of user funds

Lines of code Vulnerability details Impact Calculation without the bigger than zero check may result in loss of user funds, albeit in tiny amounts as of now. Proof of Concept In this line of redeemToken shares to burn is calculated through tokenToShares method . As there is no check that checks i...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•10 views

An attacker can make users' funds get "locked" in the contract (the owner can get them out and transfer them back to the users)

Lines of code Vulnerability details Impact If a user manages to be the first user to deposit into the contract, he will be minted shares and he can steal all the other users' deposits. Proof of Concept 1. The attacker deposits 1 token into the contract and 1 share is minted to him totalSupply and...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•9 views

Missing support for ERC20 with fee

Lines of code Vulnerability details Impact Contract AaveV3YieldSource allows depositing tokens via supplyTokenTo function. Amount of tokens to transfer is based on passed argument depositAmount and is missing support for tokens with built-in fees. One of the popular tokens that implements such a...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•7 views

Lender can unconditionally liquidate borrower by changing oracle

Lines of code Vulnerability details Impact In NFTPairWithOracle.updateLoanParams, a lender is allowed change the oracle. If the lender set it some oracle that return invalid price, he can call removeCollateral immediately to liquidate the borrower. Proof of Concept function updateLoanParamsuint25...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•7 views

Owner can steal rewards

Lines of code Vulnerability details Impact Users may not get their AAVE rewards Proof of Concept The claimRewards function allows the owner to send any rewards distributed by AAVE to any address. The rewards are being earned using user's funds but they aren't returned back to users and the owner...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•11 views

Owner or Managers can rug Aave rewards

Lines of code Vulnerability details Impact A malicious owner or manager can steal all Aave rewards that are meant for PoolTogether users Even if the user is benevolent the fact that there is a rug vector available may negatively impact the protocol's reputation. Proof of Concept File:...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•10 views

Initial supplyTokenTo() with _depositAmount=1 wei causes expensive share price

Lines of code Vulnerability details Impact The first depositor into the yield source is able to maliciously manipulate the share price by depositing the lowest possible amount 1 wei and then artificially blowing up the token balance. Following depositors will have to supply a larger amount of...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•6 views

Skim Accidental Transfer of Collateral

Lines of code Vulnerability details Issue: removeCollateral function does not perform any address checks if the loan status = LOANINITIAL. Consequences: If anyone sends an NFT to the contract by itself, for whatever reason, an attacker can snatch it with removeCollateral. Proof of Concept Someone...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•8 views

No success required for Oracle market rate queries

Lines of code Vulnerability details Impact The system can use stale or even plainly incorrect due to any technical malfunction price for decision making. For example, a malicious lender can setup a bot that tracks incorrect readings i.e. track the state of the Oracle used and act on observing...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•9 views

Yield source does not correctly calculate share conversions

Lines of code Vulnerability details The aTokens’ value is pegged to the value of the corresponding supplied asset at a 1:1 ratio and can be safely stored, transferred or traded. All yield collected by the aTokens' reserves are distributed to aToken holders directly by continuously increasing thei...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•13 views

[WP-M1] supplyTokenTo() may fail when Aave Pool address changed

Lines of code Vulnerability details function supplyTokenTouint256 depositAmount, address to external override nonReentrant uint256 shares = tokenToSharesdepositAmount; requireshares 0, "AaveV3YS/shares-gt-zero"; address underlyingAssetAddress = tokenAddress;...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•8 views

Reentrancy in removeCollateral() / requestLoan()

Lines of code Vulnerability details Impact There is a potential reentrancy bug they may exist between requestLoan and removeCollateral that allows a user to have requested a loan while maintaining ownership of the collateral. This bug is present in both NFTPair and NFTPairWithOracle. The reentran...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•14 views

Inconsistent balance when supplying fee-on transfer tokens

Lines of code Vulnerability details Impact There are ERC20 tokens that may make certain customizations to their ERC20 contracts. One type of these tokens is deflationary tokens that charge a certain fee for every transfer or transferFrom. Proof of Concept AaveV3YieldSource.solL237 Tools Used Manu...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•11 views

NFT oracle price request successful or not is not checked

Lines of code Vulnerability details Impact Loan can be destroyed because of no price reported by oracle. or any other reason that makes oracle "work as expected" in bad situations when the get function return success=false Proof of Concept According to the interface of INFTOracle, the first...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•13 views

Loss Of Collateral Via Illegitimate Liquidation

Lines of code Vulnerability details Issue: updateLoanParams allows the lender to change the terms of an in-progress loan to lower ltvBPS. removeCollateral calculates whether liquidation is allowed via requirerate.mulloanParams.ltvBPS / BPS amount, "NFT is still valued";. A low or 0 ltvBPS...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•11 views

Users Who approve() ERC20 Tokens for NFTPair of NFTPairWithOracle Contracts May Have Their Allowances Stole By Any User

Lines of code Vulnerability details Impact User's who approve ERC20 or any other token type excluding the collateral token may have their balances stolen by any user. The ACTIONCALL allows users to call any function on any smart contract excluding this, collateral and bentoBox. Thus, if any user...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•13 views

Oracle failure allows NFT to be stolen

Lines of code Vulnerability details Impact Any temporary failure in an oracle relaying a price allows the NFT collateral to be removed by the lender, even if the value of the NFT is still far above the agreed-upon liquidation value. Considering that oracle price retrieval failure is accounted for...

6.5AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•9 views

Owner of the PoolAddressesProviderRegistry Contract Can Update the Pool Address and Effectively Lock Deposited Funds by Preventing All Withdrawals

Lines of code Vulnerability details Impact The owner of the PoolAddressesProviderRegistry contract is able to register and unregister providers as they see fit. Because AaveV3YieldSource.sol dynamically queries the Aave pool through this contract, it is possible for the owner of this Aave contrac...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•8 views

Loss of Collateral Via Malicious Oracle

Lines of code Vulnerability details Issue: The oracle can be arbitrarily updated at any point in time by the lender. Consequences: A lender can inject a malicious oracle at any time and steal the collateral NFT at the cost of his loaned tokens. Proof of Concept Borrower requests loan with an hone...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•6 views

Avoidance of Liquidation Via Malicious Oracle

Lines of code Vulnerability details Issue: Arbitrary oracles are permitted on construction of loans, and there is no check that the lender agrees to the used oracle. Consequences: A borrower who requests a loan with a malicious oracle can avoid legitimate liquidation. Proof of Concept Borrower...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•5 views

Lender can unconditionally liquidate borrower by changing ltvBPS to 0

Lines of code Vulnerability details Impact In NFTPairWithOracle.updateLoanParams, a lender is allowed to decrease ltvBPS. If the lender set it to 0, he can call removeCollateral immediately to liquidate the borrower. Proof of Concept function updateLoanParamsuint256 tokenId, TokenLoanParams memor...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•8 views

An attacker can make users' funds get "locked" in the contract (the owner can get them out and transfer them back to the users)

Lines of code Vulnerability details Impact If a user manages to be the first user to deposit into the contract, he will be minted shares and he can steal all the other users' deposits. Proof of Concept 1. The attacker deposits 1 token into the contract and 1 share is minted to him totalSupply and...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•7 views

Possible to steal collateral during a reentrant collateral transfer

Lines of code Vulnerability details Impact In NFTPair.sol218 an ERC-721 transfer occurs. Anyone who gains execution during this transfer after the owner of the token is changed can steal the token transferred. Note that it will be applicable only if !skim. Since the exploit makes assumptions abou...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•9 views

Yield source cannot deposit fee-on-transfer tokens

Lines of code Vulnerability details Some ERC20 tokens, such as USDT, allow for charging a fee any time transfer or transferFrom is called. If a contract does not allow for amounts to change after transfers, subsequent transfer operations based on the original amount will revert due to the contrac...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•8 views

Fee-on-transfer tokens will mess up the internal accounting of the contract

Lines of code Vulnerability details Impact If the underlying token is a fee-on-transfer token, the amount of tokens that will be transferred to the contract isn't equal to the amount the supplyTokenTo tries to supply to the aave protocol, so the function will revert because the contract won't hav...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•7 views

claimRewards() may have a rug risk.

Lines of code Vulnerability details Impact Although claimRewards is supposed to be called by the owner or managers to claim the rewards, it still could be a "rug risk". The owner or managers can take all the rewards unconditionally. Proof of Concept function claimRewardsaddress to external...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/01 12:0 a.m.•5 views

Params.oracle can be changed to a fake one by front running NFTPairWithOracle's lend function

Lines of code Vulnerability details Impact As neither lend, nor updateLoanParams functions verify params.oracle, the lend call can be front run by a malicious borrower with changing params.oracle to a non-market one. The front run will be an updateLoanParams call where borrower introduces fake...

6.6AI score
SaveExploits0
Total number of security vulnerabilities10190