> ## Documentation Index
> Fetch the complete documentation index at: https://ouroborai.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# TimeBoost

> 200ms express lane priority for Arbitrum transactions

TimeBoost is Arbitrum's priority sequencing auction that grants the winner a **200ms express lane advantage** over the public mempool. This is a key differentiator for the platform -- the agent can bid for express lane access, execute priority trades, and resell unused capacity for profit.

## What Is TimeBoost?

TimeBoost is Arbitrum's answer to MEV. Instead of a first-come-first-served mempool, Arbitrum runs a sealed-bid, second-price auction every 60 seconds. The winner of each round becomes the **express lane controller** and can submit transactions that get sequenced 200 milliseconds before any public mempool transactions.

<CardGroup cols={3}>
  <Card title="60-Second Rounds" icon="clock">
    Each auction round lasts 60 seconds. Bids must be submitted at least 15 seconds before the round starts.
  </Card>

  <Card title="Sealed-Bid Auction" icon="lock">
    Bids are private. You pay the second-highest bid, not your own -- incentivizing truthful bidding.
  </Card>

  <Card title="200ms Priority" icon="bolt">
    The express lane controller's transactions are sequenced 200ms ahead of public mempool transactions.
  </Card>
</CardGroup>

## Why It Matters

The 200ms priority window creates a structural advantage for:

* **DEX arbitrage**: capture price discrepancies across Uniswap, Camelot, and other DEXs before other traders
* **Liquidations**: be first to liquidate undercollateralized lending positions on Aave, Radiant, etc.
* **Backrunning**: execute profitable backrun trades on large public mempool transactions
* **Priority execution**: ensure your time-sensitive trades execute before competitors

<Info>
  On Arbitrum, TimeBoost replaces traditional block builder MEV extraction. The revenue goes to the Arbitrum DAO treasury rather than to individual block builders, making it a fairer system overall.
</Info>

## How the Bidder Works

The `TimeBoostBidder` class manages the full lifecycle of express lane participation.

### Bid Loop

When started, the bidder runs a continuous loop:

1. **Detect round transition** -- polls the auctioneer for the current round number
2. **Estimate round value** -- calculates expected MEV profit from available strategies
3. **Compare against threshold** -- skips rounds where expected profit is below `minProfitThresholdWei`
4. **Fetch auctioneer stats** -- gets the average winning bid to avoid overbidding
5. **Submit bid** -- places a bid at 80% of expected profit, capped at 90% of the average winning bid
6. **Wait for result** -- if won, emits `roundWon` event; otherwise emits `roundLost`

### Bid Submission

Bids are submitted via JSON-RPC to the autonomous auctioneer:

```
Method: auctioneer_submitBid
Params: {
  chainId,
  expressLaneController,
  auctionContractAddress,
  round,
  amount
}
```

The auctioneer only considers the most recent bid per address, so the bidder can update its bid as new information arrives before the auction closes.

### Express Lane Transactions

When the bidder wins a round, it can submit transactions via the express lane:

```
Method: timeboost_sendExpressLaneTransaction
Params: {
  round,
  sequenceNumber,
  transaction,
  auctionContractAddress,
  signature
}
```

These transactions are sequenced by the Arbitrum sequencer with 200ms priority over the public mempool.

## MEV Estimation

The bidder estimates the expected value of each round using a per-strategy model with historical calibration.

### Strategy Values

| Strategy      | Estimated Value | Description                         |
| ------------- | --------------- | ----------------------------------- |
| `arb`         | \~0.002 ETH     | Cross-DEX arbitrage opportunities   |
| `liquidation` | \~0.005 ETH     | Lending protocol liquidation profit |
| `sandwich`    | \~0.0015 ETH    | Sandwich trading (higher risk)      |
| `backrun`     | \~0.0008 ETH    | Backrunning large transactions      |
| `resale`      | \~0.003 ETH     | Express lane resale revenue         |

### Historical Calibration

The bidder maintains a rolling history of the last 100 round outcomes. This history adjusts the estimation multiplier:

| History Signal             | Multiplier | Effect                      |
| -------------------------- | ---------- | --------------------------- |
| \< 5 rounds of data        | 1.0x       | Neutral (no data)           |
| Average profit negative    | 0.6x       | Reduce bid aggressiveness   |
| Average profit > 0.005 ETH | 1.2x       | Increase bid aggressiveness |
| Otherwise                  | 1.0x       | No adjustment               |

The bidder also subtracts estimated gas costs (\~0.00002 ETH on Arbitrum) from the total expected value before placing a bid.

<Tip>
  Call `bidder.recordRoundResult(round, profitWei)` after each won round to feed the historical calibration system. More data leads to more accurate bid sizing.
</Tip>

## Express Lane Resale

A key revenue multiplier: if you win a round but do not need the full 60 seconds of express lane access, you can resell capacity to other searchers.

### How Resale Works

1. Win an express lane round for cost X
2. Other searchers pay you USDC via x402 micropayments for sub-round access
3. The `resellExpressLane(buyer, pricePaidUsdc)` method grants the buyer express lane forwarding rights for the remainder of the round
4. Multiple resale slots can be active simultaneously within a single round

### Revenue Model

The total revenue from a won round can come from three sources:

<CardGroup cols={3}>
  <Card title="Direct MEV" icon="coins">
    Profit from executing priority arbitrage, liquidations, and backruns during the 200ms window.
  </Card>

  <Card title="Resale Revenue" icon="money-bill-transfer">
    USDC payments from other searchers who buy sub-round express lane access.
  </Card>

  <Card title="Skill Execution" icon="wand-magic-sparkles">
    Other agents pay USDC to use the express lane as a paid skill via the MCP server.
  </Card>
</CardGroup>

## TimeBoost Vault Contract

The **TimeBoostVault** Stylus contract manages the financial infrastructure for bidding and resale:

* **Bid funding**: agents deposit ETH or USDC that the vault uses for auction bids
* **Resale payments**: authorized buyers pay USDC to the vault in exchange for express lane transaction forwarding
* **Earnings tracking**: the contract tracks `total_resale_earnings` and `total_bid_cost` for P\&L calculation
* **Owner withdrawal**: accumulated profits can be withdrawn by the vault owner

<Note>
  The TimeBoostVault is a Stylus contract written in Rust. It manages the USDC payment flow for resale but does not directly interact with the auctioneer. The off-chain `TimeBoostBidder` handles bid submission.
</Note>

## Auctioneer Stats

The bidder can query aggregate auction statistics to inform bidding strategy:

```typescript theme={"theme":{"light":"dracula","dark":"dracula"}}
const stats = await bidder.refreshAuctioneerStats();
// stats.avgWinningBidWei — average winning bid over recent rounds
// stats.recentRounds    — number of rounds in the sample
// stats.winRate         — our win rate percentage
```

Stats are cached for 5 minutes to avoid excessive RPC calls.

## Risk Factors

<Warning>
  TimeBoost bidding involves real financial risk. Consider these factors before enabling automated bidding.
</Warning>

| Risk               | Description                                                   |
| ------------------ | ------------------------------------------------------------- |
| **Overbidding**    | Bidding more than the MEV you can extract leads to losses     |
| **Execution risk** | Winning the round does not guarantee profitable MEV execution |
| **Competition**    | Sophisticated searchers dominate most rounds                  |
| **Capital lockup** | Bid capital is committed for the round duration               |
| **Gas costs**      | Failed strategies still consume gas                           |

## Configuration

The `TimeBoostBidder` accepts these configuration options:

| Option                  | Type     | Default                                | Description                               |
| ----------------------- | -------- | -------------------------------------- | ----------------------------------------- |
| `privateKey`            | `Hex`    | Required                               | Signing key for bids and express lane txs |
| `rpcUrl`                | `string` | Arbitrum One public RPC                | Arbitrum RPC endpoint                     |
| `auctioneerUrl`         | `string` | `https://arb1-auctioneer.arbitrum.io/` | TimeBoost auctioneer RPC endpoint         |
| `minProfitThresholdWei` | `bigint` | `0n`                                   | Minimum expected profit to place a bid    |

## Example Usage

```
Enable TimeBoost bidding with a 0.001 ETH minimum profit threshold
```

```
What's the current express lane status?
```

```
How many TimeBoost rounds have we won this session?
```

```
Resell express lane access at 5 USDC per slot
```
