sherlock-audit / 2024-09-orderly-network-solana-contract-judging

0 stars 0 forks source link

Tangy Mocha Fox - Ledger never calls SolConnector's `withdraw()` #133

Open sherlock-admin4 opened 4 days ago

sherlock-admin4 commented 4 days ago

Tangy Mocha Fox

Medium

Ledger never calls SolConnector's withdraw()

Summary

The Ledger is a singleton contract in the Orderly Protocol and it is the only contract that can call SolConnector's withdraw(). However, the Ledger only calls withdraw() on the CrossChainManager.

Root Cause

The Ledger is not configured to send calls to SolConnector.

ref: LedgerImplA.executeWithdrawAction():177

ILedgerCrossChainManager(crossChainManagerAddress).withdraw(withdraw);

Internal pre-conditions

No response

External pre-conditions

No response

Attack Path

  1. SolConnector's withdraw() will never be called until Ledger is modified.

Impact

Withdrawing from SolanaVault will not be possible until Ledger is fixed.

PoC

No response

Mitigation

Consider modifying Ledger's implementation to call SolConnector when withdrawing from Solana.