Lucene search
+L
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
added 2023/03/06 12:0 a.m.17 views

Using _freefunds() to calculate share price lead to shares miscalculations and could benefit treasury

Lines of code Vulnerability details Impact Function freeFunds calculates the amount of free funds available after profit locking and it's used to for calculating share price, issuing shares during deposit, or burning shares during withdrawal. Value returned by freeFunds is time-dependant, because...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/03/06 12:0 a.m.17 views

closeTrove never nulls trove.stake

Lines of code Vulnerability details // Auditor's note: not 100% sure if this is intentional, but I have reason to believe it's a mistake. Description When a trove gets liquidated, its stake gets set to 0 through removeStake, called eg here. However, when a trove gets closed gratiously through...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/24 12:0 a.m.17 views

changeRewardSpeed function at the MultiRewardStaking contract is incorrectly implemented and can leave the staking of a token on a denial of service state (copy)

Lines of code Vulnerability details Impact The changeRewardSpeed function from the MultiRewardStaking.sol contract lacks documentation on how exactly it should work. By its name and some comments above it, I infer that the function must change the rate of tokens rewards per unit of time. For...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/20 12:0 a.m.17 views

TRANSFERING KIBToken TO YOURSELF INCREASES YOUR BALANCE

Lines of code Vulnerability details Impact using temporary variables to update balances is a dangerous construction. If transferred to yourself, it will cause your balance to increase, thus growing the token balance infinitely Proof of Concept KIBToken overrides transfer to perform the transfer o...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/20 12:0 a.m.17 views

RewardThrottle: If an epoch does not have any profit, then there may not be rewards for that epoch at the start of the next epoch.

Lines of code Vulnerability details Impact In RewardThrottle, both checkRewardUnderflow and fillInEpochGaps call fillInEpochGaps to fill the state of the previous epoch without profit, the difference being that checkRewardUnderflow will request the reward from the overflowPool and distribute the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/19 12:0 a.m.17 views

SwingTraderManager.addSwingTrader will push traderId with active = false to activeTraders

Lines of code Vulnerability details Impact In SwingTraderManager.addSwingTrader, if active = false, the traderId is also pushed to activeTraders. function addSwingTrader uint256 traderId, address swingTrader, bool active, string calldata name external onlyRoleMaltADMINROLE, "Must have admin privs...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/15 12:0 a.m.17 views

Slashed amount may not be cover the staker reward payout

Lines of code Vulnerability details Impact Slashed amount may not be cover the staker reward payout Proof of Concept In the current fix, If the staked balance cannot cover the slashed amount, seize the staked balance. Staking staking = StakinggetContractAddress"Staking"; if staking.getGGPStakeown...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/12 12:0 a.m.17 views

Upgraded Q -> 2 from #250 [1676238274782]

Judge has assessed an item in Issue 250 as 2 risk. The relevant finding follows: Then, the logic presumably tries to keep a lookup table between token id - index using the ownedTokensIndex variable which is of type mappinguint256 = uint256 . This is also wrong, since ERC1155 tokens can have...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/07 12:0 a.m.17 views

Changing reward speed calculates wrong rewardsEndTimestamp

Lines of code Vulnerability details Impact In MultiRewardStaking.changeRewardSpeed the new rewardsEndTimetamp is calculated based on the current balance of reward tokens in the contract. However, a fraction of this balance might already be accrued and accounted as reward, but just has not been...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/07 12:0 a.m.17 views

Wrong first parameter for _calcRewardsEnd when changing reward speed

Lines of code Vulnerability details Impact The function calcRewardsEnd is called with the previousEndTime as first parameter in MultiRewardStaking.changeRewardSpeed, which leads to wrong calculation of the new rewardsEndTimestamp, causing it to be later than it should be. This will lead to more...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/07 12:0 a.m.17 views

Unchecked revert causes to

Lines of code Vulnerability details Impact In AdapterBase.Sol when harvesting and exchanging all tokens using Pool2SingleAssetCompounder.SolL44 harvest can harvest all tokens but not swap them for underlying currency. In contract Pool2SingleAssetCompounder...

7.1AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/03 12:0 a.m.17 views

Split vulnerable to preimage attack

Lines of code Vulnerability details Impact A motivated attacker could invest the resources to craft a malicious SplitsReceiver to steal all of a users' pending funds. Proof of Concept This is a non-practical implementation of the attack, but shows by extending the SplitsReceiver array by any numb...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/03 12:0 a.m.17 views

Code breaks if first user is not expected user

Lines of code Vulnerability details Code breaks if first user is not expected user Summary Rather than iterate and continue if user is not the expected one, this code breaks all the execution if first user is userId Vulnerability Detail Execution is broke most of the times at first iteration for ...

7.4AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/02 12:0 a.m.17 views

[H-01] Reentrancy attack is possible when using ERC777 tokens in DripsHub

Lines of code Vulnerability details H-01 Reentrancy attack is possible when using ERC777 tokens in DripsHub Impact: Some ERC20 tokens implement the EIP 777 interface including the tokensToSend hook, which performs a callback to the user from which tokens will be transferred before the tokens are...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/01 12:0 a.m.17 views

A malicious early user/attacker can manipulate the share price to take an unfair share of future users' deposits

Lines of code Vulnerability details Impact A malicious early user/attacker can manipulate the share price to take an unfair share of future users' deposits. The first minter can manipulate the supply of LP tokens and baseToken-fractional ratio, hindering small liquidity providers from interacting...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/02/01 12:0 a.m.17 views

Unprotected payable functions in Payment.sol

Lines of code Vulnerability details Impact In Payment.sol contract unwrapWETH and sweepToken functions are without any access control. They are public and and doesn't validate that it's being called by any permissioned account. The result is that anyone can steal tokens. Proof of Concept 25:...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/30 12:0 a.m.17 views

withdrawFee() can be called indefinitely

Lines of code Vulnerability details The function withdrawFee does not account whether the fees have already been collected or not, therefore it can be called multiple times or even indefinitely, until the contract balance reaches zero. All funds will be transferred to the protocolFeeRecipient, bu...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/30 12:0 a.m.17 views

Protocol fees can be withdrawn multiple times in Erc20Quest

Lines of code Vulnerability details The withdrawFee function present in the Erc20Quest contract can be used to withdraw protocol fees after a quest has ended, which are sent to the protocol fee recipient address: function withdrawFee public onlyAdminWithdrawAfterEnd...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/30 12:0 a.m.17 views

withdrawRemainingTokens() in the Erc1155Quest withdraws all tokens and does not consider the amount of unclaimed tokens

Lines of code Vulnerability details Impact The withdrawRemainingTokens function in the Erc1155Quest contract does not consider the amount of unclaimed tokens. When the owner calls the function when the quest has ended, all tokens belonging to the contract will be withdrawn. Any user who has not y...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/29 12:0 a.m.17 views

Mitigation of M-07: Issue not mitigated

Lines of code Vulnerability details The sponsor confirmed but disputed Medium severity, and did not provide any PRs addressing it, so the same issue remains in the new code. --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/28 12:0 a.m.17 views

Attacker can delay proposal rejection

Lines of code Vulnerability details The issue that is described in code-423n4/2022-12-tessera-findings24 was not mitigated and still applies like it is described there. --- The text was updated successfully, but these errors were encountered: All reactions...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/27 12:0 a.m.17 views

Fee on transfer tokens will not behave as expected

Lines of code Vulnerability details Impact According to Whitepaper 1.1 Permissionless: "In Timeswap, liquidity providers can create pools for any ERC20 pair, without permission. It is designed to be generalized and works for any pair of tokens, at any time frame, and at any market state ... If fe...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/27 12:0 a.m.17 views

A Malicious User can Lock All Funds in an Option

Lines of code Vulnerability details Impact By calling the mint and burn functions with the 'amount0' and 'amount1' equal to the the option pair's respective balances of token0 and token1, a user can cause a given option's "Option.totalLong0" and "Option.totalLong1" to both be set to 0. The effect...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/26 12:0 a.m.17 views

Upgraded Q -> M from #598 [1674741102558]

Judge has assessed an item in Issue 598 as M risk. The relevant finding follows: 2.minDepositAmount When the asset is btc, the minDepositAmount is too large when asset == btc , minDepositAmount = 0.1 btc , equal 2000 usd suggest: function minDepositAmount public view virtual overrideERC4626Cloned...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/25 12:0 a.m.17 views

Reentrancy attack to swap()

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. A malicious contract can initiate a reentrancy attack to the swap function: it can swap token0 for token1, receiving token0 but without effectively providing the due token1 amount used to mint instead...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/22 12:0 a.m.17 views

Upgraded Q -> M from #113 [1674422768939]

Judge has assessed an item in Issue 113 as M risk. The relevant finding follows: During handling the open fees, the tigAsset is distributed to gov. But, it is not approved before to be consumed by gov. So, the first user's transaction to initiate a market order, will fail. During handling the clo...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/22 12:0 a.m.17 views

Upgraded Q -> M from #254 [1674418824740]

Judge has assessed an item in Issue 254 as M risk. The relevant finding follows: 03: Lock.claimGovFees will revert with tokens that have approve race condition protection Some tokens only allow you to approve a new value if the current allowance is set to zero, e.g. USDT. This is not an issue rig...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/19 12:0 a.m.17 views

Inconsistent min deposit

Lines of code Vulnerability details Impact The first transfer in a vault that is based on ERC4626Cloned produces different results depending on whether it is done via deposit or via mint. While first deposit produces a number of shares that is 1:1 with the asset, in the case of mint, the results...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/19 12:0 a.m.17 views

ERC4626Cloned.previewMint() causes malicious users to can exclusive access to vault

Lines of code Vulnerability details Impact exclusive access to vault,Other users will not be able to mint Proof of Concept In the previewMint method, if the first user mint, no matter how many shares the user passes in, only 10e18 assets are needed function previewMintuint256 shares public view...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/09 12:0 a.m.17 views

Griefing attacks on handleOps and multiSend logic

Lines of code Vulnerability details Description The handleOps function executes an array of UserOperation. If at least one user operation fails the whole transaction will revert. That means the error on one user ops will fully reverts the other executed ops. The multiSend function reverts if at...

7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/03 12:0 a.m.17 views

TokenggAVAX share price manipulation

Lines of code Vulnerability details Impact Reporting this issue as medium severity as a leak of value. Solmate's ERC4626 convertToShares calculates shares as assets totalSupply / totalAssets. It is possible to exploit this function by depositing 1 wei of asset in exchange 1 share totalSupply = 1...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2023/01/03 12:0 a.m.17 views

FIRST DEPOSIT CAN BREAK SHARE CALCULATIONS

Lines of code Vulnerability details Impact Future depositors are forced to pay a huge value of assets to deposit. It is not practically possible for all users. This could directly affect the attrition of users towards this system. Proof of Concept A well-known attack vector for almost all...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/22 12:0 a.m.17 views

Upgraded Q -> M from #32 [1671721748112]

Judge has assessed an item in Issue 32 as M risk. The relevant finding follows: 2. StableVault deposits are limited to 18 decimals During deposit and withdraw to/from StableVault contract, it mints/burns the same amount of stable tokens with respect to decimals. The current implementation support...

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

Some NFTs could be possibly stuck and can not be withdrawn when removing the collateral

Lines of code Vulnerability details Impact When adding a collateral, the protocol transfers the NFT from the user to the contract by calling ERC721's transferFrom, and when removing the collateral, safeTransferFrom is called to allow for onReceive hook to be triggered as intended by the protocol...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/21 12:0 a.m.17 views

fundingRate formula and _multiplier()

Lines of code Vulnerability details Impact The formula used formultiplier will not work as expected. The target price update will be inaccurate and all the borrow/repay/liquidation functions will use the inaccurate target price. The impacts might be: Target price and mark price track will not wor...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/19 12:0 a.m.17 views

Earlier bidders get cut out of future NFT holdings by bidders specifying the same price.

Lines of code LOC: Vulnerability details Description In GroupBuy module, users can call contribute to get a piece of the NFT pie. There are two stages in transforming the msg.value to holdings in the NFT. 1. filling at any pricesupply is not yet saturated uint256 fillAtAnyPriceQuantity =...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/19 12:0 a.m.17 views

Attacker can delay proposal rejection

Lines of code Vulnerability details Impact In OptimisticListingSeaport.rejectProposal, it revert if proposedListing.collateral if proposedListing.collateral proposedListing.collateral -= amount; Proof of Concept 1. Attacker propose at 10000 collateral at a very low price 2. Bob try to reject it b...

6.6AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/19 12:0 a.m.17 views

Not supporting fee-on-transfer token as base token

Lines of code Vulnerability details Impact In Caviar protocol, all calculations in functions add, remove, buy, sell is done using token balance of Pair contract directly. In function add, it calculates and mints LP token to sender first before transferring baseToken in. function adduint256...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/19 12:0 a.m.17 views

sellQuote might lead to unexpected reverts when returning zero

Lines of code Vulnerability details Impact the implementation of sellQuote follows the logic of getAmountOut from Uniswap V2 Library. However it doesn't add +1 as the original implementation, this could make the function return zero and lead to reverts. Proof of Concept Tools Used Manual review...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/19 12:0 a.m.17 views

Rounding down leads to breakage of the xy curve calculation

Lines of code Vulnerability details Impact When needing to calculate the inputAmount required to receive a certain amount of fractional tokens called outputAmount, we are deriving from the xy = k curve used on the Uniswap V2 protocol. Proof of Concept Some maths: The so-called curve equation is: ...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/16 12:0 a.m.17 views

Not enough margin pulled or burned from user when adding to a position

Lines of code Vulnerability details Impact When adding to a position, the amount of margin pulled from the user is not as much as it should be, which leaks value from the protocol and lowering the collateralization ratio of tigAsset. Proof of Concept In Trading.addToPosition the handleDeposit...

6.8AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/16 12:0 a.m.17 views

Wrong value of MONTH_IN_SECONDS could make it impossible to recover NFT in 7 years

Lines of code Vulnerability details Impact Constant MONTHINSECONDS has incorrect value. Instead of 1 month, it has the value of 7 months. // @dev about 30 days in a month uint256 immutable MONTHINSECONDS = 3600 24 7 30; // @audit wrong value, could allow bufferTime and recoverTimelock become too...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/16 12:0 a.m.17 views

Use safeTransferFrom instead of transferFrom for ERC721 transfers

Lines of code Vulnerability details Impact In the contract VRFNFTRandomDraw.sol every transfer of ERC721 are done with the transferFrom instead of the recommended safeTransferFrom. This transferFrom does not check whether the receiver is capable of proper handling of NFTs. Proof of Concept If the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/16 12:0 a.m.17 views

Weak PRNG

Lines of code Vulnerability details Impact Weak PRNG due to a modulo on block.timestamp, now or blockhash. These can be influenced by miners to some extent so they should be avoided. src/VRFNFTRandomDraw.sol if settings.recoverTimelock block.timestamp + MONTHINSECONDS 12 revert...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/12 12:0 a.m.17 views

Aggregated reserve amounts should be used instead of the first valid tick liquidity

Lines of code Vulnerability details Impact Liquidity can be biased on a specific side quote vs base and it is even possible a liquidity provider gets more LP tokens. Proof of Concept According to the PDF document provided, the number of LP tokens newSupply is calculated using the Table 1 as below...

6.7AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/12 12:0 a.m.17 views

TWA Price should be updated in addLiquidity, removeLiqudity and swap and migrateBinsUpStack and transferLiquidity

Lines of code Vulnerability details Impact TWA Price should be updated in addLiquidity, removeLiqudity and swap and transferLiquidity Proof of Concept I want to quote from the documentation: In Maverick, the AMM smart contract tracks the time-weighted average price TWAP with a configurable lookba...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/09 12:0 a.m.17 views

Unsafe casting from uint256 to uint8 cause wrong index of asset and feeder in NFTFloorOracle

Lines of code Vulnerability details Impact In NFTFloorPrice, it has a set of feeders and a set of assets. Feeders will set price for assets. Of coursers, with the growing NFT space, number of assets collection could be much more than 256 and because Paraspace uses median price from keepers so...

6.9AI score
SaveExploits0
Code423n4
Code423n4
added 2022/12/09 12:0 a.m.17 views

Malicious feeReceiver or saleReceiver can steal the user's refund ETH by calling the buy function multiple times in LPDA

Lines of code Vulnerability details Impact In the LPDA contract, the fee is transfered to feeReceiver and the totalSale to saleReceiver when newId == temp.finalId, meaning that the amount of tokens that were minted has been reached. However, the call to the internal end function only emits an eve...

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

[ZZ-001] PARENT_CANNOT_CONTROL and CANNOT_CREATE_SUBDOMAIN fuses can be bypassed

Severity: High Status: Has been reported to and comfirmed by Jeff ENS team Report Time: 11/28/2022 12:31 AM EST Description The fuse constraints can be violated by a malicious owner of the parent node i.e., the hacker. There are two specific consequences the hacker can cause. Suppose the subnode...

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

Reentranxcy in executeCalls()

Lines of code Vulnerability details Impact The contract first checks that the message sender is authorized and then marks the provided nonce as executed before calling the executeCalls function in CallLib. However, if CallLib.executeCalls calls back into this contract, the executeCalls function...

7.1AI score
SaveExploits0
Total number of security vulnerabilities5000