Lucene search
K
Code423n4Recent

10190 matches found

Code423n4
Code423n4
added 2023/10/06 12:0 a.m.7 views

Functions can be called directly externally

Lines of code Vulnerability details Impact @dev This exists as a standalone contract but will only ever contain proxy code, not state. As such it should never be called directly or externally, and should only be invoked with DELEGATECALL so that it operates on the contract state within the primar...

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

Anyone can create multiple RootBridgeAgent

Lines of code Vulnerability details Impact createBridgeAgent is used to create a new Root Bridge Agent. This new RootBridgeAgent is added to the array on the rootPort. This can be used to randomly spam the array with thousand of array addresses whereby the ones deployed by the protocol are harder...

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

VirtualAccount.sol:payableCall() lack requiresApprovedCaller modifier

Lines of code Vulnerability details Impact Anyone can use a user's virtual account payableCall and calls functions like retrySettlement/redeemSettlement/retrieveSettlement that require the caller to be the virtual account, which can lead to economic loss to users. Proof of Concept In...

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

Protect against griefing by allowing only owner to manipulate global liquidity.

Lines of code Vulnerability details Impact There don't seem to be protections against a malicious actor griefing others by manipulating the global liquidity accounting. This could potentially block honest users from claiming their earned rewards. Proof of Concept The main risk of griefing by...

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

LiquidityMining.claimConcentratedRewards() does not properly account user liquidity across ticks

Lines of code Vulnerability details Let’s say a user creates two separate positions, one is tick-15, tick and the second is tick, tick+15. The user is covering the entirety of the tick range to receive rewards but does not receive any. We see that posKey is defined like this: bytes32 posKey =...

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

CrossTicks is not called when Users claimConcentratedRewards.

Lines of code Vulnerability details Vulnerability Details The crossTicks function is called to keep track and update the ticks whenever a tick is crossed, as specified by the Natspec /// @notice Keeps track of the tick crossings /// @dev Needs to be called whenever a tick is crossed function...

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

[M-15] Reentrancy in the BranchPort contract

Lines of code Vulnerability details Impact In a Re-entrancy attack, a malicious contract calls back into the calling contract before the first invocation of the function is finished. This may cause the different invocations of the function to interact in undesirable ways, especially in cases wher...

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

A Malicious user can create a rootBridgeAgent with a malicious endpoint and execute calls directly with the rootBridgeAgent.

Lines of code Vulnerability details Impact A Malicious user can create a rootBridgeAgent with a malicious endpoint and execute calls directly with the rootBridgeAgent. Since anyone can create a rootBridgeAgent with desired values for port, endpoint and router address in anychain. The Attacker can...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.9 views

VirtualAccount as a wallet can be called by anyone

Lines of code Vulnerability details A VirtualAccount represents a user wallet that allows the user to manage assets and perform remote interactions. But because payableCall method lacks any form of authentication it can be called by anyone. The call can be also executed directly to the desired...

7.5AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.9 views

Access control check in the setAmbRewards and setAmbRewards functions is missing

Lines of code Vulnerability details Impact Any user can call the setAmbRewards and setAmbRewards functions and set their values for weeklyReward, which opens up many attack vectors. For example, it is possible to set a large reward and withdraw all funds from the protocol. Proof of Concept functi...

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

No access control on protocolCmd and userCmd; potential for abuse.

Lines of code Vulnerability details Impact There is no access control on the protocolCmd and userCmd functions in LiquidityMiningPath. This means anyone can call them. There should be some checks to restrict access. The protocolCmd and userCmd functions are defined on LiquidityMiningPath.sol: /...

7.4AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.8 views

BranchBridgeAgent.retrieveDeposit doesn't check if the deposit is in FAILED state

Lines of code Vulnerability details Impact The BranchBridgeAgent.retrieveDeposit function is supposed to be called for retrieving a failed deposit in order to get funds back to branch chain, but the function doesn't check that the deposit being used is really in FAILED state, so a malicious user...

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

Cross-Chain Token Cap Disparity

Lines of code Vulnerability details Impact Potential loss of token value when minted values exceed the uint capacity of target chains, leading to incorrect token representation and financial discrepancies. Proof of Concept This function mints tokens or at least a representation of other chain...

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

LiquidityMining.sol cannot be funded for rewards distribution.

Lines of code Vulnerability details During a rewards claim LiquidityMining.sol uses a low-level call with the msg.value as the rewardsToSend to the liquidity providers, but the contract lacks a receive or fallback function for funds be deposited in it, leaving the contract empty and unable to sen...

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

[M-17] Reentrancy in the BranchBridgeAgent contract

Lines of code Vulnerability details Impact In a Re-entrancy attack, a malicious contract calls back into the calling contract before the first invocation of the function is finished. This may cause the different invocations of the function to interact in undesirable ways, especially in cases wher...

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

Virtual account lacks access control

Lines of code Vulnerability details Impact The Virtual Account lacks access control on a function that allows arbitrary calls. This enables anyone to take any assets contained within the account. Proof of Concept The Virtual account has the requiresApprovedCaller modifier to prevent use from...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.10 views

All tokens can be stolen from VirtualAccount due to missing access modifier

Lines of code Vulnerability details Impact All non-native assets ERC20 tokens, NFTs, etc. can be stolen by anyone from a VirtualAccount using its payableCall... method, which lacks the necessary access control modifier requiresApprovedCaller. See also, the call... method which utilizes the...

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

add sendBack function to origin when lzReceiveNonBlocking is not executed

Lines of code Vulnerability details Impact lzReceiveNonBlocking won't revert to the ILayerZeroEndpoint.send could lead to that execution on side of send is exectued and execution on side of receieve is not executed. Proof of Concept Tools Used manual view Recommended Mitigation Steps if calls are...

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

USDT tokens should approve to zero first otherwise it may cause other tokens to get stuck in the case of aprooveMultipleTokens

Lines of code Vulnerability details Impact Unsafe ERC20 approve that do not handle non-standard erc20 behavior. Some token contracts do not return any value. Some token contracts revert the transaction when the allowance is not zero. Proof of Concept When receiving tokens to the destination chain...

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

Logic Error

Lines of code Vulnerability details Impact Detailed description of the impact of this finding. Proof of Concept Provide direct links to all referenced code in GitHub. Add screenshots, logs, or any other relevant proof that illustrates the concept. Tools Used Manual Recommended Mitigation Steps...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.8 views

Incorrect srcAddress check renders all layerzero messages unusable

Lines of code Vulnerability details Impact The source address of LayerZero messages is validated on a wrong part of the calldata, which will cause all cross-chain-messages to fail on a live deployment. Proof of Concept The receivers of cross-chain-messages BranchBridgeAgent and RootBridgeAgent bo...

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

The governance will fail to add an ecosystem token if someone creates a hToken that uses that ecosystem token

Lines of code Vulnerability details Ecosystem tokens are tokens that dont have an underlying token address in any branch and only the global representation exists. The governance adds them by calling addEcosystemToken where the ecoTokenGlobalAddress will be the Maia or Hermes token as the sponsor...

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

Smart Contract calling callOutSignedAndBridge via BranchBridgeAgent can cause loss of fund

Lines of code Vulnerability details Impact Smart Contract calling callOutSignedAndBridge via BranchBridgeAgent can cause loss of fun Proof of Concept One of the cross-chain request pass is that when user calling callOutSignedAndBridge via BranchBridgeAgent the payload is created //Encode Data for...

7.5AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.29 views

Mismatch of decimals for some underlying tokens across chains could cause a huge loss of funds

Lines of code Vulnerability details Impact The issue is, some ERC20 underlying tokens could have different decimals on other chains. For example, USDC in BNB chain has 18 decimals where it has 6 decimals in other chains such as Ethereum, Polygon ...etc. The root chain doesn't account for decimals...

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

Lack of tick range validation allows initialization of invalid ticks.

Lines of code Vulnerability details Impact Function initTickTracking initializes the tick tracking data structure, but does not validate that tick is within the min/max tick range for the pool. This could allow initializing invalid tick values. Proof of Concept Here is the line in initTickTrackin...

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

USAGE OF abi.encodePacked TO ENCODE DATA COULD LEAD TO payload DATA COLLISION IN THE RootBridgeAgent._createSettlementMultiple FUNCTION

Lines of code Vulnerability details Impact The RootBridgeAgent.callOutAndBridgeMultiple function is used to settle multiple assets and perform a remote call to a branch chain. callOutAndBridgeMultiple function calls the RootBridgeAgent.createSettlementMultiple internal function to compute the...

7.3AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.6 views

users funds will be stuck in the BaseBranchRouter when making deposit

Lines of code Vulnerability details Impact Users are debited twice the intended amount of every underlying token deposit made at the branch port while locking deposits into the branch port. The first deposit is transferred into the BaseBranchRouter and the second into the BranchPort. The funds...

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

Lack of access control in claimConcentratedRewards and claimAmbientRewards functions allows unauthorized fund drainage. Implement access restrictions.

Lines of code Vulnerability details Impact Any caller can call claimConcentratedRewards or claimAmbientRewards and drain funds. The contract should restrict calling these functions to authorized roles. Proof of Concept The lack of access control on claimConcentratedRewards and claimAmbientRewards...

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

Reentrancy is possible in claim functions, which call out via .call().

Lines of code Vulnerability details Impact Reentrancy is possible in claim functions, which call out via .call. Proof of Concept The claimConcentratedRewards Function & claimAmbientRewards Function The claim functions that are vulnerable to reentrancy are: For...

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

VirtualAccount::payableCall is missing access control

Lines of code Vulnerability details Impact The lack of access control in VirtualAccount::payableCall function allows anyone to execute arbitrary calls with any contract from a user's VirtualAccount. This enables malicious actors to steal user's funds easily, ultimately resulting in a...

7.6AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.11 views

accrueConcentratedPositionTimeWeightedLiquidity may revert under special situations

Lines of code Vulnerability details Impact LiquidityMining.accrueConcentratedPositionTimeWeightedLiquidity may unintentionally reverts and make transactions does not succeed Proof of Concept The LiquidityMining.accrueConcentratedPositionTimeWeightedLiquidity function calculates the concentrated...

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

VirtualAccount.sol CONTRACT DOES NOT CORRECTLY IMPLEMENT THE eip1155 STANDARD WHILE INHERITING THE ERC1155Receiver

Lines of code Vulnerability details Impact The VirtualAccount.sol contract inherits the ERC1155Receiver contract to receive the ERC1155 tokens. Both onERC1155Received and onERC1155BatchReceived functions are declared in the VirtualAccount contract as per the eip1155 standard. The respective ERC11...

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

Slippage attack on claiming rewards

Lines of code Vulnerability details Impact Exploiter can abuse slippage to claim more weekly reward. The amount of slippage damage is unclear due to lack of deployment context and testing. Worst case scenario is the exploiter own 100% deposit of single pool allowing extreme slippage to steal enti...

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

Timestamp Manipulation

Lines of code Vulnerability details Impact there is a problem in that contract especiall when updating tickTrackingIndex within the loop an attacker can manipulate the values of enterTimestamp and exitTimestamp to force tickActiveEnd to be significantly larger than tickActiveStart inflate the...

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

Tokens locking due to empty parameters to execute on the root chain router

Lines of code Vulnerability details Vulnerability details Impact User's tokens will be locked at the router contract if the params encoded parameters of functions callOutAndBridge and callOutAndBridgeMultiple are empty. The executionStatesrcChainIddepositNonce storage variable will have value...

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

Unbounded tick arrays; add max length check to prevent gas issues.

Lines of code Vulnerability details Impact Tick arrays like tickTracking can grow unbounded. Could hit gas limit. As ticks are crossed, new TickTracking elements are pushed: function crossTicks bytes32 poolIdx, int24 exitTick, int24 entryTick internal tickTrackingpoolIdxexitTick.push...

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

Existing pools will be bricked due to uninitialized state

Lines of code Vulnerability details Existing pools will be bricked due to uninitialized Summary Pools already present in the exchange will be bricked when crossTicks is called with an uninitialized tickTracking storage, which will trigger an array out of bounds error. Impact New pools in the...

7.3AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.16 views

User can selectively turn on the fallback flag to take all ETH on the agent contract as layerzero fee refund

Lines of code Vulnerability details Impact performFallbackCall can revert sliently when refundee is not capable of taking ETH refund from layerzero side Proof of Concept In RootBridgeAgent.sol when the has fall back toggle flag is on, the smart contract aim to perform a fallback call to notify th...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.6 views

require statement commented posses attack by malicious contract

Lines of code Vulnerability details Impact The 'require' statement commented posses attack by malicious contract. The LiquidityMiningPath.sol contract has the Governance requirement of the ‘require’ statement commented. If the intention was to make use of the ‘require’ statement, uncomment it so ...

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

Front-Running Vulnerability: Exploiting Reward Updates for Maximized Payouts

Lines of code Vulnerability details Impact Malicious users claim rewards at a higher rate than what was intended by front-running governance actions meant to reduce rewards. This allows them to claim rewards at a higher rate than what was intended, undermining the protocol's intended economic...

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

if lzReceiveNonBlocking failed to execute , they don't send back ,accumulated msg.value . malicious user drain that

Lines of code Vulnerability details Impact PerformFallBack is gonna fail and msg.value will be accumulated in that BranchBridgeAgent and malicious user can take over them Proof of Concept User deposited and When it's not executed ,user want to retrieve and callRetrieveSettlement ,send message to...

7.4AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.6 views

No poolIdx validation; arbitrary values can corrupt storage, require validation.

Lines of code Vulnerability details Impact No validation on poolIdx input for key functions like claimConcentratedRewards. Could pass invalid poolId and corrupt storage. The claimConcentratedRewards function is defined on LiquidityMining.sol. It takes in a poolIdx as one of the parameters functio...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.10 views

If dt is not updated accurately then timeWeightedWeeklyPositionInRangeConcLiquidity_ might be updated incorrectly.

Lines of code Vulnerability details Impact In the function accrueConcentratedPositionTimeWeightedLiquidity, inside the while block, dt is initialised as: uint32 dt = uint32 nextWeek If tickTracking.exitTimestamp != 0 then the following else block is executed on line 117: else // Tick is no longer...

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

Unprotected payableCall() exposes user funds to malicious actors

Lines of code Vulnerability details Impact The function payableCall is used to make calls on to other contracts from the virtualAccount which is linked to a userAddress. This function utilizes the PayableCall struct show below. struct PayableCall address target; bytes callData; uint256 value; It...

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

Potential denial of service due to out of bound gas usage

Lines of code Vulnerability details Summary The implementation of accrueConcentratedPositionTimeWeightedLiquidity incurs in complex and unbounded computations that could lead to significant gast costs and a potential denial of service. Impact The liquidity mining program in the Ambient DEX will...

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

if the Virtual Account's owner is a Contract Account (multisig wallet), attackers can gain control of the Virtual Accounts by gaining control of the same owner's address in a different chain

Lines of code Vulnerability details Impact Attackers can gain control of User's Virtual Accounts and steal all the assets these accounts hold in the Root environment Proof of Concept When sending signed messages from a Branch to Root, the RootBridgeAgent contract calls the...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.10 views

Rewards cannot be transferred when calling protocol command

Lines of code Vulnerability details Summary Rewards are set up using protocol commands, but it's entrypoint is not payable. Impact Rewards can be set up by protocol authorities using the functions setConcRewards and setAmbRewards present in the LiquidityMiningPath contracts. These two are part of...

7.1AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.5 views

Global and Position liquidity accrual can significantly impact the performance

Lines of code Vulnerability details Impact Global and Position liquidity accrual can significantly impact the performance Proof of Concept The calculation of currWeek and nextWeek as shown in the provided code snippet aims to determine two time points within a week, primarily for the purpose of...

7.2AI score
Exploits0
Code423n4
Code423n4
added 2023/10/06 12:0 a.m.8 views

Limit accrueConcentratedPositionTimeWeightedLiquidity calls to prevent reward manipulation.

Lines of code Vulnerability details Impact It may be possible for a user to artificially increase their tracked liquidity right before claiming by rapidly entering/exiting positions. This could allow them to claim a larger % of rewards than they deserve. Proof of Concept The main risk of...

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

Missing Access Control in setLimit Function

Lines of code Vulnerability details Impact The setLimit function does not have proper access control, allowing anyone to modify the revocableLimit and irrevocableLimit variables. This can lead to potential security risks and unintended changes to these limits. Proof of Concept no access control o...

7.2AI score
Exploits0
Total number of security vulnerabilities10190