Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/09/27 12:0 a.m.11 views

Reward sandwiching in VotiumStrategy

Lines of code Vulnerability details Summary The reward system in VotiumStrategy can be potentially gamed by users to enter just before rewards are deposited and request an exit after that. Depending on the withdrawal queue, users may exit as early as the next epoch and avoid waiting the normal 16...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.7 views

VotiumStrategyCore.applyRewards() leaves unlimited allowance on tokens.

Lines of code Vulnerability details Description VotiumStrategyCore.applyRewards gives unlimited allowance on its claimed rewards tokens. It is not thereafter reset and there is not even any way to reset the allowance. It is dangerous to trust the spenders indefinitely in case they are compromised...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.6 views

Missing deadline check for AfEth actions

Lines of code Vulnerability details Summary AfEth main actions execute on-chain swaps and lack an expiration deadline, which enables pending transactions to be maliciously executed at a later point. Impact Both AfEth deposits and withdrawals include on-chain swaps in AMM protocols as part of thei...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.7 views

VotiumStrategy.requestWithdraw() does not account for immediately possible withdrawals

Lines of code Vulnerability details Impact A user might be given an unnecessarily late withdrawal epoch. VotiumStrategy.requestWithdraw might revert altogether. Proof of Concept VotiumStrategy.requestWithdraw finds the epoch at which withdrawal is possible by the following logic: , uint256...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.10 views

Withdrawal requests do not check if the amount of unlockable CVX is sufficient for withdrawals

Lines of code Vulnerability details Bug Description In AfEth.sol, whenever a user calls requestWithdraw to queue a withdrawal, the time that they can withdraw is determined by withdrawTime: AfEth.solL175-L176 function requestWithdrawuint256 amount external virtual uint256 withdrawTimeBefore =...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.11 views

VotiumStrategy.price() does not validate Chainlink response

Lines of code Vulnerability details Impact AfEth.deposit may mint an incorrect amount of afEth. VotiumStrategy.price may return an incorrect price of vAfEth. AfEth.price may return an incorrect price of afEth. Proof of Concept VotiumStrategy.price function price external view override returns...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.8 views

Incorrect AfEth.price() calculation

Lines of code Vulnerability details Impact AfEth.price may be calculated as too low. Proof of Concept AfEth.requestWithdraw does not burn the afEth but only transfers it to itself. Hence the withdrawRatio is calculated using only the free supply of afEth: AfEth.solL180-L185 // ratio of afEth bein...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.13 views

price() in AfEth.sol doesn't take afEth held for pending withdrawals into account

Lines of code Vulnerability details Bug Description In AfEth.sol, the price function returns the current price of afEth: AfEth.solL133-L141 function price public view returns uint256 if totalSupply == 0 return 1e18; AbstractStrategy vEthStrategy = AbstractStrategyvEthAddress; uint256...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.9 views

VotiumStrategy withdrawal queue fails to consider available unlocked tokens causing different issues in the withdraw process

Lines of code Vulnerability details Summary Withdrawals in VotiumStrategy are executed in queue since CVX tokens are potentially locked in Convex. However, the implementation fails to consider the case where unlocked assets are already enough to cover the withdrawal, leading to different issues...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.18 views

Intrinsic arbitrage from price discrepancy

Lines of code Vulnerability details Impact The up to 2 % price discrepancy from Chainlink creates an intrinsic arbitrage. Especially, it makes withdrawals worth more than deposits in the sense that one can immediately withdraw more than just deposited. Proof of Concept When depositing ETH into...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.14 views

AfEth collaterals cannot be balanced after ratio is changed

Lines of code Vulnerability details Summary The AfEth ratio between the collaterals can be modified but there is no direct way to balance the assets to follow the new ratio. Impact The AfEth contract contains a configurable parameter ratio that indicates the intended balance between the two...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.18 views

Users can deposit() even when Chainlink's price feed for CVX is stale

Lines of code Vulnerability details Bug Description In VotiumStrategy.sol, the price of vAfEth is determined by the price function: VotiumStrategy.solL31-L33 function price external view override returns uint256 return cvxPerVotium ethPerCvxfalse / 1e18; As seen from above, it calls ethPerCVX wit...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.14 views

Inflation attack in VotiumStrategy

Lines of code Vulnerability details Summary The VotiumStrategy contract is susceptible to the Inflation Attack, in which the first depositor can be front-runned by an attacker to steal their deposit. Impact Both AfEth and VotiumStrategy acts as vaults: accounts deposit some tokens and get back...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.9 views

Lack of slippage protection for depositRewards() in AfEth.sol makes it susceptible to sandwich attacks

Lines of code Vulnerability details Bug Description In VotiumStrategyCore.sol, the buyCvx function calls exchangeunderlying of Curve's ETH / CVX pool to buy CVX: VotiumStrategyCore.solL233-L240 ICrvEthPoolCVXETHCRVPOOLADDRESS.exchangeunderlying value: ethAmountIn 0, 1, ethAmountIn, 0 // this is...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.12 views

cvxPerVotium() calculation will return zero if all CVX tokens are pending withdrawal as obligations

Lines of code Vulnerability details Summary The implementation of cvxPerVotium contains an edge case that causes it to return an invalid zero value price. Impact The cvxPerVotium function present in the VotingStrategy contract is used to measure the number of held CVX tokens per vAfEth. 144:...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.15 views

AfEth deposits could use price data from an invalid Chainlink response

Lines of code Vulnerability details Summary The current price implementation for the VotiumStrategy token uses a potentially invalid Chainlink response. This price is then used to calculate the price of AfEth and, subsequently, the amount of tokens to mint while depositing. Impact The price of...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.19 views

Missing circuit breaker checks in ethPerCvx() for Chainlink's price feed

Lines of code Vulnerability details Bug Description The ethPerCvx function relies on a Chainlink oracle to fetch the CVX / ETH price: VotiumStrategyCore.solL158-L169 try chainlinkCvxEthFeed.latestRoundData returns uint80 roundId, int256 answer, uint256 / startedAt /, uint256 updatedAt, uint80 /...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.20 views

Missing slippage control while depositing rewards in SafEth and VotiumStrategy

Lines of code Vulnerability details Summary Deposits to SafEth and VotiumStrategy coming from rewards lack slippage control, making them susceptible to sandwich attacks by MEV bots, which can result in a loss of funds for the protocol. Impact Rewards coming from the VotiumStrategy contract are...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.13 views

sellCVX(0) reverts

Lines of code Vulnerability details Impact A withdrawal cannot be finalised if requested at a time when AfEth had only safEth, and that owed share of safEth is permanently lost. Proof of Concept It is possible that AfEth holds at most dust amounts of vAfEth if ratio = 100 %. The amounts of vAfEth...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.12 views

Zero amount withdrawals of SafEth or Votium will brick the withdraw process

Lines of code Vulnerability details Summary Withdrawals of amount zero from both SafEth and VotiumStrategy have issues downstream that will cause the transaction to revert, potentially bricking withdrawals from being executed. Impact Withdrawals in AfEth undergo a process to account for any...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.10 views

No slippage protection on rewards deposits

Lines of code Vulnerability details Impact Rewards deposit is not slippage protected and susceptible to MEV-attacks. Proof of Concept VotiumCoreStrategy.buyCvx is not slippage protected, as even acknowledged by the comment in ICrvEthPoolCVXETHCRVPOOLADDRESS.exchangeunderlying value: ethAmountIn 0...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.8 views

Sole depositor in the VotiumStrategy contract can inflate cvxPerVotium() to steal subsequent deposits

Lines of code Vulnerability details Bug Description In VotiumStrategyCore.sol, the cvxInSystem function returns the total amount of CVX in the protocol: VotiumStrategyCore.solL133-L138 function cvxInSystem public view returns uint256 uint256 total, , , = ILockedCvxVLCVXADDRESS.lockedBalances...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.19 views

AfEth price calculation doesn't factor locked tokens held in contract balance

Lines of code Vulnerability details Summary When withdrawals are enqueued in AfEth, the implementation will remove the tokens from the caller and lock these in the contract until the withdrawal is made effective. These tokens still count in the supply, and must not be considered during price...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.8 views

Unsafe use of balanceOf(address(this))

Lines of code Vulnerability details Impact AfEth.deposit can be bricked. Proof of Concept AfEth makes use of its own balance of afEth as a temporary store of afEth for withdrawal requests. On requestWithdraw afEth is transferred to the AfEth contract and these are then burned on withdraw. The...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.13 views

Lack of access control and value validation in the reward flow exposes functions to public access

Lines of code Vulnerability details Summary Some functions that are part of the Votium reward flow are left unprotected and can be accessed by anyone to spend resources held by the contract. Impact Rewards coming from the Votium protocol are claimed and compounded back in AfEth. This flow consist...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.10 views

H-03 MitigationConfirmed

Lines of code Vulnerability details In the previous implementation After shutdown, checkpoints are stopped reward.rewardintegralforuser No updates resulted in new users getting more rewards and possible theft of rewards. Mitigation PR 930 Modify that checkpoints are already executed, just not cal...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.15 views

Missing slippage control when directly interacting with the VotiumStrategy contract

Lines of code Vulnerability details Summary Direct deposits and withdrawals within VotiumStrategy lack any slippage controls, which opens up the possibility of sandwich attacks and Miner Extractable Value MEV exploits. Impact Interactions in the AfEth protocol often require the exchange of ETH fo...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.8 views

VotiumStrategy.requestWithdraw() doesn't check whether totalLockedBalancePlusUnlockable is already enough to cover withdrawal being requested

Lines of code Vulnerability details Vulnerability Details The totalLockedBalancePlusUnlockable is being used to calculate an amount that's ready to be withdrawn. In case, if totalLockedBalancePlusUnlockable = cvxUnlockObligations already before iterating over the lockedBalances, the withdrawal...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/27 12:0 a.m.16 views

M-05 MitigationConfirmed

Lines of code Vulnerability details In the previous implementation when stakingContract.totalAllocPoint = 0 stakingContract.withdraw and stakingContract.deposit will div 0 , revert This results in StargateRewardableWrapper no longer being able to execute StargateRewardableWrapper.withdraw The...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2023/09/26 12:0 a.m.11 views

Potential rewards stealing by manipulating CVX/ETH pool

Lines of code Vulnerability details Vulnerability Details Upon claiming Votium rewards, applyRewards is intended to be invoked in order to exchange the tokens for eth and put the eth received back into the strategies. Based on the current ratio it either stakes the amount into safETH or obtains...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2023/09/26 12:0 a.m.16 views

It might not be possible to applyRewards(), if an amount received is less than 0.05 eth

Lines of code Vulnerability details Vulnerability Details Upon claiming Votium rewards, applyRewards is intended to be invoked bi-weekly in order to exchange the tokens for eth and put the eth received back into the strategies. Based on the current ratio it either stakes the amount into safETH or...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/09/25 12:0 a.m.10 views

Stale cvx price can be used while depositing

Lines of code Vulnerability details Impact Stale cvx price can be used while depositing Proof of Concept When user deposits, then price of afEth token is calculated. It's needed to know how many tokens user will receieve. This price consists of safEth price and vEth price. This is how price is...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/25 12:0 a.m.17 views

Attacker can mint afEth with cheaper price

Lines of code Vulnerability details Impact Attacker can mint afEth with cheaper price and then withdraw. Proof of Concept When user would like to buy some amount of afEth tokens, then price is calculated. This price will be used to calculate amount of tokens to mint. function price public view...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/25 12:0 a.m.9 views

VotiumStrategyCore.applyRewards can be sandwhiched

Lines of code Vulnerability details Impact VotiumStrategyCore.applyRewards can be sandwhiched, so users rewards will be lost. Proof of Concept VotiumStrategyCore.applyRewards will be used in order to swap all rewards to eth and then distribute eth to the safEth or vEth. The problem here is that...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/25 12:0 a.m.12 views

VotiumStrategyCore.applyRewards can be sandwhiched to make profit

Lines of code Vulnerability details Impact VotiumStrategyCore.applyRewards can be sandwhiched to make profit. Proof of Concept VotiumStrategyCore.applyRewards function will swap all rewards of contract into eth and then stake them into safEth or vEth contract. As result price of afEth token will...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/25 12:0 a.m.6 views

VotiumStrategy.withdrawTime doesn't expect that balance can be already unlocked

Lines of code Vulnerability details Impact VotiumStrategy.withdrawTime doesn't expect that balance can be already unlocked. As result user can wait more time to witdraw. Proof of Concept When user wants to withdraw, then he needs to initiate requestWithdraw. As some part of funds are locked as cv...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/25 12:0 a.m.17 views

Last stakers may not receive funds back

Lines of code Vulnerability details Impact Last stakers may not receive funds back. Proof of Concept When user wants to withdraw, then he needs to initiate requestWithdraw. As some part of funds are locked as cvx token inside vlcvx that means that they should be withdrawn. When you lock cvx then...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/09/25 12:0 a.m.11 views

AfEth withdrawing will not work when ratio will be 0

Lines of code Vulnerability details Impact AfEth withdrawing will not work when ratio will be 0. It will be not possible to withdraw. Proof of Concept Any ratio for the 2 tokens of afEth can be set by owner. AfEth.withdraw function will not work in case if ratio will be 0, which means that safEth...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/22 12:0 a.m.21 views

Leaky faucet

Lines of code Vulnerability details Impact Leaking is bad. Proof of Concept Turn off faucet, it leaks! Tools Used Hands Recommended Mitigation Steps Teflon tape. Assessed type Other --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/21 12:0 a.m.17 views

Upgraded Q -> 2 from #506 [1695291399781]

Judge has assessed an item in Issue 506 as 2 risk. The relevant finding follows: L‑01 The admin wont be able to burn rUSDY if the address is blacklisted/sanctioned and not on the allowlist The burn function in rUSDY.sol allows the admin to seize rUSDY if the user is not legally allowed to own it...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/09/20 12:0 a.m.9 views

Upgraded Q -> 2 from #86 [1695205999296]

Judge has assessed an item in Issue 86 as 2 risk. The relevant finding follows: QA-02. BondingManager.withdrawFees doesn’t create checkpoint --- The text was updated successfully, but these errors were encountered: All reactions...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/14 12:0 a.m.11 views

Blocking assets/shares in escrow

Lines of code Vulnerability details Impact An investor can lose a part of assets or shares due to their blocking in escrow. Proof of Concept Suppose the user decided to invest an amount of assets which is more than typeuint128.max. This can be done by calling the requestDeposit function several...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/14 12:0 a.m.12 views

The maxMint check should be cumulatively applied to ensure it's effectiveness

Lines of code Vulnerability details Impact Circumvention of the maximum minting restriction, since all a receiver need to do is not specify the whole amount of tokens in one attempt and then claim more than the maximum amount Proof of Concept Take a look at LiquidityPool.solL145-L157 /// @notice...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/09/14 12:0 a.m.8 views

SafeTransferLib's safeApprove() does not set allowance 0 first which would lead to the escrow encountering issues when dealing with tether's USDT or tokens like it.

Lines of code Vulnerability details Impact Medium... a number of features within the protocol will not work if an approval reverts in the escrow or anywhere else NB: Report mainly focuses on the usage of the SafeTransferLib's safeApprove, but bug is attached to the underlying call made to approve...

6.9AI score
Exploits0
Code423n4
Code423n4
added 2023/09/14 12:0 a.m.6 views

New Ward Can Revoke Admin Access

Lines of code Vulnerability details Impact A Newly added ward can remove all the wards from the system, including the admin one. Proof of Concept There is not a mechanism to prevent newly added wards from removing everyone else access' to the contracts, including the admin. Tools Used Manual...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/09/14 12:0 a.m.10 views

users can mint TT tokens without locking/depositing any currency tokens

Lines of code https://github.com/code-423n4/2023-09-centrifuge/blob/512e7a71ebd9ae76384f837204216f26380c9f91/src/InvestmentManager.solL427-L441...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/09/14 12:0 a.m.11 views

Some Outgoing functions are not supported on the gateway

Lines of code Vulnerability details Impact The gateway serves both outgoing and incoming calls, All incoming calls should have corresponding outgoing calls and vice versa However, some incoming calls like addPool , allowPoolCurrency , addTranche have no corresponding calls via the gateway contrac...

6.8AI score
Exploits0
Code423n4
Code423n4
added 2023/09/14 12:0 a.m.11 views

The price update timestamp doesn't get checked, allowing for the use of stale prices

Lines of code Vulnerability details Impact It allows for the use of stale prices in cases where they will either damage the protocol or the user. Proof of Concept The protocol has a price oracle system where the price gets updated by an account with a privileged role by calling updatePrice...

6.7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/14 12:0 a.m.10 views

addPauser should be a two-step process in PauseAdmin.sol

Lines of code Vulnerability details Impact Adding new pauser should me two-step proccess. The identified issue pertains to the absence of a two-step process for adding a new pauser in the smart contract. This vulnerability could potentially allow an unauthorized entity to gain control over pausin...

7AI score
Exploits0
Code423n4
Code423n4
added 2023/09/14 12:0 a.m.10 views

Incorrent approval for escrow tokens, not allowing to burn on redeem

Lines of code Vulnerability details Impact Liquidity pool approval for burning escrow tokens is not correctly assigned when pool is deployed on PoolManager deployLiquidityPool lines: EscrowLikeescrow.approveliquidityPool, addressinvestmentManager, typeuint256.max; // Approve investment manager on...

7.1AI score
Exploits0
Total number of security vulnerabilities10190