Lucene search
+L
Code423n4Recent

10190 matches found

Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•21 views

Improperly tracking asset reserve for WETH

Lines of code Vulnerability details Impact Function RdpxV2Corewithdraw lets delegate owners withdraw their unused WETH. However, withdrawn amount is not deducted from totalWethDelegated, which causes WETH asset reserve tracked improperly. The impacts could be: 1. Function sync gets reverted when...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•15 views

getLpPriceInEth and getRdpxPriceInEth return prices in 1e18 decimals, but we use it as 1e8 decimals

Lines of code Vulnerability details Impact Wrong decimals/price if we use RdpxEthOracle.sol as the oracle. Proof of Concept rdpx/eth oracle is not in the scope of this audit, so we can assure they are correct and only check if we use the API right. According to...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•38 views

the perpetualVaultLP.sol is vulnable by flashloan attack

Lines of code Vulnerability details impact The perpVaultLp contract is susceptible to a flash loan attack. An attacker can exploit the vulnerability by executing flash loan transactions using both the deposit and redeem functions. This allows the attacker to acquire extra rdpx tokens and increase...

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

EIP-2938 Breaks Whitelist Logic

Lines of code Vulnerability details Impact Unauthorized contracts can bypass whitelistedContractsmsg.sender due to EIP-2938. Proof of Concept In the function isEligibleSender it checks if msg.sender != tx.origin... but when EIP-2938 a.k.a Account Abstraction is fully implemented it will be possib...

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

Incorrect price precision in RdpxV2Core

Lines of code Vulnerability details Impact The core contract expects the price oracle to return 1e8 precision, but its actually 1e18. This will cause heavily incorrect results from all usages of the price. Proof of Concept The RdpxV2Core.getRdpxPrice function is meant to return 1e8 precision:...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•15 views

If funding duration is update after few epoch, it will completely brick the perPetualAtlanticVault.sol

Lines of code Vulnerability details Impact perpetualAtlanticVault.sol functionality is dependent upon the funding duration which can be changed by the admin and can lead to bricking the whole calculations in the perpetualAtlanticVault.sol Proof of Concept Initially funding duration is set to seve...

7.2AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•18 views

ERC721 tokens are blocked in rdpxV2Core contract

Lines of code Vulnerability details The admin has the right to recover an ERC721 token in the UniV3LiquidityAMO contract. He needs to call recoverERC721 and provide the tokenAddress and tokenid values, where the token with tokenid will be transferred to the rdpxV2Core contract...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•11 views

Malicious users can manipulate the withdrawRound to withdraw their stake before the unbonding period is over.

Lines of code Vulnerability details Impact Disruption the normal bonding incentives and mechanisms in the protocol. Validators or transcoders could withdrew unexpectedly, preventing governance responses to bonded token changes. Proof of Concept The withdrawStake function first checks if the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•11 views

bonding on behalf of a new delegator sets the start round to the current round + 1, but the assumed future round may never actually start if rounds get stuck

Lines of code Vulnerability details Impact • If rounds get stuck and currentRound + 1 never happens, the new delegator will never be able to claim earnings. Their startRound will be set to a future round that doesn't exist. • This prevents them from claiming earnings accrued from their staked...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•12 views

missing in calculation parameter issue in Earnings Pool

Lines of code Vulnerability details Impact here is the vulnerable part in code : function getLastTranscoderRewardsEarningsPooladdress transcoder, uint256 round internal view returns uint256 rewardRound, EarningsPool.Data memory pool BondingCheckpoint storage bond = getBondingCheckpointAttranscode...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•81 views

arbitrum block.number refers to L1 block number, not L2 block number when determining the round

Lines of code Vulnerability details Impact arbitrum block.number refers to L1 block number, not L2 block number Proof of Concept In the current implementation, the round manager use block.number to determine the round However, according to the block.number in arbitrum refers to ethereum mainnet...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•11 views

Inaccurate Bonded Amount Event Emission

Lines of code Vulnerability details Impact in here : if previous.bondedAmount != current.bondedAmount emit DelegatorBondedAmountChangedaccount, previous.bondedAmount, current.bondedAmount; the function checks if the previous.bondedAmount is not equal to current.bondedAmount before emitting the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 views

Underflow in updateTranscoderWithFees can cause corrupted data and loss of winning tickets.

Lines of code Vulnerability details Summary updateTranscoderWtihFees can underflow because MathUtils is used instead of PreciseMathUtils. Proof of Concept According to LIP-92 the initial treasuryRewardCutRate will be set to 10%. treasuryRewardCutRate is set with the...

6.6AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 views

Lack of Input Validation and Error Handling

Lines of code Vulnerability details Impact In the slashTranscoder function, the parameters slashAmount and finderFee are directly used for computation without any validity checks. This design overlooks several key issues: There's no check to see if slashAmount or finderFee are within logical...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 views

Malicious actor can remove anyone's vote

Lines of code Vulnerability details Impact The GovernorCountingOverridable contract of the protocol is used to record the governance votes for different proposals and it allows the users to delegate their voting power to anyone. The handleVoteOverrides in the GovernorCountingOverridable contract...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•22 views

Unprotected initialize functions can front-run by MEV or by an Attacker

Lines of code Vulnerability details Vulnerability Detail It should be avoided that the implementation of proxy contracts can be initialized by third parties. This can be the case if the initialize function is unprotected. Since the implementation contract is not meant to be used directly without ...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•7 views

Any call to settle a bond can be reverted by donating 1 WEI to the VaultLP contract

Lines of code Vulnerability details Impact Any settle call can be reverted, thus disallowing the protocol from settling any options and from releasing the locked tokens. Proof of Concept The protocol admin calls settle on an option when its price gets bellow the strike price, at which the option ...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•10 views

Users are able to front-run settlements to avoid loss

Lines of code Vulnerability details Impact A user is able to front-run the call to settle function in to avoid paying the loss. settle is called by Admin which is a public function, When this functions is called the transaction will appear in the mem pool. A user may then call redeem from LP Vaul...

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

Lose due to rounding. Use more precise library for mathematical operations

Lines of code Vulnerability details Impact The mulDivDown function, assumed to be from FixedPointMathLib, is likely designed to multiply two numbers and then divide the result, rounding down any remainders. This rounding down can result in minor discrepancies when converting between assets and...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•14 views

Missed approving to UniswapV2Router

Lines of code Vulnerability details Impact The contract should have already granted an allowance of at least minamountOfWeth for the input token. This step is missing during the UniswapV2Router call within the lowerDepeg function. // @audit msg.sender should have already given the router an...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•18 views

Calling withdraw on a delegated amount of WETH doesn't subtract from totalWethDelegated

Lines of code Vulnerability details Impact The contract's WETH amount gets permanently bricked. Proof of Concept A user can call addToDelegate and give WETH, that other people can use for bonding with their rDPX in exchange for a certain percentage appointed by the delegatee. Delegate memory...

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

totalWethDelegated does not decrease in withdraw can cause DOS

Lines of code Vulnerability details Impact The accounting for total weth delegated increases when adding, but not withdrawing. This allows anyone to inflate this value by repeatedly adding and withdrawing. This again will cause DOS of the bonding mechanism. Proof of Concept RdpxV2Core.addToDelega...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•20 views

Deployment issues with chains not compatible with Shanghai hardfork

Lines of code Vulnerability details Impact Besides issues with deployment &maintenance contracts; A Big Issues is quoted below from an audit finding... "This could also become a problem if different versions of Solidity are used to compile contracts for different chains. The differences in byteco...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•6 views

The order of decreasing total stake for the old delegate and increasing for the new delegate could lead to issues if one reverts but not the other.

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Proof of Concept The potential issue is: decreaseTotalStake succeeds in decreasing the old delegate's stake increaseTotalStake reverts and does not increase the new delegate's stake This would incorrect...

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

A difference in the rDPX price between the oracle and DEXs used for trading can cause more slippage than expected

Lines of code Vulnerability details Impact The protocol will experience much higher slippage than supposed to due to using the wrong price in calculating the amount after slippage. Proof of Concept The protocol executes swaps on Uniswap and Curve. The issue arises due to the protocol using its ow...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•16 views

Attacker can DOS the ability of the protocol to exercise their options

Lines of code Vulnerability details Impact When an option is ITM, the admin can call the settle function of the RdpxV2Core contract, which will call the settle function of the PerpetualAtlanticVault contract. This function checks that the WETH balance of the PerpetualAtlanticVaultLP contract is...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•12 views

The utilization of strict equality within the subtractLoss function is susceptible to straightforward manipulation by a potential attacker.

Lines of code Vulnerability details Impact If this equality condition is intentionally disrupted, it will result in the failure of all settlement processes carried out using the settle function. Proof of Concept Tools Used Manual review Recommended Mitigation Steps - collateral.balanceOfaddressth...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•19 views

Regular bonding incorrectly purchases a reduced amount of Put options due to discount

Lines of code Vulnerability details During rDPX bonding, rdpxV2Core will purchase put options for the rDPX that are used for minting DPXETH. This is for hedging against rDPX price drop to protect the DPXETH peg. The amount of put options to purchase is equivalent to the amount of rDPX that are us...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•14 views

RDPX price manipulation benefit for attacker via a Flashloan attack

Lines of code Vulnerability details Impact As the RdpxV2Core contract burns RDPX tokens, a malicious attacker can benefit from a price manipulation attack using a flashloan attack Proof of Concept The function bond in the RdpxV2Core contract is a primary function to enter the protocol and bond...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•13 views

Zero Redemption Amount in RdpxDecayingBonds Contract

Lines of code Vulnerability details Impact The redeem function, as described, checks whether the assets to be redeemed assets are not zero. This check is in place to ensure that a user isn't redeeming a non-zero amount of rdpxAmount tokens in exchange for zero assets. Such a check is essential to...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•7 views

The function does not restrict who can call it beyond the check for the delegator's status

Lines of code Vulnerability details Impact Access Control: The function does not restrict who can call it beyond the check for the delegator's status i.e., it must be Bonded. If there are additional constraints on who should be able to call this function e.g., only the original delegator, those...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•12 views

BondManager.updateTranscoderWithFees wrong decimal multiplication. Function always revert due to underflow

Lines of code Vulnerability details BondingManager.sol have 2 mathUtils libraries, MathUtils use 1e6 as precision while PreciseMathUtils use 1e27 as precision. Some variable use MathUtils while other use PreciseMathUtils which might cause confusion. It happen with treasuryRewardCutRate variable...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•16 views

Overwriting rdpxAmount Without Checks

Lines of code Vulnerability details Impact The decreaseAmount function, specifically the line bondsbondId.rdpxAmount = amount;. This vulnerability allows overwriting the rdpxAmount without any checks or backups, which can result in irreversible data loss. function decreaseAmount uint256 bondId,...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•11 views

Only admin can call peg functions

Lines of code Vulnerability details Impact Only admin multisig can call peg functions. This might delay re-pegs. Proof of Concept Both upperDepeg and lowerDepeg are meant to be called by any EOA or whitelisted contracts, but due to the onlyRole modifier, only the admin can currently call these...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•15 views

.The _newPosPrev/_newPosNext hints do not fully prevent invalid ordering when decreasing a delegate's stake.

Lines of code Vulnerability details Impact The contract could incorrectly deactivate or reward transcoders based on the invalid pool order. Proof of Concept When decreasing a delegate's stake with decreaseTotalStake, the contract calls transcoderPool.updateKey to update the delegate's position in...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•12 views

Incorrect slippage calculation in _curveswap function

Lines of code Vulnerability details Impact swaps will fail or execute with higher slippage than intended. Proof of Concept In curveSwap function of RdpxV2Core contract , getEthPrice should be used in place of getDpxEthPrice, and getDpxEthPrice should be used in place of getEthPrice. / @notice...

7.1AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•14 views

Potential Over-redemption Vulnerability in redeem Function

Lines of code Vulnerability details Impact In the redeem function, when a third party is using their allowance to redeem shares on behalf of an owner, there exists a potential scenario where the third party could redeem more than originally intended by the owner. Proof of Concept This is how the...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 views

ERRORNEOUS RETURN VALUE PROVIDED BY THE UniV2LiquidityAmo.getLpTokenBalanceInWeth FUNCTION DUE TO PRECISION ERROR

Lines of code Vulnerability details Impact The UniV2LiquidityAmo.getLpTokenBalanceInWeth function is used to return the LP token balance of the contract in weth. It calls the getLpPrice function which is expected to return the LP price in 1e8 precision. getLpPrice function calls the...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 views

Approve race condition when calling approveContractToSpend()

Lines of code Vulnerability details Impact Malicious allowance spenders will be able to spend more than the protocol intended. Proof of Concept When modifying the approved allowance of a spender address there is an issue with the spender address front-running the modification transaction and...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•12 views

[M-01] Transcoder can front-run slasher to avoid getting slashed and continue voting

Lines of code Vulnerability details Impact In BondingManager.slashTranscoder, verifier can slash transcoderdelegator bonded amounts. However, this can be easily front runned via BondingManager.unbondWithHint by reducing bonded amount to avoid slashing via underflow and keep bonded position...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•10 views

Options could not be settled, causing liquidity get locked in vault

Lines of code Vulnerability details Impact In settle logics, RdpxV2Core contract calls to PerpetualAtlanticVault.settle to update funding, burn option tokens and do some token settles. However, the logic could be reverted in the call...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•6 views

on hitting ceiling, the Bonds Manager re configures to stop collecting treasure cut, but does not have inverse logic

Lines of code Vulnerability details Impact The bonds manager configures itself to stop collecting treasury reward cut, if the balance in treasury is above the configured ceiling. But, the resetting of is managed by the admin account manually. The execution of proposals is based on funds in...

6.9AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•15 views

underflow can happens after delegator vote and block vote counting

Lines of code Vulnerability details Impact underflow can happens after delegator vote and block vote counting Proof of Concept In the current implementation, when a voting, the function countVote is triggered, this function is overriden in the function GovernorCountingOverridable.sol weight =...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•11 views

Array Mismatch in RdpxV2Core.sol

Lines of code Vulnerability details Impact reserveTokens and reserveAsset are not synced because reserveTokens was not initialized in the constructor. Proof of Concept The RdpxV2Core.sol contract stores the reserve token information and also uses another array to only track the reserve token...

6.7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•12 views

Initialization Issue in EarningsPoolL

Lines of code Vulnerability details Impact the vulnerable part in code : uint256 prevCumulativeRewardFactor = prevEarningsPool.cumulativeRewardFactor != 0 ? prevEarningsPool.cumulativeRewardFactor : PreciseMathUtils.percPoints1, 1; earningsPool.cumulativeRewardFactor =...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•10 views

Users can redeem rDpx they haven't deposited

Lines of code Vulnerability details Impact This can lead to loss of funds for the protocol Proof of Concept In the redeem function of PerpetualAtlanticVaultLP, rdpx amount to send to the user is calculated in addition to the Weth and there is no check for if the user actually owns the rdpx. asset...

7AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•11 views

The Rdpx V2 Core contract functionality blocking

Lines of code Vulnerability details Impact The RdpxV2Core contract functionality can be blocked as long as the contract WETH balance is less than totalWethDelegated. This can happen even without malicious activities. Proof of Concept The sync function of the RdpxV2Core contract has a special...

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

Improper precision of strike price calculation can result in broken protocol

Lines of code Vulnerability details Impact Due to a lack of adequate precision, the calculated strike price for a PUT option for rDPX is not guaranteed to be 25% OTM, which breaks core assumptions around 1 protecting downside price movement of the rDPX which makes up part of the collateral for...

6.8AI score
SaveExploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•13 views

Malicious user can prevent the creation of a proposal

Lines of code Vulnerability details Vulnerability Detail The LivepeerGovernor inherits OpenZeppelin's GovernorUpgradeable contract. The GovernorUpgradeable utilizes the hashProposal function to generate a unique hash when creating a new proposal. The hash depends solely on input parameters:...

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

Fully slashed transcoder can vote with 0 weight messing up the voting calculations

Lines of code Vulnerability details Impact If a transcoder gets slashed fully he can still vote with 0 amount of weight making any other delegated user that wants to change his vote to subtract their weight amount from other delegators/transcoders. Proof of Concept In BondingManager.sol any...

6.8AI score
SaveExploits0
Total number of security vulnerabilities10190