Lucene search
+L
Code423n4Most viewed

10190 matches found

Code423n4
Code423n4
•added 2023/05/15 12:00 a.m.•23 views

preBorrowHook and preRepayHook can call updateRewardTokenBorrowIndex with old borrowIndex

Lines of code Vulnerability details Impact Under normal circumstances, the user calls VToken.borrow, further calls accrueInterest to update borrowIndex, and then calls preBorrowHook to trigger updateRewardTokenBorrowIndex. But since preBorrowHook is an externl function, an attacker can directly...

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

Shortfall.sol#initialize's waitForFirstBidder and nextBidderBlockLimit too short

Lines of code Vulnerability details Impact File: Shortfall.sol 147 waitForFirstBidder = 100; 148 nextBidderBlockLimit = 10; Binance Smart Chain has a block time of around 3 seconds. This could lead to an attacker blocking other bids to bid for the token at a low price. Proof of Concept Tools Used...

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

Comptroller.sol#healAccount did not call updateRewardTokenBorrowIndex to update the reward

Lines of code Vulnerability details Impact healAccount should call updateRewardTokenBorrowIndex to calculate the reward before affecting the debt value. Proof of Concept Tools Used manual Recommended Mitigation Steps call updateRewardTokenBorrowIndex before heal account. Assessed type Other --- T...

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

Comptroller.sol#liquidateCalculateSeizeTokens assumes the same precision for vTokenBorrowed and vTokenCollateral

Lines of code Vulnerability details Impact File: Comptroller.sol 1099 uint256 exchangeRateMantissa = VTokenvTokenCollateral.exchangeRateStored; // Note: reverts on error 1100 uint256 seizeTokens; 1101 Exp memory numerator; 1102 Exp memory denominator; 1103 Exp memory ratio; 1104 1105 numerator =...

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

unstake() function: The unstake function permits the unstaking of multiple position NFTs from the same liquidity pool (LP) by the same lender. This opens the possibility for a lender to claim more Ajna token rewards than they are entitled to by staking and unstaking multiple NFTs associated with the same LP.

Lines of code Vulnerability details Impact The absence of a mechanism to prevent a lender from unstaking multiple NFTs for the same liquidity pool LP could potentially lead to the exploitation of the Ajna token reward system. A lender can mint, stake, and unstake multiple NFTs for the same LP fro...

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

Risk of Gas Limit Exceedance During Proposal Sorting

Lines of code Vulnerability details Impact The array of up to 10 proposals using the insertion sort algorithm in insertionSortProposalsByVotes function in the StandardFunding.sol contract but, if the number of proposals exceeds 10, the sorting process may cause the function to exceed the block ga...

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

Upgraded Q -> 3 from #13 [1683219131959]

Judge has assessed an item in Issue 13 as 3 risk. The relevant finding follows: L-6 Consider using OpenZeppelin’s SafeCast library to prevent unexpected errors 3 --- The text was updated successfully, but these errors were encountered: 👍 1 sathishpic22 reacted with thumbs up emoji All reactions 👍...

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

Upgraded Q -> 3 from #284 [1683017290576]

Judge has assessed an item in Issue 284 as 3 risk. The relevant finding follows: NFT tokens sent to the EthRouter contract by mistake can be drained by pool contracts. When someone calls sell, deposit or change functions on EthRouter contract, the contract gives the particular pool full approval...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/04/28 12:00 a.m.•23 views

Improper Implementation of Interface

Lines of code Vulnerability details Impact The improper implementation of interfaces can cause unexpected behavior in the contract and lead to an unwanted state of the contract. This can potentially affect several functions. Description The DNSSECImpl contract contains two internal functions,...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/04/28 12:00 a.m.•23 views

Claiming of domains will likely be locked due to a bad check in _enableNode

Lines of code Vulnerability details Description DNS name claims all go through claim which calls enableNode, which calls enableNode. Nodes are enabled recursively, from the root downwards.The following check occurs in enableNode: node = keccak256abi.encodePackedparentNode, label; address owner =...

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

Upgraded Q -> 2 from #623 [1682589089611]

Judge has assessed an item in Issue 623 as 2 risk. The relevant finding follows: L‑05 Stuck dust in SafEth contract for division When stake in the contract SafEth some WEIs could be stuck in the contract because the equation uint256 ethAmount = msg.value weight / totalWeight;, in example: ethAmou...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/04/14 12:00 a.m.•23 views

Use of _mint in ReraiseETHCrowdfund#_contribute is incompatible with PartyGovernanceNFT#mint

Lines of code Vulnerability details Impact Misconfigured receiver could accidentally DOS party Proof of Concept ReraiseETHCrowdfund.solL238 if previousVotingPower == 0 mintcontributor; - @audit-issue standard minting here ReraiseETHCrowdfund.solL374 uint256 tokenId = party.mintcontributor,...

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

ETHCrowdfundBase#_calculateRefundAmount can return too many funds to users and brick refunds

Lines of code Vulnerability details Impact Malicious user can honeypot and grief users causing loss of funds Proof of Concept ETHCrowdfundBase.solL227-L230 if fundingSplitRecipient != address0 && fundingSplitBps 0 uint96 feeAmount = amount fundingSplitBps / 1e4; amount -= feeAmount; When a user...

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

Dangerous use of setVirtualReserves(), withdraw(), and execute() leads to incorrect configuration of PrivatePool

Lines of code Vulnerability details Impact The function setVirtualReserves allows arbitrary changes to the values of virtualBaseTokenReserves and virtualNftReserves, which determine the price of the NFT trade in the pool. However, the real balance of tokens or ether in the pool is not checked, so...

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

Constant product formula is not maintained in deposit() and withdraw() functions.

Lines of code Vulnerability details Impact As constant product formula is not followed, during deposit/withdraw, actualReserves - both actual NFT and BaseToken are updated but virtualReserves are not updated. This could lead to incorrect price deviation for the trader, most reverting their...

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

ETHCrowdfundBase.sol: all funds are lost when fee recipient cannot receive ETH

Lines of code Vulnerability details Impact In the ETHCrowdfundBase contract a fundingSplitRecipient address is configured which receives a percentage of the funds in case the crowdfund is won. Neither the fundingSplitRecipient address nor the fundingSplitBps percentage can be changed. The issue i...

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

VetoProposal: user can veto multiple times so every proposal can be votoed by any user that has a small amount of votes

Lines of code Vulnerability details Impact The VetoProposal contract allows to veto proposals with the voteToVeto function. When the amount of votes collected to veto a proposal exceeds a certain threshold the passThresholdBps, which is determined upon initialization of the party, the proposal is...

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

An edge case in amplifier allows user to stake after end time, causing reward to be locked in the contract

Lines of code Vulnerability details Proof of Concept Observe that if nobody has staked after the period has ended, it's still possible for a single user to stake even though the period has ended. if firstStakeTime == 0 firstStakeTime = block.timestamp; else requireblock.timestamp if...

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

Bond max-buyer might end up buying the max buy of the next epoch

Lines of code Vulnerability details The MuteBond.deposit function allows users to specify the amount of value they want to purchase bonds for or to set maxbuy to true. If maxbuy is set to true the amount specified in the value parameter is ignored and instead the maximum amount available for...

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

User should be able to set the slippage amount willing to pay

Lines of code Vulnerability details Impact The impact of this finding is that users may be required to pay higher transaction fees than necessary due to the absence of an adjustable slippage feature. This could discourage users from using the SafEth contract and negatively impact its adoption...

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

MuteBond.sol: deposit function reverts if remaining payout is very small due to >0 check in dMute.LockTo function

Lines of code Vulnerability details Impact I will show in this report how the MuteBond.deposit function can experience a temporary DOS. The attacker or just any other user by mistake or by not knowing about it can receive a payout from the deposit function that puts the payoutTotal of the current...

6.5AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/26 12:00 a.m.•23 views

Upgraded Q -> 2 from #179 [1679871876484]

Judge has assessed an item in Issue 179 as 2 risk. The relevant finding follows: L-14 Lack of access control in setVault function leave it vulnerable to frontrunning attack --- The text was updated successfully, but these errors were encountered: All reactions...

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

Upgraded Q -> 2 from #88 [1679874611177]

Judge has assessed an item in Issue 88 as 2 risk. The relevant finding follows: L-1 Vault assignment in VaultToken can be frontrunned --- The text was updated successfully, but these errors were encountered: All reactions...

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

LiquidityPool.executePerpOrders(): dangerous payable function

Lines of code Vulnerability details Impact The contract LiquidityPool use a dangerous payable function executePerpOrders In this function, users can send ETH mistakenly. We should check the msg.value is 0 or not to void this issue. Proof of Concept function executePerpOrdersbytes calldata...

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

KangarooVault.sol : anyone can call the processWithdrawalQueue. This would hurt the user when the token price is low

Lines of code Vulnerability details Impact When the price is low, user would get less amount. Proof of Concept processWithdrawalQueue can be called by any one. function processWithdrawalQueueuint256 idCount external nonReentrant for uint256 i = 0; i availableFunds current.returnedAmount =...

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

Missing totalFunds update in LiquidityPool's OpenShort(), causing LiquidityPool token holder to lose a portion of their token value

Lines of code Vulnerability details The function openShort in LiquidityPool.sol is missing an update to totalFunds, to increase LiquidityPool funds by the collected net fees. Impact As a result of the missing increment to totalFunds, the availableFunds in the LiquidityPool will be lower. This wil...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/20 12:00 a.m.•23 views

A user can override a namespace created by another user, using the same name

Lines of code Vulnerability details Impact Let's say: Julian, and Juliet minted separate trays of characters in the Tray contract Julian approves Alice to mint a Namespace subprotocol NFT with the name Ali😀 Juliet also approves Alite to mint a Namespace subprotocol NFT with the name Ali😀 If a...

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

[H-01] User that fuse more tiles to Namespace NFT pay lesser fusing costs instead of greater

Lines of code Vulnerability details Impact User that fuses more tiles will pay lesser fusing costs to revenueAddress instead of higher cost as intended Proof of Concept Namespace.solL110-L114 /Namespace.sol 110: function fuseCharacterData calldata characterList external 111: uint256 numCharacters...

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

SWC-101 Artihmetic Overflow test/LotteryInvariantChecks.t.sol testBuyClaimFinalize()

Lines of code Vulnerability details Impact Integer overflow on finalizeDraw function. Failing tests: Encountered 1 failing test in test/LotteryInvariantChecks.t.sol:LotteryInvariantChecksTest FAIL. Reason: Arithmetic over/underflow Counterexample:...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/09 12:00 a.m.•23 views

Wrong reward calculation if the reward token doesn't have 18 decimals

Lines of code Vulnerability details Impact If the rewardToken has less than 16 decimals, users will not be able to claim the correct value of their prize. Try not to think it will be DAI only. We will probably use DAI for the first product, but think more in general approach @0xluckydev5064 It is...

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

The design defect of the ActivePool rehypothecation mechanism, ReaperVaultV2 administrators have too much authority and have the conditions and motives to do evil, so make users lack trust in the ETHOS system (crisis of trust)

Lines of code Vulnerability details Impact In the design logic of the current system, ActivePool holds all the collaterals of active troves and deposits part of them in ReaperVaultV2 for re-mortgaging. If the deposit and withdraw functions of ReaperVaultV2 revert, Core functions such as borrowing...

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

Losses are double counted if there currently locked profits

Lines of code Vulnerability details Impact Losses are double counted and vault participants lose funds Proof of Concept if roi 0 vars.gain = uint256roi; vars.fees = chargeFeesvars.stratAddr, vars.gain; strategy.gains += vars.gain; ... // Profit is locked and gradually released per block // NOTE:...

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

Inexistent Prevention of Duplicates

Lines of code Vulnerability details Impact The CollateralConfig::initialize function which instantiates the contract's state does not prevent duplicate collateral entries from being specified which can occur undetected. If the system is setup with duplicate collateral entries, the Ethos Core...

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

Incorrect Price-Feed Failsafe System

Lines of code https://github...

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

Max approve will not work for tokens that do not support it

Lines of code Vulnerability details Impact Max approve does not work for all tokens types Proof of Concept Inside the ReaperBaseStrategyv4 contract initializers, the contract is doing a max approve for the vault over the underlying asset, however this will not work for all tokens types Tools Used...

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

ERC20 approve can fail for some tokens

Lines of code ReaperBaseStrategyv4.solL74 Vulnerability details Summary Some tokens like USDT do not work when changing the allowance from an existing non-zero allowance value. They must first be approved by zero and then the actual allowance must be approved. approve reverts for tokens like USDT...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/03/01 12:00 a.m.•23 views

Upgraded Q -> 2 from #795 [1677634099280]

Judge has assessed an item in Issue 795 as 2 risk. The relevant finding follows: 04 VALUES OF fees ARE NOT CHECKED IN Vault.initialize FUNCTION When calling the following Vault.initialize function, the values of fees are not checked. It is possible that these fees are set to be above 1e18 when...

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

KIBToken._transfer() did not correctly handle the case where from is the same as to

Lines of code Vulnerability details Impact Hackers can obtain any number of KIB tokens out of thin air. Using the stolen KIB tokens, the hacker could steal all the bonds in the KUMASwap by calling KUMASwap.buyBond, or steal all the deprecationStableCoin in the KUMASwap by calling...

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

Upgraded Q -> 3 from #71 [1676966386580]

Judge has assessed an item in Issue 71 as 3 risk. The relevant finding follows: L-04 onlyMinter modifier is not working as expected Description onlyMinter can be bypasssed by anyone due to an invalid check: modifier onlyMinter msg.sender == minterAddress; ; Thus, everyone can mint tokens: functio...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/02/20 12:00 a.m.•23 views

RewardThrottle.setTimekeeper: If changing the timekeeper causes the epoch to change, it will mess up the system

Lines of code Vulnerability details Impact RewardThrottle.setTimekeeper allows POOLUPDATERROLE to update the timekeeper when RewardThrottle is active, function setTimekeeperaddress timekeeper external onlyRoleMaltPOOLUPDATERROLE, "Must have pool updater privs" requiretimekeeper != address0, "Not...

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

RewardThrottle.populateFromPreviousThrottle may be exposed to front-run attack

Lines of code Vulnerability details Impact RewardThrottle.populateFromPreviousThrottle allows ADMINROLE to use epochData from previousThrottle to populate state from activeEpoch to epoch in current RewardThrottle. function populateFromPreviousThrottleaddress previousThrottle, uint256 epoch extern...

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

Mitigation of M-03: Issue not fully mitigated

Lines of code Vulnerability details Original issue: M-03: Baited by redemption during undercollateralization no issuance, just transfer Explanation This is basically a dupe of M-04 as commented by the judge, I elaborated on this on the M-04 mitigation. TL;DR - using a boolean parameter to agree t...

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

Transferring the allotAmount reward to MultisigManager leads to the loss of reward when no wallet is enabled in the RewardsPool

Lines of code Vulnerability details Impact Transferring the allotAmount reward to MultisigManager leads to the loss of reward Proof of Concept If we refers to the original M-21 finding: code-423n4/2022-12-gogopool-findings143 Division by zero error can block RewardsPoolstartRewardCycle if all...

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

Mitigation Confirmed for Mitigation of H-06 Issue mitigated

C4 issue H-06: MinipoolManager: node operator can avoid being slashed Comments In the original implementation, there were a few scenarios where malicious node operators can avoid being slashed. Mitigation PR 41 This PR includes mitigation for various issues H-03, H-06, M-13. Just focusing on the...

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

AdapterBase.accruedPerformanceFee does not work with tokens with low decimals

Lines of code Vulnerability details The performance fees are only accrued when shareValue highWaterMark. 529: function accruedPerformanceFee public view returns uint256 530: uint256 highWaterMark = highWaterMark; 531: uint256 shareValue = convertToAssets1e18; //@audit M: this does not work for...

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

MultiRewardStaking claimRewards() reentrancy for ERC-777 reward tokens

Lines of code Vulnerability details Impact A hacker can drain an ERC-777 reward token funds via reentrancy. This is because in the claimRewards function, the transfer of the reward token which triggers the hacker's ERC-777 hook takes place before setting accruedRewardsuserrewardTokensi to zero...

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

Upgraded Q -> 3 from #619 [1675724566035]

Judge has assessed an item in Issue 619 as 3 risk. The relevant finding follows: The function withdrawRemainingTokens can be changed in a safer way to handle the withdraw from the owner and the protocol fee as well. This prevent risks allocated with the protocol fees. By the docs this function is...

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

Upgraded Q -> 2 from #854 [1675461747744]

Judge has assessed an item in Issue 854 as 2 risk. The relevant finding follows: When the protocol is paused, all the multisigs are disabled:, However, it is still possible to call startRewardsCycle in the RewardsPool, however, the execution will revert because the enabled count is 0: --- The tex...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/02/01 12:00 a.m.•23 views

Possibly Susceptible to Reentrancy Attack

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. No protection against reentrancy attacks, which could allow an attacker to exploit the contract's logic by calling functions in the contract before the original call is completed. Proof of Concept To...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/02/01 12:00 a.m.•23 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
Total number of security vulnerabilities5000