Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2022/06/03 12:0 a.m.9 views

call() should be used instead or transfer() on an address payable

Lines of code Vulnerability details This is a classic Code4rena issue: code-423n4/2021-04-meebits-findings2 code-423n4/2021-10-tally-findings20 code-423n4/2022-01-openleverage-findings75 Impact The use of the deprecated transfer function for an address will inevitably make the transaction fail...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.10 views

Approving from non-zero to non-zero allowance will revert with OZ's safeApprove()

Lines of code Vulnerability details Impact Transaction reverting. Proof of Concept OZ's implementation of safeApprove would throw an error if an approve is attempted from a non-zero value "SafeERC20: approve from non-zero to non-zero allowance": require value == 0 || token.allowanceaddressthis,...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.10 views

wrong reward distribution and user fund lose if migrate() is called with current rewardToken by mistake or intentionally

Lines of code Vulnerability details Impact It's possible to call migrate function of BkdLocker with newRewardToken value equal to current rewardToken and there is no check to prevent this. and if this happens then userCheckpoint will calculated reward double times for rewardToken, one time becaus...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.7 views

Deposit doesn't initialize WithdrawalMeta

Lines of code Vulnerability details Impact Though LiquidityPool.sol is not in scope, this is related to the PoolMigrationZap.migrate which performs deposits into new pools. The deposit functionality of LiquidityPool.sol does not set the withdrawalMeta for the depositor, meaning that their...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.5 views

Call to safeApprove without checking previous allowance in burnFees could result in locked funds

Lines of code Vulnerability details Impact Using this deprecated function can lead to unintended reverts and potentially the locking of funds. A deeper discussion on the deprecation of this function is in OZ issue 2219 OpenZeppelin/openzeppelin-contracts2219. Proof Of Concept Refer to the burnFee...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.9 views

RewardHandler.soland FeeBurner.sol will fail due to inexistent AddressProvider.sol getter functions

Lines of code Vulnerability details Impact FeeBurner.burnToTarget and RewardHandler.burnFees will fail every time because addressProvider.getSwapperRouter, addressProvider.getBKDLocker and addressProvider.getFeeBurner are not implemented in AddressProvider.sol. Proof of Concept getSwapperRouter,...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.11 views

There are multiple ways for admins/governance to rug users

Lines of code Vulnerability details Impact A malicious admin can steal user funds or lock their balances forever 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 Unlike the original Convex code that goes...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.11 views

Vote locking should block wrapper contracts

Lines of code Vulnerability details The reason that users are given boosted rewards for locking their governance tokens is that by making them illiquid for a set amount of time, the supply available to be sold is restricted, and users buying the token are more able to push the price up. Impact By...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.13 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
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.12 views

Minter.sol#_executeInflationRateUpdate() inflationManager().checkpointAllGauges() is called after InflationRate is updated, causing users to lose rewards

Lines of code Vulnerability details When Minter.solexecuteInflationRateUpdate is called, if an INFLATIONDECAYPERIOD has past since lastInflationDecay, it will update the InflationRate for all of the gauges. However, in the current implementation, the rates will be updated first, followed by the...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.6 views

BkdLocker#depositFees() can be front run to steal the newly added rewardToken

Lines of code Vulnerability details Every time the BkdLockerdepositFees gets called, there will be a surge of rewards per locked token for the existing stakeholders. This enables a well-known attack vector, in which the attacker will take a large portion of the shares before the surge, then claim...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.10 views

Lack of safeApprove(0) may prevent deposits and swapping of token

Lines of code Vulnerability details Impact OpenZeppelin’s safeApprove will revert if the account already is approved and the new safeApprove is done with a non-zero value. Users may be prevented from swapping tokens to Backd LPTokens a second time Proof of Concept There are multiple places...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.11 views

RewardHandler.burnFees() will work only once and revert after that if burnedAmount is different.

Lines of code Vulnerability details Impact RewardHandler.burnFees will work only once and revert after that if burnedAmount is different. Proof of Concept OpenZeppelin’s safeApprove will revert if the account already is approved and the new safeApprove is done with a non-zero value. Tools Used...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.10 views

Able to get LP tokens without spending any funds in FeeBurner.sol

Lines of code FeeBurner.solL43-L88 Vulnerability details Impact In the burnToTarget function, if the tokens array has only a zero address token and msg.value is 0 then FeeBurner.sol would still call the swapAll function and use all WETH held in the contract. If the contract has any WETH, the call...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.6 views

LidoVault: require(msg.value == 0);

Reference: 2 Impact 8 Consider adding here requiremsg.value == 0; since it is non-ETH token. Affected code: --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.3 views

Inconsistency in view functions can lead to users believing they’re due for more BKD rewards

Lines of code Vulnerability details Impact The view functions used for a user to check their claimable rewards vary in their implementation. This can cause users to believe they are due X amount but will receive Y. Proof of Concept If the inflationRecipient is set, then poolStakedIntegral will be...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.13 views

uint256 => uint120 silent overflow

Lines of code Vulnerability details When converting a number from uint256 to a smaller type, solidity truncates it without raising errors. In our case, this operation is performed when saving numerator and denominator to the storage variable orderStatusorderHash code link...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.8 views

More than 1 zero address token in burnToTarget may lead to draining of FeeBurner.sol

Lines of code FeeBurner.solL43-L88 Vulnerability details Impact The burnToTarget function in FeeBurner.sol allows any array of tokens to be used. If the tokens array contains more than 1 zero address, the swapAll function for the swapperRouter will be called more than once with the same msg.value...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.10 views

RewardHandler.burnFees() could fail depending on number of pools with underlying = address(0)

Lines of code Vulnerability details Impact If more than one pool has underlying = address0 then RewardHandler.burnFees will fail or use ETH balance from FeeBurner.sol. Proof of Concept RewardHandler.solL40-L50 uint256 ethBalance = addressthis.balance; address memory tokens = new address; for...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.13 views

Verifying criteria is prone to known merkle proof attacks

Lines of code Vulnerability details The Merkle hash root does not indicate the tree depth, enabling a second-preimage attack in which an attacker creates a document other than the original that has the same Merkle hash root. For the example above, an attacker can create a new document containing...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.17 views

Order partial fulfilling can be blocked by the first fulfiller

Lines of code Vulnerability details DOS attack is possible as OrderValidator.validateOrderAndUpdateStatus sets order's numerator and denominator based on an arbitrary fulfiller provided input. When there is a large bulk sale, an attacker can become one of the first buyers partial fulfillers and s...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.10 views

Fulfilling an order more than once

Lines of code Vulnerability details Impact Any non basic or FULL order can be fulfilled more than once, assuming the offerer has approved the contract the right amounts. This is a valid assumption as users may max-approve the contract/conduits, or have multiple orders with the same items open so...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.18 views

execute() and executeWithBatch1155() functions are susceptible to DoS

Lines of code Vulnerability details Impact execute and executeWithBatch1155 are external functions. Both functions run for loops, boundary of which are determined by the function arguments. Anytime there's a loop where the input comes from an external source there's the possibility of unbounded...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.15 views

uint120 overflow for partially fillable orders in OrderValidator.sol

Lines of code Vulnerability details Repo commit referenced: 49799ce156d979132c9924a739ae45a38b39ecdd Impact In the lines OrderValidator.solL223-L239 where the orderStatus for an orderHash gets updated: orderStatusorderHash.numerator = uint120 filledNumerator + numerator ;...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.12 views

A malicious filler can fill a partial order in such a way that the rest cannot be filled by anyone

Lines of code Vulnerability details Impact For filling a partial order, because Seaport accepts any representation of a fraction, a malicious filler can provide a giant fraction unreduced. This would severely limit what orders can be filled afterwards and in some cases making any more fills...

6.5AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.8 views

it's possible to initialize contract BkdLocker for multiple times by sending startBoost=0 and each time different values for other parameters

Lines of code Vulnerability details Impact function initialize of BkdLocker suppose to be called one time and contract initialize one time. but if it's called by startBoost=0 then it's possible to call it again with different values for other parameters. there are some logics based on the values...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.7 views

Proof for NFT with token id = 0 won't be checked

Lines of code Vulnerability details Impact The proof criteria for NFTs with a zero token id won't be checked, because of a zero token id represents an item with no criteria. Proof of Concept This if check skips the check for the proof of NFT with token id = 0. if identifierOrCriteria != uint2560 ...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.10 views

Buyer can take from a seller an item they had not offered

Lines of code Vulnerability details Impact Orders in Seaport can involve "criteria-based items", in which case it isn't one specific item that can fulfill the order but any one of a set of items. This set of items is the "criteria", and it is specified in the order as the merkle root of a merkle...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.7 views

QA Report

Reinitalisation in BkdLocker.sol In the initialize function, the only check is made that the current startBoost value is zero, if zero is passed then this allows the function to be reinitialised and potentially modifying other variables which should remain constant. Consider making a check that t...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.9 views

Users can claim extremely large rewards or lock rewards from LpGauge due to uninitialised poolLastUpdate variable

Lines of code Vulnerability details Impact A user can claim all of the available governance tokens or prevent any rewards from being claimed in LpGauge.sol if sufficient time is left between deploying the contract and initialising it in the StakerVault.sol contract by calling initalizeLPGauge OR ...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.11 views

Frontrunning Private Trades Vulnerability

Lines of code Vulnerability details Impact The inability to create private trades in the Seaport contract would affect users significantly. Users will be forced to create public trades that run the risk of being frontrun. Proof of Concept Today, all trades are private meant for specific offerer a...

6.6AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.9 views

Wrong items length assertion in basic order

Lines of code Vulnerability details When fulfilling a basic order we need to assert that the parameter totalOriginalAdditionalRecipients is less or equal than the length of additionalRecipients written in calldata. However in prepareBasicFulfillmentFromCalldata this assertion is incorrect L346: /...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.8 views

[WP-H1] OrderFulfiller.sol#_applyFractionsAndTransferEach() Orders with offerItem.itemType == ItemType.NATIVE are not processed properly

Lines of code Vulnerability details // Reduce available value if offer spent ETH or a native token. if offerItem.itemType == ItemType.NATIVE // Ensure that sufficient native tokens are still available. if amount etherRemaining revert InsufficientEtherSupplied; // Skip underflow check as a...

6.5AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.10 views

Does not set the offerer as the recipient if execution amount is nonzero

Lines of code Vulnerability details Impact Order structures will be corrupted through invalid fulfillment application logic. Proof of Concept Tools Used Manual inspection Recommended Mitigation Steps Change to // Set the offerer as the receipient if execution amount is nonzero. if...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.12 views

_transfer#Executor.sol not checking all enum values

Lines of code Vulnerability details Impact Transaction can revert or have unexpected behaviour Poc In transferexecutor.sol you are checking Itemtype values Itemtype.NATIVE, Itemtype.ERC20 and Itemtype.ERC721 after then the last else clause assumes that the Itemtype is a ERC1155. else @audit assum...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.10 views

THE FIRST AMM STAKER MAY NOT RECEIVE ACCORDING REWARDS BECAUSE OF POOR CHECKPOINTS

Lines of code Vulnerability details Impact The first staker within the AmmGauge may not get the rewards if the pool is not checkpointed right after he stakes and before he wants to claim the rewards. Proof of Concept A testing environment that reproduces how the protocol is going to be deployed a...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/03 12:0 a.m.7 views

Contracts allow users to steal latent funds as their own

Lines of code Vulnerability details Impact Users that accidentally send Ether to contracts, or have rebasing rewards that the contract has stole because it doesn't properly track rebasing tokens, have their funds now latent stolen, so they can't be returned by an admin. Proof of Concept One examp...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.13 views

Truncation in OrderValidator can lead to resetting the fill and selling more tokens

Lines of code Vulnerability details Impact A partial order's fractions numerator and denominator can be reset to 0 due to a truncation. This can be used to craft malicious orders: 1. Consider user Alice, who has 100 ERC1155 tokens, who approved all of their tokens to the marketplaceContract. 2...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.7 views

UpdateReward Modifier is brickable

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. The private variable RewardTokens is an unbounded list of addresses that the modifier updateReward loops over and updates the state variable rewardTokenInfo. The gas consumption can become increasingly...

7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.5 views

Since calling _lockVeAsset() incentiveVeAsset is always set to 0

Lines of code%20external%20%7B,%7D,-function%20deposit Vulnerability details Impact The if statement of the deposit function will never add incentive tokens because you calling lockVeAsset which will always set incentiveVeAsset is set to 0. Proof of Concept%3B-,incentiveVeAsset%20%3D%200%3B,-%7D...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.11 views

Total Supply is not guaranteed and is not deterministic.

Lines of code Vulnerability details Impact The actual total supply of the token is random and depends on when executeInflationRateUpdate is executed. Proof of concept The README and tokenomic documentation clearly states that “The token supply is limited to a total of 268435456 tokens.”. However...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.8 views

attacker can steal funds from staker contract and this contract)with decrease allownace frontrunning

Lines of code Vulnerability details IERC20veAsset.safeTransferFrommsg.sender, staker, amount IERC20veAsset.safeTransferFrommsg.sender, addressthis, amount; safetransferfrom to work without a revert which is a side issue dos from revert safetransferfrom-msg.sender has to give allownace to the...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.9 views

infalting the price of tokens to your benfit and no reentracy gaurd you can make your own function for stakefor

Lines of code Vulnerability details Low: you can mint a lot of tokens to contract and inflating the price of tokens and if there is no of getting tokens out of the contract plus if in stakefor function call the function aboves and since there checks and effects patterns are not implemented or...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.5 views

veAsset are locked forever if users are periodically deposit new veAsset or calling lockVeAsset

Lines of code Vulnerability details Impact veAsset are locked forever if users are periodically deposit new veAsset or calling lockVeAsset. VeAssetDepositor also doesn't have mechanism to prevent new user from depositing or calling lockVeAsset. Which mean it will get called forever. As a result,...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.8 views

user can pay alot of money with out getting his tokens

Lines of code Vulnerability details lockveasset function: lockveasset functoin should do some transfer but if that dosnt happen then user can can loose alot of money and if incentiveveasset is 0 because the check is 0 and if statment will not pass and the minting will not happen and your not goin...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.11 views

Pickle Investor Unable To Receive Rewards

Lines of code Vulnerability details Proof-of-Concept Pickle Investor people who locked their PICKLE or deposit their pToken will not be able to collect their rewards. Whenever, Pickle Investor called the Booster.earmarkRewards function to claim their veAsset and extra rewards and disperse them to...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.14 views

Re-entry in BaseRewardPool.sol

Lines of code Vulnerability details Impact An actor who calls withdraw function for an arbitrary amount in his balance, can re-enter this flow again. As a result, he would get at least double rewards than the designed one. Proof of Concept Say an actor has his contract and has staked funds throug...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.10 views

balanceAtEpochOf will revert

Lines of code Vulnerability details Impact The line for uint256 i = locks.length - 1; i + 1 != 0; i-- relies on uint256 underflow and overflow, which would revert in solidity ^0.8.0 Proof of Concept function balanceAtEpochOfuint256 epoch, address user public view returns uint256 amount...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.9 views

you should always approve zero amount because some contracts need it to interact with it (ust)

Lines of code Vulnerability details :make sure approval is zero first because there are contract that need to approve 0 becaues otherwise alot of contract will fail if approve is not zero first not a user then you can have a problem with ust contract which needs to approved 0 :mitigation:approve ...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2022/06/02 12:0 a.m.8 views

safetransferfrom a user has to give allowance to make the function work

Lines of code Vulnerability details i ssue dos with revet because of no allowance dont use safetrafserfrom where is this contract giving allowance to users if a user has zero allowance of the function will fail IERC20veAsset.safeTransferFrommsg.sender, addressthis, amount; Because you would have ...

6.7AI score
Exploits0
Total number of security vulnerabilities10190