Lucene search
+L
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
•added 2022/07/17 12:00 a.m.•23 views

Auctioneer Cut calculated in different order of magnitude

Lines of code Vulnerability details Impact Auctioneer fee is calculated in different order of magnitude. Proof of Concept As your are defining auctioneerReward in 1e18 basis point being 1e18 100% you need to divide by 1e18 when calculating percentage. function setAuctioneerRewarduint128...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/07/17 12:00 a.m.•23 views

There is no boundaries for starting an auction.

Lines of code Vulnerability details Impact The team has brought this contest to be fairer to their users in terms of liquidation mechanism. Looking through this perspective, it can be developed more on the process to be much fairer to the users in volatile market conditions. Proof of Concept The...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/07/14 12:00 a.m.•23 views

Loss of funds in an underlying protocol would cause catostrophic loss of funds for swivel

Lines of code Vulnerability details Impact Loss of all user funds Proof of Concept This exploit stems from a quirk in the way that exchange rate is tracked for matured positions. We first need to breakdown how interest is calculate for a matured position. In L124 the yield for a matured position ...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/07/14 12:00 a.m.•23 views

Small scalar may make buyoutPrice calculation incorrectly

Lines of code Vulnerability details Impact In Buyout.start function, buyoutPrice is calculated using a scalar = 100. This small scalar and division rouding will reduce the precision of the formula significantly. Proof of Concept 1. Alice call start with msg.value = 1e18 and depositAmount = 4567...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/07/08 12:00 a.m.•23 views

Chainlink's latestRoundData (price) might return stale or incorrect result

Lines of code Vulnerability details JBChainlinkV3PriceFeed.sol we are using latestRoundData, but there is no check if the return value indicates stale data..Even though its only getting the price variable, the whole latestRoundData function gets returned and we cant just ignore it because the pri...

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

Zero strike call options can be systemically used to steal premium from the taker

Lines of code Vulnerability details Some non-malicious ERC20 do not allow for zero amount transfers and order.baseAsset can be such an asset. Zero strike calls are valid and common enough derivative type. However, the zero strike calls with such baseAsset will not be able to be exercised, allowin...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:00 a.m.•23 views

Unsafe transferFrom()

Lines of code Vulnerability details Impact Yieldy.transferFrom returns false on failure instead of reverting. This might lead to moveFundsToUpgradedContract incorrectly unstaking and restaking tokens, potentially causing user or Migration.sol to lose funds depending on NEWCONTRACT and OLDCONTRACT...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:00 a.m.•23 views

Inconsistent balance when 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...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/26 12:00 a.m.•23 views

Deflationary/fee-on-transfer tokens are not supported

Lines of code Lender.solL215 Lender.solL337 Lender.solL398 Lender.solL456 Lender.solL521 Lender.solL564 Lender.solL617 Vulnerability details Impact When an amount of underlying tokens is sent to the Lender.sol contract during a lend, the actual amount gained by the contract might not be exactly t...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/24 12:00 a.m.•23 views

TWAP array can be artificially filled up with the most recent quote

Lines of code Vulnerability details A malicious user can run updateTWAV on each block, quickly replacing all four values of the twavObservations array with the most recent valuation. I.e. the time weighted averaging essence of the recorded price can be directly reduced to always be just most rece...

6.5AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/24 12:00 a.m.•23 views

_updateTwav() and _getTwav() will revert when cumulativePrice overflows

Lines of code Vulnerability details Impact Contract will break when cumulativeValuation overflows. PoC Cumulative prices are designed to work with overflows/underflows because in the end the difference is important. In updateTwav when prevCumulativeValuation + valuation timeElapsed overflows the...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/19 12:00 a.m.•23 views

Owner can grief with high gas units

Lines of code Vulnerability details Impact The owner of the InfinityExchange contract can frontrun sellers/buyers e.g InfinityExchange.matchOneToOneOrders, InfinityExchange.matchOneToManyOrders functions and set arbitrarily high gas units with updateWethTranferGas which can either cause an...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/19 12:00 a.m.•23 views

User can accidentally permanently freeze the staked funds

Lines of code Vulnerability details User facing changeDuration function allows for setting any newDuration of a stake. However, only THREEMONTHS, SIXMONTHS and TWELVEMONTHS durations are visible to the system in all the subsequent logic. If a user accidentally sets any other duration, the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/19 12:00 a.m.•23 views

Maker buy order with no specified NFT tokenIds may get fulfilled in matchOneToManyOrders without receiving any NFT

Lines of code Vulnerability details The call stack: matchOneToManyOrders - matchOneMakerSellToManyMakerBuys - execMatchOneMakerSellToManyMakerBuys - execMatchOneToManyOrders - transferMultipleNFTs Based on the context, a maker buy order can set OrderItem.tokens as an empty array to indicate that...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/19 12:00 a.m.•23 views

Protocol fee rate can be arbitrarily modified by the owner and the new rate will apply to all existing orders

Lines of code Vulnerability details function matchOneToOneOrders OrderTypes.MakerOrder calldata makerOrders1, OrderTypes.MakerOrder calldata makerOrders2 external uint256 startGas = gasleft; uint256 numMakerOrders = makerOrders1.length; requiremsg.sender == MATCHEXECUTOR, 'OME';...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:00 a.m.•23 views

auraBAL can be stuck into the Strategy contract

Lines of code Vulnerability details Impact The internal harvest function defined is responsible to claim auraBAL from the aura locker and within the function it swaps them to auraBAL - BAL/ETH BPT - WETH - AURA, finally it locks AURA to the locker to increase the position. For claiming auraBAL it...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:00 a.m.•23 views

TODO: Hardcode claim.account = address(this)?

Lines of code Vulnerability details Impact Why you still has a TODO in the final code? TODO: Hardcode claim.account = addressthis? It is not implemented yet. claim.account may be any value, which may break the claiming process or let user steal fund that intended to be used in MyStrategy to their...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/18 12:00 a.m.•23 views

Fee-on-transfer support

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 to...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/14 12:00 a.m.•23 views

The Oracle address settings for the PriceOracle.sol contract are not checked for ZERO Address, and will not do the expected work if the prophecy machine address is set to Zero address (which will be populated with 0 by default if not passed to the constructor).

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The getPrice function of the PriceOracle contract internally calls getPriceFromAdapters to get the price, but does not check that the adapters are not set to Zero Address, so when the address in the...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/14 12:00 a.m.•23 views

Rounding Issues In Certain Functions

Lines of code Vulnerability details Background Per EIP 4626's Security Considerations Finally, ERC-4626 Vault implementers should be aware of the need for specific, opposing rounding directions across the different mutable and view methods, as it is considered most secure to favor the Vault itsel...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/06/03 12:00 a.m.•23 views

THE FIRST AMM STAKER WILL HAVE CONTROL OVER HOW THE SHARES ARE CALCULATED

Lines of code Vulnerability details Impact The first staker can take control of how the subsequent shares are going to be distributed by simply staking 1wei amount of the token and frontrunning future stakers. The reasons of this are related on how the variables are updated and with the amounts...

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

Governance Token limit can be massively increased due to uninitialised lastEvent variable

Lines of code Vulnerability details Impact Due to insufficient checks in the executeInflationRateUpdate in the Minter contract, the limit on tokens that can be minted is massively increased. As lastEvent is uninitialised and equal to 0 by default, in the first line of executeInflationRateUpdate,...

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

Users can get rewards even if not locking for the full lock duration

Lines of code Vulnerability details Impact Users can get rewards that should only have gone to users that locked for the full duration, effectively stealing from those other users Proof of Concept This is the relevant logic from lock that determines the time at which the funds are unlocked: File:...

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

Users may lose rewards to other users if rewards are given as fee-on-transfer tokens

Lines of code Vulnerability details Impact If rewards are given in fee-on-transfer tokens, users may get no rewards, breaking functionality Med: Assets not at direct risk, but the function of the protocol or its availability could be impacted, or :::leak value with a hypothetical attack path with...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/21 12:00 a.m.•23 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/18 12:00 a.m.•23 views

[WP-H1] Debt can be repaid with a depegged underlyingToken, which can be exploited by arbitrageurs and drives the market price of alToken to match the worst depegged underlyingToken

Lines of code Vulnerability details function normalizeUnderlyingTokensToDebtaddress underlyingToken, uint256 amount internal view returns uint256 return amount underlyingTokensunderlyingToken.conversionFactor; function repayaddress underlyingToken, uint256 amount, address recipient external...

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

YearnTokenAdapter allows a maximum loss of 100% when withdrawing

Lines of code Vulnerability details Impact YearnTokenAdapter allows slippage of 100% when withdrawing from the vault which will cause a loss of funds. Here's the documentation straight from the vault contract: It allows the user to specify the maxLoss as the last parameter. It determines how many...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/09 12:00 a.m.•23 views

sendToCosmos doesn't consider the ERC20 transfer fee, resulting in incorrect amount of ERC20 token

Lines of code Vulnerability details Impact Some ERC tokens have a fee on each transfer. The protocol doesn’t handle the fee when transferring this kind of ERC20 tokens, leading to the inconsistent amount of token actually received in the contract. Validators on the Cudos will mint more tokens to...

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

PermissionlessBasicPoolFactory.sol Does Not Support Reward Tokens With Decimals Other Than 18

Lines of code Vulnerability details Impact The PermissionlessBasicPoolFactory.sol contract allows anyone to add staking pools which users can participate in to earn reward tokens. Pools are segregated to ensure malicious pools cannot siphon tokens from honest pools. Upon the addition of a new poo...

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

Tokens having more than 18 decimals are not supported

Originally submitted by warden pauliax in 173, duplicate of 49. Tokens having more than 18 decimals are not supported, the calculation will revert here: function decimalMultiplieraddress token internal view returns uint256 return 1018 - IERC20Fulltoken.decimals; --- The text was updated...

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

All approved addresses can burn tokens

Lines of code Vulnerability details Impact The burn function calls isApprovedOrOwner to check if a caller is authorized to burn tokens. This means that any address that has been approved can burn a user's token. Reading the ERC721 documentation from OpenZeppelin makes it understood that the...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/05 12:00 a.m.•23 views

Unhandled return value of ERC20 transfer

Lines of code Vulnerability details Impact For reference, see similar Medium-severity finding from Consensys Diligence Audit of Aave Protocol V2: As stated in the above finding: “ERC20 implementations are not always consistent. Some implementations of transfer and transferFrom could return ‘false...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/04 12:00 a.m.•23 views

Outdated Interface Implementation

Lines of code Vulnerability details Impact The Chainlink aggregator interface used by the project is outdated and does not permit the project to properly sanitize the price values it receives. Recommended Mitigation Steps The interface is to be updated according to the official Chainlink...

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

ABDKMath64 performs multiplication on results of division

Lines of code Vulnerability details Impact Solidity could truncate the results, performing multiplication before division will prevent rounding/truncation in solidity math. Recommended Mitigation Steps Consider ordering multiplication first. --- The text was updated successfully, but these errors...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/05/02 12:00 a.m.•23 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/04/29 12:00 a.m.•23 views

_amount requires to be updated to contract balance increase (4)

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/04/27 12:00 a.m.•23 views

Lack of safeApprove(0) prevents some registrations, and the changing of stakers and LP tokens

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...

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

Unsafe use of .transfer

Lines of code Vulnerability details Impact User funds can be locked by using a smart contract wallet with inefficient callback, or by future hardforks that change the gas consumption. address.transfer has been suggested to deprecate by most auditors, because of the potential OOG error. However,...

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

CvxCrvRewardsLocker implements a swap without a slippage check that can result in a loss of funds through MEV

Lines of code Vulnerability details Impact The CvxCrvRewardsLocker contract swaps tokens through the CRV cvxCRV pool. But, it doesn't use any slippage checks. The swap is at risk of being frontrun / sandwiched which will result in a loss of funds. Since MEV is very prominent I think the chance of...

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

function lockFunds in TopUpActionLibrary can cause serious fund lose. fee and Capped bypass. It's not calling stakerVault.increaseActionLockedBalance when transfers stakes.

Lines of code Vulnerability details Impact In function TopUpActionLibrary.lockFunds when transfers stakes from payer it doesn't call stakerVault.increaseActionLockedBalance for that payer so stakerVault.actionLockedBalancespayer is not get updated for payer and...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/21 12:00 a.m.•23 views

Should implement a periphery contract for user to mint indexToken

Lines of code Vulnerability details Impact User can lose their fund Proof of Concept When users want to mint an index token, users need to transfer their assets to addressvToken first, then call the mint function of IndexLogic.sol. If users make it into 2 transactions, miner can manipulate it/...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/04/13 12:00 a.m.•23 views

Controller.setStrategy tries to withdraw JPEG token with incorrect function strategy.withdraw(address), leading to certain revert and renders setStrategy unuseable

Lines of code Vulnerability details Impact Whenever STRATEGISTs want to switch from currently used strategy to another one, they are required to call the Controller.setStrategy function. This function is responsible for first withdrawing CRV and JPEG tokens from strategy contract into vault, then...

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

Malicious owner can steal some funds from borrower

Lines of code Vulnerability details Impact Owner can make changes to the protocol with immediate effect. Malicious owner can watch for big lend in the mempool and front run it by maxing out originationFeeRate to 5%. The users, both lender and borrower, will still think that originationFeeRate is...

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

Re-entrace danger in PCVDeposit

Lines of code Vulnerability details Impact A malicious contract can empty all the system if he get ETH with the function withdrawETH. The onlyPCVController call this function and send ETH to the malicious contract, and then the malicious can use delegatecall and pretend to be onlyPCVController, a...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2022/03/31 12:00 a.m.•23 views

[WP-H9] LenderPool.sol#start() startFeeFraction can be used by a malicious/compromised owner to rug lenders

Lines of code Vulnerability details A configurable startFeeFraction with no upper bound can be claimed by the caller to a specified address. The fee is not based on the gas cost, but on the totalLent of the pool. We believe this startFee reward is unnecessary and it creates a potential rug vector...

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

Add a timelock to DiamondCutFacet

Lines of code Vulnerability details Impact To give more trust to users: functions that set key/critical variables should be put behind a timelock. Proof of Concept Tools Used Remix Recommended Mitigation Steps Add a timelock to setter functions of key/critical variables. --- The text was updated...

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

DoS: User's May Claim _splitId Causing Other Transactions to Revert

Lines of code Vulnerability details Impact Users may set splitId to any value when calling SplitFactory.createSplit allowing the user to claim this ID. This is exploitable to front-running in a denial of service attack where an attacker may call see a transaction in the mempool and call...

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

Rewards can be claimed if merkle proof is known

Lines of code Vulnerability details Impact The README describes the following when a voting ends: Outside of the Hidden Hand contract scope, after the Tokemak CoRE round ends, proposal data is compiled and these two things happen: - The following is derived from the data: its hash KECCAK-256 and...

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

[WP-H2] Improper control over the versions of distributions' metadata may lead to repeated claims of rewards

Lines of code Vulnerability details function updateRewardsMetadataCommon.Distribution calldata distributions external onlyRoleDEFAULTADMINROLE requiredistributions.length 0, "Invalid distributions"; IRewardDistributordistributor.updateRewardsMetadatadistributions; In the current implementation,...

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

Reentrancy in depositBribeERC20 function

Lines of code Vulnerability details Impact depositBribeERC20 function in BriveVault is reentrant in line 187, where an address supplied by the caller is called. A bad actor that has DEPOSITORROLE and is a contract can execute a folowing attack: 1. Create a dummy token contract, reentrant in the...

7AI score
SaveExploits0
Total number of security vulnerabilities5000