Skip to main content

Overview

The Arbitrage Yield Engine generates yield for AREAL DAO by capturing price discrepancies on third-party assets that are paired with RWT on the native DEX. AREAL DAO creates liquidity pools pairing RWT with real-world and crypto assets — RWT/BTC, RWT/SOL, RWT/Gold, RWT/S&P500, and others. These third-party assets also trade on external markets. When the price of an asset on an external market diverges from its price on AREAL’s native DEX, the engine captures the spread — growing the pool’s capital without changing its TVL structure. 100% of arbitrage profit is directed to AREAL DAO Treasury.

How It Works

The setup

AREAL DAO creates dedicated arbitrage pairs on the native DEX — RWT paired with widely-traded assets:

Crypto assets

RWT/BTC, RWT/SOL, RWT/ETH — paired with wrapped versions of major cryptocurrencies that trade on every external DEX

Real-world assets

RWT/Gold (XAUT), RWT/S&P500, RWT/Equities — paired with tokenized traditional assets that have clear external reference prices
These assets are not Ownership Tokens — they are third-party tokens with deep external liquidity and well-established market prices.

The arbitrage mechanism

Price divergence detected

The engine monitors the price of the third-party asset (e.g., Gold) on the native DEX pool and compares it to external market prices. When a spread exceeds the minimum threshold, an opportunity is flagged.

Asset extracted from pool

The engine withdraws the cheaper asset from the native DEX pool. For example, if Gold is priced lower on the native DEX than on the external market, the engine takes Gold from the RWT/Gold pool.

Sold on external market

The extracted asset is sold on the external market at the higher price, generating USDC (or equivalent stablecoin) proceeds.

Proceeds converted to RWT

The USDC proceeds are converted to RWT (via mint at NAV or market buy) and returned to the pool — replacing the extracted asset with RWT of equal or greater value.

Pool TVL preserved, capital grows

The pool’s total value remains the same (or increases slightly from the spread), but the composition shifts: less third-party asset, more RWT. The net profit goes to AREAL DAO Treasury.

Two directions of arbitrage

The third-party asset is cheaper on native DEX than on the external market.
  1. Withdraw the asset from the RWT/Asset pool
  2. Sell on external market at the higher price → receive USDC
  3. Convert USDC → RWT (mint at NAV or buy on native DEX)
  4. Return RWT to the pool
Result: pool has less asset, more RWT. Profit captured.

On-Chain Accounts

ArbConfig

Global configuration: minimum spread threshold (basis points), maximum trade size, list of enabled arbitrage pairs, and DAO Treasury destination. Seeds: ["arb_config"].

ArbPair

Per-pair configuration PDA. Each arbitrage pair (e.g., RWT/Gold ↔ external Gold market) has its own config: spread threshold, max trade size, external market reference, and cumulative profit tracker. Seeds: ["arb_pair", native_pool].

ArbOperators

Whitelist of wallet addresses authorized to execute arbitrage trades. Managed by Engine Authority. Only whitelisted AREAL team bots can call execute_arb. Seeds: ["arb_operators"].

ArbStats

Cumulative statistics: total profit captured, number of trades, average spread, profit per pair breakdown. On-chain transparency for DAO reporting. Seeds: ["arb_stats"].

Core Instructions

register_arb_pair

Registers a native DEX pool as an arbitrage-enabled pair. Links the pool’s third-party asset to its external market reference. Only pairs where the non-RWT side is a third-party asset (not an Ownership Token) can be registered.Authority: Engine Authority (AREAL DAO)
Accounts:
  - engine_authority:    Signer
  - arb_config:          PDA
  - arb_pair:            PDA (init)
  - native_pool:         Native DEX pool PDA (RWT/third-party asset)
  - system_program

Args:
  - external_market_ref: Pubkey  External market identifier (DEX pool, oracle feed)
  - min_spread_bps: u16          Minimum spread to trigger (e.g., 30 = 0.3%)
  - max_trade_size: u64          Max trade size per execution (in USD equivalent)
Executes a single arbitrage trade. The engine either:A) Sells asset externally (native price < external price):
  1. Withdraws third-party asset from native DEX pool
  2. Sells on external market for USDC
  3. Converts USDC to RWT (mint at NAV or market buy)
  4. Returns RWT to the pool — TVL preserved
B) Buys asset externally (native price > external price):
  1. Buys third-party asset on external market for USDC
  2. Deposits into native DEX pool
  3. Extracts equivalent RWT from pool at higher internal price
  4. Net RWT profit → DAO Treasury
Runs inside MagicBlock Ephemeral Rollup for sub-millisecond execution.Authority: Whitelisted operator only (from ArbOperators)
Accounts:
  - operator:            Signer (must be in ArbOperators)
  - arb_config:          PDA
  - arb_pair:            PDA (mut)
  - arb_stats:           PDA (mut)
  - native_pool:         Native DEX pool (mut, CPI)
  - external_accounts:   External market accounts (variable, CPI)
  - arb_capital_ata:     Engine's trading capital (mut)
  - dao_treasury_ata:    DAO Treasury destination (mut)
  - rwt_vault:           RWT Vault PDA (for NAV-based minting path)
  - rwt_mint:            RWT mint (for minting path)
  - native_dex_program
  - token_program

Args:
  - direction: enum      { SellAssetExternally, BuyAssetExternally }
  - amount: u64          Trade size (in third-party asset units)
  - min_profit: u64      Minimum acceptable profit in RWT (slippage protection)
Deposits trading capital (USDC) into the engine for executing arbitrage trades. The capital cycles between native and external markets — it is not consumed but generates yield through spreads.Authority: Engine Authority (AREAL DAO)
Accounts:
  - engine_authority:    Signer
  - arb_config:          PDA
  - dao_source_ata:      DAO's USDC account (mut)
  - arb_capital_ata:     Engine's capital account (mut)
  - token_program

Args:
  - amount: u64          USDC capital to deposit
Withdraws trading capital from the engine back to the DAO.Authority: Engine Authority (AREAL DAO)
Accounts:
  - engine_authority:    Signer
  - arb_config:          PDA
  - arb_capital_ata:     Engine's capital account (mut)
  - dao_dest_ata:        DAO's USDC account (mut)
  - token_program

Args:
  - amount: u64          Capital to withdraw (0 = full balance)
Adds or removes operator wallets from the ArbOperators whitelist.Authority: Engine Authority (AREAL DAO)
Accounts:
  - engine_authority:    Signer
  - arb_operators:       PDA (mut)

Args:
  - wallet: Pubkey       Operator bot wallet
  - action: enum         { Add, Remove }

Arbitrage Examples

Scenario: Gold is 2,340onAREALnativeDEXbut2,340 on AREAL native DEX but 2,345 on an external tokenized gold market.
  1. Engine withdraws 10 oz Gold from RWT/Gold pool
  2. Sells on external market: 10 × 2,345=2,345 = **23,450**
  3. Converts $23,450 USDC → RWT at current NAV
  4. Returns RWT to pool (equivalent to 10 oz Gold value)
  5. **Net profit: 50(10×50** (10 × 5 spread) → DAO Treasury
Pool TVL stays the same — just more RWT, less Gold.

Key Principle: TVL Preservation

The arbitrage engine does not drain liquidity from the native DEX pools. It substitutes one side of the pair:
Before arbitrageAfter arbitrage
Pool: 50% RWT + 50% GoldPool: 55% RWT + 45% Gold
TVL: $1,000,000TVL: $1,000,050 (profit captured)
The pool always maintains both sides. The engine only shifts the ratio slightly — and the spread profit grows the total TVL over time. The Master Pool Rebalancer or natural trading activity restores the ratio.
The arbitrage capital (USDC) deposited by the DAO is the engine’s working capital for bridging between markets. It cycles continuously and is never locked — the DAO can withdraw it at any time.

MagicBlock Integration

Sub-millisecond execution

execute_arb runs inside the Ephemeral Rollup for the fastest possible execution. Arbitrage opportunities close within seconds — speed is critical.

Real-time price monitoring

The engine reads native DEX pool prices and external oracle feeds continuously inside the ER — detecting opportunities the moment they appear.

Security Considerations

Whitelisted operators

Only DAO-whitelisted bots can execute arbitrage. External users cannot call execute_arb — preventing front-running or sandwich attacks on the engine.

Profit-only execution

execute_arb requires min_profit > 0. The engine never executes at a loss. If the spread closes before execution, the transaction reverts.

TVL preservation

The engine substitutes assets in the pool, never drains them. Total pool value is maintained or increased — only the asset ratio shifts.

Capital isolation

Trading capital sits in a dedicated PDA. The engine cannot access vault, treasury, or any other protocol funds.

Third-party assets only

Only pools with third-party assets (BTC, SOL, Gold, equities) can be registered for arbitrage. Ownership Token pools are excluded — OT arbitrage could create unintended governance implications.

Full on-chain transparency

ArbStats tracks every trade, profit, and volume on-chain. The DAO can audit that 100% of profit reaches the Treasury.
The Arbitrage Yield Engine module is currently in development. This documentation describes the target architecture. Module code has not yet been audited.