Deposits & Withdrawals
The system uses off-chain balance tracking and on-chain contract settlement.
Deposits

Deposit Tokens: Searchers deposit tokens into the Lighthouse contract to fund bidding fees.
Send
DepositedEvent: The server receives the deposits instantly and updates the searcher balances, avoiding redundant on-chain queries.Submit Bid: Searchers submit MEV bundles with a
BidMsg; the server verifies that each bid is fully backed by the searcher’s deposit.Send Auction Closed Message: The server informs the chain of auction close, triggering settlement. The server deducts the winning bid and distributes it between Lighthouse and the rollup per a predefined ratio.
Withdrawals

Reserve Withdrawal: A searcher reserves a withdrawal first. This enforces a delay to prevent inconsistencies (e.g., using the same deposits simultaneously for a bid and a withdrawal).
Send
WithdrawalReservedEvent: Upon receiving the reservation event, the server marks the searcher as ineligible to bid. From this point, the searcher cannot submit bids.Withdraw: After the withdrawal window opens, the searcher withdraws their funds from the contract.
Send
WithdrewEvent: The server detects withdrawal and updates the searcher’s deposit balance.
Last updated