The absence of the addExecutorOrderedExecutionOption parameter causes the ordered delivery mode to fail.
Summary
The absence of the addExecutorOrderedExecutionOption parameter causes the ordered delivery mode to fail, This may cause user funds to become stuck in the protocol.
The ExecutorOrderedExecutionOption option was also not added. As a result, the ordered delivery mode will fail, especially since the ordered delivery mode is enabled by default in the EVM-side oApp on the orderly chain.
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
The ordered delivery mode on both the Solana and EVM-side oApp cannot function properly.
This further impacts users by causing their funds to be stuck in the protocol. Here’s an example with deposit():
• (1) Users A and B deposit 1000 USDC almost simultaneously.
• (2) LayerZero’s execute function assigns the same nonce to both transactions via nextNonce(), assumed to be 1 for both.
• (3) On the EVM side, only one of the messages from User A or User B will execute successfully. After one execution succeeds, inboundNonce increments to 1, but _origin.nonce remains 1. This results in the require(_origin.nonce == inboundNonce + 1) check failing, causing one user’s funds to remain stuck on the Solana side, unable to reach the orderly EVM side.
PoC
No response
Mitigation
Append to your Message Options an ExecutorOrderedExecutionOption in your _lzSend call,like:
// appends "01000104", the ExecutorOrderedExecutionOption, to your options bytes array
_options = OptionsBuilder.newOptions().addExecutorLzReceiveOption(200000, 0).addExecutorOrderedExecutionOption();
Fit Canvas Pangolin
Medium
The absence of the addExecutorOrderedExecutionOption parameter causes the ordered delivery mode to fail.
Summary
The absence of the addExecutorOrderedExecutionOption parameter causes the ordered delivery mode to fail, This may cause user funds to become stuck in the protocol.
Root Cause
According to the LayerZero documentation: https://docs.layerzero.network/v2/developers/evm/oapp/message-design-patterns#message-ordering
To implement strict nonce enforcement, you need to implement the following:
a mapping to track the maximum received nonce.
override _acceptNonce and nextNonce.
add ExecutorOrderedExecutionOption in _options when calling _lzSend.
However, in the EVM side oApp of the orderly chain:
https://github.com/sherlock-audit/2024-09-orderly-network-solana-contract/blob/main/sol-cc/contracts/SolConnector.sol#L92
The ExecutorOrderedExecutionOption option was not added. Similarly, in the Solana oApp: https://github.com/sherlock-audit/2024-09-orderly-network-solana-contract/blob/main/solana-vault/packages/solana/contracts/programs/solana-vault/src/instructions/vault_instr/deposit.rs#L141
The ExecutorOrderedExecutionOption option was also not added. As a result, the ordered delivery mode will fail, especially since the ordered delivery mode is enabled by default in the EVM-side oApp on the orderly chain.
Internal pre-conditions
No response
External pre-conditions
No response
Attack Path
No response
Impact
The ordered delivery mode on both the Solana and EVM-side oApp cannot function properly.
This further impacts users by causing their funds to be stuck in the protocol. Here’s an example with deposit(): • (1) Users A and B deposit 1000 USDC almost simultaneously. • (2) LayerZero’s execute function assigns the same nonce to both transactions via nextNonce(), assumed to be 1 for both. • (3) On the EVM side, only one of the messages from User A or User B will execute successfully. After one execution succeeds, inboundNonce increments to 1, but _origin.nonce remains 1. This results in the require(_origin.nonce == inboundNonce + 1) check failing, causing one user’s funds to remain stuck on the Solana side, unable to reach the orderly EVM side.
PoC
No response
Mitigation
Append to your Message Options an ExecutorOrderedExecutionOption in your _lzSend call,like: