Lucene search
+L
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
added 2022/05/30 12:00 a.m.20 views

In gauge, checkpoint.voted is incorrectly copied from previous checkpoint (always false in new checkpoint)

Lines of code Vulnerability details Impact When a user interacts with a gauge and a new balance checkpoint is created in storage of this gauge, then checkpoint.voted for this new checkpoint is always false. Unless users are aware of this bug and call voter.poke after each interaction with the gau...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/28 12:00 a.m.20 views

Reserve ratio isn't enforced after a trade execution

Lines of code Vulnerability details impact Users could get exposed to higher risk than desired and funds to withdraw from the vault could not be available Proof of Concept The reserve ratio is the parameter that ensures a percentage of the tokens is always available to be withdrawn from a pool by...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/21 12:00 a.m.20 views

ConvexMasterChef: When _lpToken is cvx, reward calculation is incorrect

Lines of code Vulnerability details Impact In the ConvexMasterChef contract, a new staking pool can be added using the add function. The staking token for the new pool is defined using the lpToken variable. However, there is no additional checking whether the lpToken is the same as the reward tok...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/15 12:00 a.m.20 views

Unchecked call in _withdrawFromYieldPool

Lines of code GeneralVault.solL100-L128 LidoVault.solL122-L149 Vulnerability details Impact In the withdrawFromYieldPool function in LidoVault.sol, the receivedETHAmount value is returned before the sent value for the call function is checked on line 142. When withdrawCollateral is called in...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/15 12:00 a.m.20 views

Title: Yield can be unfairly divided because of MEV/Just-in-time stablecoin deposits

Lines of code Vulnerability details Impact An attacker can use MEV via gas auction or Flashbots or control of miners to cause an unfair division of yield. By providing a very large relative to the size of all other stablecoin deposits combined stablecoin deposit Just-in-Time before an admin's cal...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/14 12:00 a.m.20 views

Loss of funds due to beneficiary override to address(0) during transfer

Lines of code Vulnerability details Premiums or proceeds earned after the transfer will accrue to the zero address, instead of to the new vault owner, and the funds will be irrecoverable. Proof of concept vaultBeneficiariesvaultId is overridden to the zero address during transfer: File: Cally.sol...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/12 12:00 a.m.20 views

Malicious ERC20 or ERC777 could be used as collateral

Lines of code Cally.solL296 Vulnerability details Impact A malicious ERC20 or ERC777 could be used as collateral and rug the exerciser on exercise through a malicious implementation of ERC20vault.token.safeTransfer. Proof of Concept Any ERC20/ERC777 token is accepted as there is no whitelist. Thi...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/12 12:00 a.m.20 views

EthAssetManager and ThreePoolAssetManager don't control Meta tokens decimals

Lines of code Vulnerability details Both contracts treat meta assets as if they have fixed decimals of 18. Minting logic breaks when it's not the case. However, meta tokens decimals aren't controlled. If actual meta assets have any other decimals, minting slippage control logic of both contracts...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/10 12:00 a.m.20 views

A malicious user can create a vault that is actually empty

Lines of code Vulnerability details description A malicious user can call the createVault function to create a vault with an ERC20 token that returns false rather than revert on failed transfer. By specifying the tokenType parameter to be ERC721 the transferFrom function will be called rather tha...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/08 12:00 a.m.20 views

FixedPricePassThruGate.sol All the msg.value should be pass thru to gate.beneficiary instead of gate.ethCost

Lines of code Vulnerability details In FixedPricePassThruGate.solpassThruGate, at L48 the msg.value is checked to be = gate.ethCost instead of == gate.ethCost, which makes it possible for the caller to send more than gate.ethCost. However, at L53 only the amount of gate.ethCost is passed thru to...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/08 12:00 a.m.20 views

PermissionlessBasicPoolFactory's pools with fee on transfer tokens can be emptied by repetitive deposit-withdraws

Lines of code Vulnerability details Griefing attack is possible if pool deposit token is a fee on transfer ERC20 as deposit, withdraw atomic call sequence is allowed with pre-fee token quantity being accounted as deposit amount. Suppose F is a fee on transfer token and the pool with F as deposit...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/08 12:00 a.m.20 views

Reward Token Transfer Failure Can Lead to Loss of Deposit in PermissionlessBasicPoolFactory

Lines of code Vulnerability details Impact If transfer of any reward token returns False or reverts for whatever reason, users who deposited will not be able to withdraw their deposit. A malicious pool creator could abuse this to lock tokens from victims by using two reward tokens, one...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/06 12:00 a.m.20 views

amount requires to be updated to contract balance increase (17)

Lines of code Vulnerability details Impact Every time transferFrom or transfer function in ERC20 standard is called there is a possibility that underlying smart contract did not transfer the exact amount entered. It is required to find out contract balance increase/decrease after the transfer. Th...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/05 12:00 a.m.20 views

The ownership context is too centralized leaving room for other attack surfaces

Lines of code Vulnerability details Impact The ownership context is too centralized leaving room for other attack surfaces and leaving impression of distrust for the participants. Proof of Concept Almost all of the functions have onlyOwner modifier which allows accessing all the vital points of t...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2022/05/02 12:00 a.m.20 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/04/30 12:00 a.m.20 views

Moral hazard of borrower calling liquidate() and potential Oracle manipulation

Lines of code Vulnerability details Impact In the InceptionVaultsCore contract, the liquidate and liquidatePartial function can be called anyone. This means that the borrower for a specific vaultId can call liquidate or liquidatePartial on his own vault. Furthermore, the project incentivizes...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/29 12:00 a.m.20 views

Reentrency in claimRewards in ConcurRewardPool

Judge @GalloDaSballo has assessed the 1st item in QA Report 163 as Medium risk. The relevant finding follows: … Reentrency in claimRewards in ConcurRewardPool The function claimRewards is open to reenterncy, if the safeTransfer function of a token calls the claimRewards again the tokens can be...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/28 12:00 a.m.20 views

Shelter donations result in wrong internal balance if fee-on-transfer token is used

Judge @GalloDaSballo has assessed the 2nd Low-severity item in QA Report 66 as Medium risk. The relevant finding follows: … In case of a fee-on-transfer ERC20 token the savedTokens balance will not represent the actual balance of the contract: You can either disable the use of fee-on-transfer...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/27 12:00 a.m.20 views

EthPool use payable.transfer with an arbitrary receiver

Lines of code Vulnerability details Impact EthPool sends out native tokens via payable.transfer call. This is unsafe as transfer has hard coded gas budget and can fail when the to is a smart contract. Such transactions will fail for smart contract users which don't fit to 2300 gas stipend transfe...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/27 12:00 a.m.20 views

Customers cannot be topUp()ed a second time

Lines of code Vulnerability details OpenZeppelin's safeApprove will revert if the account already is approved and the new safeApprove is done with a non-zero value function safeApprove IERC20 token, address spender, uint256 value internal // safeApprove should only be called when setting an initi...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/27 12:00 a.m.20 views

Oracle data feeds are insufficiently validated

Lines of code Vulnerability details Impact If the oracle price feeds are insufficiently validated, there will be pricing errors leading to the miss-pricing of assets/risk Proof of Concept The code does not verify that answeredInRound = roundID for both cases where an oracle is used, and the...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/27 12:00 a.m.20 views

Swapper3Crv's swapping path can be suboptimal

Lines of code Vulnerability details Impact Swapper3Crv.swap result can be suboptimal as only paths with ETH are evaluated. Setting severity to medium as despite function availability not affected there can be some fund losses as a result. Proof of Concept tokenAmountOut uses fixed tokenIn, ETH,...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/27 12:00 a.m.20 views

_incrementGaugeWeight allows user to add weight to nonexistent gauges

Lines of code Vulnerability details Impact User adds weight to a gauge that hasn't been added In addition to adding to a nonexistent gauge it also increments totalWeight which only contains weight for live gauges. This value then results in returning values for reward distribution that account fo...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/21 12:00 a.m.20 views

Attacker can cause minter to lose his funds by calling sync() between deposit and mint()

Lines of code Vulnerability details Impact All funds will be lost Proof of Concept To mint new index tokens underlying tokens need to be deposited in Vtoken.sol and then call the mint function. The mint function does balance-previousBalance to calculate tokens that were deposited. The previous...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/21 12:00 a.m.20 views

Chainlink's latestRoundData might return stale or incorrect results

Lines of code Vulnerability details Impact In ChainlinkPriceOracle.sol, 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 ChainlinkPriceOracle.solL83...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/21 12:00 a.m.20 views

ORACLE Data is not properly validated in ChainlinkPriceOracle.sol

Lines of code Vulnerability details Impact Price can be stale which can lead to wrong assetPerBaseInUQ return value Proof of Concept Oracle data feed is insufficiently validated. There is no check for stale price and round completeness. Tools Used Manual review, similar issue was found in yield...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/20 12:00 a.m.20 views

IndexLogic: An attacker can burn other users' tokens to transfer assets to himself

Lines of code Vulnerability details Impact In the burn function of the IndexLogic contract, the user needs to transfer the tokens to the contract first, and then call the burn function to withdraw the assets. The attacker can monitor the number of tokens in the contract. When it is not 0, the...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/13 12:00 a.m.20 views

[WP-H22] Bad debts should not continue to accrue interest

Lines of code Vulnerability details uint256 debtAmount = getDebtAmountnftIndex; require debtAmount = getLiquidationLimitnftIndex, "positionnotliquidatable" ; // burn all payment stablecoin.burnFrommsg.sender, debtAmount; In the current design/implementation, the liquidator must fully repay the...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/13 12:00 a.m.20 views

Use of deprecated Chainlink oracle aggregator function latestAnswer

Lines of code Vulnerability details Impact According to Chainlink's documentation, the latestAnswer function is deprecated. This function does not error if no answer has been reached but returns 0. The function is not present in the latest API reference AggregatorInterfaceV3. Proof of Concept...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/12 12:00 a.m.20 views

setDebtInterestApr should accrue debt first

Lines of code Vulnerability details Impact The setDebtInterestApr changes the debt interest rate without first accruing the debt. This means that the new debt interest rate is applied retroactively to the unaccrued period on next accrue call. It should never be applied retroactively to a previous...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/06 12:00 a.m.20 views

Inconsistent use of oracle

Lines of code Vulnerability details Impact Throughout the protocol, oracles are relied upon to keep Volt stable, calculate payouts to users, and judge whether actions are eligible to be carried out. On the NonCustodialPSM contract, oracle is updated with the updateOracle function. However, there ...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/05 12:00 a.m.20 views

Chain ID Is Not Resistant To Hard Fork and Other Token Supports In The Oracle Contract

Lines of code Vulnerability details Impact During the code review, It has been observed only the following chain ids are supported for the chainlink. 1 and 42 - The contracts are not upgradeable therefore If there is any hard fork or new chain support, the contract should be deployed again with...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/02 12:00 a.m.20 views

Function getUserPastLock may return incorrect values

Lines of code Vulnerability details Impact userLocks array can contain elements with the same fromBlock properties, but different total locked amounts. This edge case is not considered in the implementation of getUserPastLock function, which returns a value as soon as it finds a UserLock with...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/04/02 12:00 a.m.20 views

Emergency mode enable/disable issue

Lines of code Vulnerability details Impact Enabling emergency mode should be one way process that sets contracts in emergency mode. It should be not possible to revert that process, otherwise it puts owner of the contracts in very privileged position. Owner can trigger emergency mode, perform...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/03/30 12:00 a.m.20 views

Swap Functions Do Not Verify Final Token Matches The Swapped Token

Lines of code Vulnerability details Impact When calling Swapper.executeSwaps there are no checks to ensure the received token matches the final swapped token. If these are different it may result in user funds being locked in the contract. This issue is present in each of the following functions:...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/03/30 12:00 a.m.20 views

[WP-H10] GenericSwapFacet.sol#swapTokensGeneric() duplicated .call{ value: msg.value } makes it possible for the attacker to steal native tokens (ETH) from the contract

Lines of code Vulnerability details function swapTokensGenericLiFiData memory lifiData, LibSwap.SwapData calldata swapData public payable uint256 receivingAssetIdBalance = LibAsset.getOwnBalancelifiData.receivingAssetId; // Swap executeSwapslifiData, swapData; uint256 postSwapBalance =...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/03/24 12:00 a.m.20 views

[WP-H0] Wrong implementation of EIP712MetaTransaction

Lines of code Vulnerability details 1. EIP712MetaTransaction is a utils contract that intended to be inherited by concrete actual contracts, therefore. it's initializer function should not use the initializer modifier, instead, it should use onlyInitializing modifier. See the implementation of...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/03/24 12:00 a.m.20 views

[WP-H4] Initializer of QuantConfig.sol can rug users

Lines of code Vulnerability details function initializeaddress payable timelockController public override initializer require timelockController != address0, "QuantConfig: invalid TimelockController address" ; AccessControlinit; Ownableinitunchained; setupRoleDEFAULTADMINROLE, msgSender;...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/03/23 12:00 a.m.20 views

ConfigTimeLockController will put QuantConfig in a stalemate(rendering it unusable)

Lines of code Vulnerability details The QuantConfig contract has these important setters, setProtocolAddress, setProtocolUint256, setProtocolBoolean and setProtocolRole. This contract is subjected to a timelock before all such processes above are executed. But, the issue arises in the fact that i...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/03/22 12:00 a.m.20 views

Usage of deprecated Chainlink functions

Lines of code Vulnerability details Impact The Chainlink functions latestAnswer and getAnswer are deprecated. Instead, use the latestRoundData and getRoundData functions. Proof of Concept Go to and search for latestAnswer or getAnswer. You'll find the deprecation notice. Tools Used none Recommend...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/03/21 12:00 a.m.20 views

Incorrect implementation of Lender can result in lost tokens

Lines of code Vulnerability details Impact MapleLoanInternals.sendFee should check returnData.length == 32 before decoding, otherwise if it returns bytes data, the abi.decode will return 0x20, result in lost tokens. Proof of Concept This contract can test that when the function returns bytes data...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/03/20 12:00 a.m.20 views

Option create can be denied

Lines of code Vulnerability details Proof of Concept A griefer can frontrun the createOption from a user and user's tx will revert. This line will revert because of this Recommended Mitigation Steps One gas efficient way to prevent this is to mix msg.sender into salt. --- The text was updated...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/03/17 12:00 a.m.20 views

No use of upgradeable SafeERC20 contract in Controller.sol

Lines of code Vulnerability details Impact Controller.sol makes use of Open Zeppelins ReentrancyGuardUpgradeable.sol in the file but does not use an upgradeable version of SafeERC20.sol Proof of Concept Tools Used Manual code review Recommended Mitigation Steps Make use of Open Zeppelins...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2022/03/16 12:00 a.m.20 views

Fee-on-transfer/deflationary tokens cause problems

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.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/03/03 12:00 a.m.20 views

areOperatorsImported has incorrect logic

This issue has been created to upgrade a QA report submission to a medium severity finding. From 0xliumin: areOperatorsImported has incorrect logic Right now, this function returns false if the implementation AND the selector don't match. It's possible to provide a destination with either a...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/03/02 12:00 a.m.20 views

LockedBalance library should drop parameters to 96/32 bits

Lines of code Vulnerability details Impact The LockedBalance contract takes 256-bit amount values but performs bit math on them as if they were 96 bit values. Bits could spill over to a different locked balance in the else part lockedBalance stores two 128-bit locked balances in one 256-bit stora...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/02/23 12:00 a.m.20 views

[WP-H7] InsuranceFund#syncDeps() may cause users' fund loss

Lines of code Vulnerability details function syncDepsIRegistry registry public onlyGovernance vusd = IERC20registry.vusd; marginAccount = registry.marginAccount; The Governance address can call InsuranceFund.solsyncDeps to change the contract address of vusd anytime. However, since the tx to set ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/02/23 12:00 a.m.20 views

[WP-M6] Chainlink's latestRoundData might return stale results

Lines of code Vulnerability details function getUnderlyingPriceaddress underlying virtual external view returnsint256 answer if stablePriceunderlying != 0 return stablePriceunderlying; ,answer,,, = AggregatorV3InterfacechainLinkAggregatorMapunderlying.latestRoundData; answer /= 100; uint80 round,...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/02/23 12:00 a.m.20 views

liquidation is vulnerable to sandwich attacks

Lines of code Vulnerability details when an account is liquidated, there is no minimum amount of the swap, which makes it vulnerable for sandwich attacks. Proof of Concept Alice's long position can be liquidated, bob notices it and creates a short position, then liquidates her position, thus...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/02/23 12:00 a.m.20 views

Attacker can DOS VUSD withdrawal by spamming withdrawals of zero tokens

Lines of code Vulnerability details Impact By spamming withdrawal requests of 0, the user can clog the withdrawal queue. For anybody to withdraw their funds somebody has to first unclog it by running processWithdrawal. Depending on the number of spam withdrawals, potentially multiple times. Since...

6.8AI score
SaveExploits0
Total number of security vulnerabilities5000