Lucene search
K
Code423n4Most viewed

10190 matches found

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

removeFromAllTicks should be done before getTVL

Lines of code Vulnerability details After the mitigation, the TR fee is directly sent to GE vault. Suppose 0.1 eth trading fee has accumulated in TR. uint vaultValueX8 = getTVL; uint adjBaseFee = getAdjustedBaseFeetoken == addresstoken0; // Wrap if necessary and deposit here if msg.value 0...

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

Use of tx.origin breaks interoperability with AA wallets.

Lines of code Vulnerability details In OptionPositionMananger, several functions like close and sellOptions, need to call PMWithdraw, which calls PMTransfer. Then it is checked that tx.origin != user. However, smart contract wallet cannot be tx.origin, which means AA wallets will not be able to...

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

M-08 Unmitigated

Lines of code Vulnerability details Comments The success of low-level calls is not checked in V3Proxy. If msg.sender is a contract and the fallback function has additional logic, the protocol will succeed transfer by default, which will result in the loss of user funds. Mitigation There is no...

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

The user will receive more/less funds when calling unwrap() if the price of USDY falls/rises than expected

Lines of code Vulnerability details Impact There is a wrap function called by users to wrap their USDY tokens . In the future, to withdraw tokens, the user calls the unwrap function . However, in the unwrap function, the user can have more funds in case the price of USDY falls. Based on the case...

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

Lack of Post-Allowance Verification Before Token Minting

Lines of code Vulnerability details The code checks if the user txn.sender is allowed via the ALLOWLIST. If not, it sets the user's status to "allowed". However, after this step, there's no subsequent verification to ensure the user has indeed been added to the ALLOWLIST before minting tokens to...

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

Cross-chain smart contract call can revert and burned tokens in source chain can't be recovered

Lines of code Vulnerability details Summary AXELARGATEWAY.callContract doesn't revert on failure in destination chain , execute function can revert for varies reasons such as not passing require statements, or low gas so tokens remained burned in source chain and can't be recovered . Impact Loss ...

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

Reorgs could revert the setRange function and lead to a long lasting stale price of USDY

Lines of code Vulnerability details Summary Reorgs could revert the setRange function and therefore lead to stale prices for a long time depending on the off chain protection, against it Vulnerability Details Here is the setRange function of the USDY price oracle: function setRange uint256...

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

Maybe you get the same txnHash for different transactions in DestinationBridge._execute()

Lines of code Vulnerability details Impact DestinationBridge.execute is a function that is executed when contract is called by Axelar Gateway -L114. The function calculates bytes32 txnHash = keccak256payload. txnHash is calculated based on payload. However, srcChain is not taken into account in...

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

In the event of a fall in the price of USDY, the withdrawal of funds for the user may be blocked

Lines of code Vulnerability details Impact There is a wrap function called by users to wrap their USDY tokens . In the future, to withdraw tokens, the user calls the unwrap function . However, in the unwrap function, the user can have more funds in case the price of USDY falls. Based on the case...

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

Potential Out of Bound Error When Accessing Range Array

Lines of code Vulnerability details The code seems to be attempting to access an element of the 'ranges' array using an index calculated from the array's length minus one. However, during the deployment or initialization of the contract, if the length of 'ranges' is 1, this calculation results in...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 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
Exploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 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
Exploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 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
Exploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 views

DOS the system by frontrunning the initialize function

Lines of code Vulnerability details Impact LivepeerGovernor and Treasury are vulnerable to DOS. Proof of Concept The initialize function present in these two contracts is not called just after their construction. Which is confirmed in the contract LivepeerGovernorUpgradeMock.sol while initializin...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 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
Exploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 views

Transfering Bonds would create confusion among delegators because of non-deletion of unbondingLocks & assigning all the new delegators the same unbounding id

Lines of code Vulnerability details transferBond function is used to transfers ownership of a bond to a new delegator using optional hints if needed. Here the old unbound lock is deleted after creating a new one in unbondWithHint function. But the problem lies in the delete operation as it does n...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 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
Exploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 views

[M-02] BondingVotes.getPastVotes(): User can easily manipulate voting power for round

Lines of code Vulnerability details Impact User can take a collaterized loan of LPT and bond for a single round to gain voting power for a single round and vote on proposals. This is because when voting, only the single round is checked when retrieving the voting power via...

7.8AI score
Exploits0
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
Exploits0
Code423n4
Code423n4
•added 2023/09/06 12:0 a.m.•9 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
Exploits0
Code423n4
Code423n4
•added 2023/08/28 12:0 a.m.•9 views

Validating input parameters with the max value of uint

Lines of code Vulnerability details Impact Validating input values with uint256.max will not revert in any condition as solidity v0.8.0 reverts on overflow and underflow. Detailed description of the impact of this finding. Due to solidity v0.8.0 which reverts on overflow and underflow of integer...

7.3AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/28 12:0 a.m.•9 views

Missing slippage protection in _swap()

Lines of code Vulnerability details Impact Without slippage, If the price of the tokens changes significantly during the swap, it could result in a large slippage, causing users to lose a significant amount of funds. An attacker can watch the mempool and then using flash bots execute a sandwich...

7AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/28 12:0 a.m.•9 views

reserve balances AND reserve balance ratio INVARIANTS ARE NOT CHECKED INSIDE THE _reserveTokenSpecified FUNCTION THUS ENABLING deposit AND withdraw TRANSACTIONS TO BREAK THESE INVARIANTS

Lines of code Vulnerability details Impact The EvolvingProteus.depositGivenInputAmount function is used to calculate the output amount of LP tokens given an input amount of reserve tokens. The EvolvingProteus.withdrawGivenOutputAmount function is used to calculate the amount of LP tokens that mus...

7AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/28 12:0 a.m.•9 views

Potential pools unavailable

Lines of code Vulnerability details Impact The function getPointGivenXandUtility may always rollback and report an error CurveError. Proof of Concept According to the formula y = k^2 u^2/aku + x - bku, it is possible to find the other coordinates of a point on the curve when given a u and a...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/28 12:0 a.m.•9 views

Rounding Issue and Inconsistent Fee Application

Lines of code Vulnerability details Summary There is a bug in the swap function. The bug can potentially cause incorrect balance checks and outputs when swapping. This issue arises due to improper usage of the applyFeeByRounding function. Affected Function: swap Details: In the swap function, the...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/28 12:0 a.m.•9 views

Condition will not revert when block.timestamp is == to the compared variable

Lines of code Vulnerability details Medium Issues | | Issue | Instances ---|---|--- M-1 | Condition will not revert when block.timestamp is == to the compared variable | 1 M-1 Condition will not revert when block.timestamp is == to the compared variable The condition does not revert when...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/28 12:0 a.m.•9 views

Swap Tokens with Fee Consideration and Balance Checks

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. In the swap function, the discrepancy lies in the usage of the variable specifiedAmount instead of roundedSpecifiedAmount when checking the final balance in the swap function. if specifiedToken ==...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/26 12:0 a.m.•9 views

M-22 Unmitigated

Lines of code Vulnerability details Comments The underlying yield vaults used by the V5 vaults usually round down shares received when depositing. As a result, if the Vault deposits to an underlying yield vault that has already issued shares, it is possible that a deposit could be rounded down to...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/24 12:0 a.m.•9 views

Loss of precision in the YieldVault causes DoS when depositing from the Vault

Lines of code Vulnerability details Title Loss of precision in the YieldVault causes DoS when depositing from the Vault Original Issue M-22 - Loss of precision leads to undercollateralized Details The original demonstrates how the Vault could fall into undercollateralization mode if the YieldVaul...

6.6AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/21 12:0 a.m.•9 views

Auctions run at significantly different speeds for different prize tiers

Lines of code Vulnerability details Comments The V5 implementation delegates the task of claiming prizes to a network of claimers. The fees received by a claimer are calculated based on a dutch auction and limited based on the prize size of the highest tier the smallest prize. As a result, it is...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/10 12:0 a.m.•9 views

Failed transfer with low level call could be overlooked

Lines of code Vulnerability details Impact In LendingLedger.sol and votingEscrow.sol, low level call made using the call, According to the Solidity docs, "The low-level functions call, delegatecall and staticcall return true as their first return value if the account called is non-existent, as pa...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/10 12:0 a.m.•9 views

GovernanceChainSCMgmtActivationAction : TIMELOCK_CANCELLER_ROLE is not set to the newEmergencySecurityCouncil

Lines of code Vulnerability details Impact newEmergencySecurityCouncil will not have the TIMELOCKCANCELLERROLE. Proof of Concept GovernanceChainSCMgmtActivationAction has the function perform which will be used to activate elections on Arbitrum One. while the function set and revoke the...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/10 12:0 a.m.•9 views

Revert error in SecurityCouncilNomineeElectionGovernor.sol#_execute()

Lines of code Vulnerability details Impact Current implementation of SecurityCouncilNomineeElectionGovernor.solexecute will always revert whenever it is executed Proof of Concept 1. Take a look at SecurityCouncilNomineeElectionGovernor.solexecute 324: function execute 325: uint256 proposalId, 326...

7AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/10 12:0 a.m.•9 views

LendingLedger Lack of method to rescue accidentally sent Canto

Lines of code Vulnerability details Impact There is no function to rescue Canto accidentally sent to LendingLedger so if governance fat-finger those Canto could be lost forever. Proof of Concept There is no function to transfer native token out of LendingLedger Tools Used Manual inspection...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/10 12:0 a.m.•9 views

critical functions should emit an event when they called

Lines of code Vulnerability details Impact some critical functions should emit an even when they called because it contains important information and an event should be emitted, some functions in this contest did not emit an event and this may led to unwanted behavior in future functions like cla...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/10 12:0 a.m.•9 views

Any of the role setter , nominee Vetter should not be a council (cohort) member.

Lines of code Vulnerability details Impact The privileged cohort membercouncil member can influence the member addition, removal, rotating the nominee and excluding the nominee. The function of election can be rigged, arbitrary proposals can be passed. This is easy by the council member who has...

7.3AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/10 12:0 a.m.•9 views

setFullWeightDuration() can be called while a member election is ongoing

Lines of code Vulnerability details Bug Description In SecurityCouncilMemberElectionGovernorCountingUpgradeable, fullWeightDuration which is the duration where a user's votes has weight 1 can be set using setFullWeightDuration: SecurityCouncilMemberElectionGovernorCountingUpgradeable.solL77-L84...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/10 12:0 a.m.•9 views

Vote tokens of voters are not returned.

Lines of code Vulnerability details Impact In the docs and twitter spaces, it was mentioned that the voting tokens will be given back to the voters after the Election has ended. But no logic is implemented anywhere in the repo. This can cause voters to lose their valuable voting tokens which can...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/10 12:0 a.m.•9 views

Double voting in GaugeController

Lines of code Vulnerability details Impact Voting with the same collateral multiple times by delegating and undelegating, a process that could manipulatively influenceincrease the weight of a particular lending market where the malicious actor is the major Liquidity provider. Proof of Concept The...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/10 12:0 a.m.•9 views

currentCohort FUNCTION SHOULD REVERT WHEN electionCount == 0 RATHER THAN RETURNING Cohort.FIRST

Lines of code Vulnerability details Impact In the SecurityCouncilNomineeElectionGovernor.currentCohort function is used to retrieve the current Cohort of the contract. For a cohort to be elected the election should be created with the respective proposal Id. But with in the function scope of...

6.5AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

GeVault cannot deposit ETH

Lines of code Vulnerability details Impact The GeVault contract has two instances where the require statement for token validation can cause reverts. In the first instance, the contract allows only token0 and token1 addresses for withdrawal, making it impossible to withdraw ETH. In the second...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

The treasury address can be updated by the contract owner to point to a malicious address after deployment

Lines of code ttps://github.com/code-423n4/2023-08-goodentry/blob/71c0c0eca8af957202ccdbf5ce2f2a514ffe2e24/contracts/GeVault.solL58 Vulnerability details Impact Any fees or funds sent to the treasury could potentially be stolen or manipulated Proof of Concept The treasury address can be updated b...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

_computeRewardFraction logic looks susceptible to manipulation around the edges.

Lines of code Vulnerability details Impact if auctionElapsedTime is 0, it returns the full reward fraction Proof of Concept The RewardLib.fractionalReward calculates the reward fraction linearly based on the elapsed time. When auctionElapsedTime is 0, fractionalReward will return 1 full rewards...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

initiator in OptionsPositionManager.executeOperation is not checked

Lines of code Vulnerability details Impact An attacker can execute flashloan pretending to be other user. Proof of Concept LendigPool.flashloan sends which user called in the parameter initiator, but it is not used in executeOperation. Tools Used Manual review. Recommended Mitigation Steps Check ...

7.1AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

RangeManager.initRange does not refund leftover underlying assets to the contract owner

Lines of code Vulnerability details Impact The initRange function in the RangeManager contract has a vulnerability where leftover underlying assets from the tokenizable range are not properly refunded to the contract owner. This can lead to a situation where the owner's funds are stuck in the...

6.7AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

VaultBoosterFactory allows deployment of VaultBooster with phoney PrizePool

Lines of code Vulnerability details Impact A malicious VaultBooster can be deployed via VaultBoosterFactory contract. Users may lose funds while interacting with such VaultBooster. File: src/VaultBoosterFactory.sol function createVaultBoosterPrizePool prizePool, address vault, address owner...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

the check in checkExpectedBalances only allows 2% slippage, which could be insufficient in volatile markets and lock user funds.

Lines of code Vulnerability details Impact This would cause the check to fail and revert the transaction, locking the user's funds Proof of Concept In volatile markets, the price could move more than 2% between when the user sends the transactions and when it gets mined. This would cause the chec...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

Loop condition that might prevent the function from correctly detecting range overlaps

Lines of code Vulnerability details Impact The loop iterates through each element in the stepList array and checks whether the new range overlaps with each existing range. However, the revert"Range overlap"; statement is placed inside the loop, which means that the moment any overlap is detected,...

6.8AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/07 12:0 a.m.•9 views

Protocol won't work with tokens that can prevent transfers

Lines of code Vulnerability details Impact There are various tokens and token standards that can result in transfers being stopped, blocked, blacklisted, paused or disallowed. This entails protocols may function well with these tokens up until a time when any of above measures activated leading t...

6.9AI score
Exploits0
Code423n4
Code423n4
•added 2023/08/04 12:0 a.m.•9 views

Calc token amount can be manipulated

Lines of code Vulnerability details Impact function calcDepositInOneCoin uint2563 memory arr private view returns uint256 return liquidityPool.calctokenamountarr, true; This function is being used to calculate slippage, return value calctokenamount can be manipulated as described in POC section,...

7AI score
Exploits0
Total number of security vulnerabilities5000