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
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.
Two directions of arbitrage
- Asset cheaper on native DEX
- Asset more expensive on native DEX
The third-party asset is cheaper on native DEX than on the external market.
- Withdraw the asset from the RWT/Asset pool
- Sell on external market at the higher price → receive USDC
- Convert USDC → RWT (mint at NAV or buy on native DEX)
- Return RWT to the pool
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
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)
execute_arb
execute_arb
Executes a single arbitrage trade. The engine either:A) Sells asset externally (native price < external price):
- Withdraws third-party asset from native DEX pool
- Sells on external market for USDC
- Converts USDC to RWT (mint at NAV or market buy)
- Returns RWT to the pool — TVL preserved
- Buys third-party asset on external market for USDC
- Deposits into native DEX pool
- Extracts equivalent RWT from pool at higher internal price
- Net RWT profit → DAO Treasury
ArbOperators)deposit_arb_capital
deposit_arb_capital
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)
withdraw_arb_capital
withdraw_arb_capital
Withdraws trading capital from the engine back to the DAO.Authority: Engine Authority (AREAL DAO)
update_arb_operators
update_arb_operators
Adds or removes operator wallets from the
ArbOperators whitelist.Authority: Engine Authority (AREAL DAO)Arbitrage Examples
- RWT / Gold
- RWT / BTC
- RWT / S&P500
Scenario: Gold is 2,345 on an external tokenized gold market.
- Engine withdraws 10 oz Gold from RWT/Gold pool
- Sells on external market: 10 × 23,450**
- Converts $23,450 USDC → RWT at current NAV
- Returns RWT to pool (equivalent to 10 oz Gold value)
- **Net profit: 5 spread) → DAO Treasury
Key Principle: TVL Preservation
The arbitrage engine does not drain liquidity from the native DEX pools. It substitutes one side of the pair:| Before arbitrage | After arbitrage |
|---|---|
| Pool: 50% RWT + 50% Gold | Pool: 55% RWT + 45% Gold |
| TVL: $1,000,000 | TVL: $1,000,050 (profit captured) |
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.