Cacaoswap arbitrage: when fees erase a spread

CacaoSwap is a web interface for Maya Protocol's native cross-chain swaps. Arbitrage depends on whether buying and selling across a price gap leaves a surplus after the full strategy's costs, including Maya's liquidity fees and outbound charges.

Compare prices for the amount being traded

Maya Protocol's August 22, 2024 introduction described CacaoSwap's markets page as a place to identify arbitrage opportunities. For an arbitrage decision, use quotes for the intended quantity on both sides of the trade, with the asset and network identified. A percentage gap between displayed market prices doesn't establish the output available at that size.

Compare expected sale proceeds with the acquisition cost and any charges those amounts don't already include. If the strategy requires another transfer or conversion to complete it, include that cost too. A fee already deducted from a quoted output shouldn't be subtracted a second time.

Fees inside the Maya swap

A Maya swap between two non-CACAO assets uses two CACAO-linked pools. The slip-based liquidity fee applies in each pool, although the user sees a combined fee and slip value. The input amount relative to each relevant pool's depth affects the result, so a price difference can shrink when evaluated for the full trade amount.

Visual summary: Cacaoswap arbitrage: Fees inside the Maya swap

Open full-size image

Maya's outbound charge is based on stored gas costs for the destination chain. It isn't a fixed percentage of the trade value. Together, the liquidity fee and chain-specific outbound cost mean there's no universal percentage spread that establishes break-even. The costs of any separate buying or selling leg also belong in that calculation.

Separate trades have separate execution risk

Maya handles the internal pool transitions of a native swap together. That supports one exchange through the protocol; an arbitrage strategy involving a separate trade also depends on that trade's price and availability.

If a later trade requires assets received from the first swap, the price gap can change before those assets are available. In that case, an estimate using both initial prices remains conditional on the later price holding. Completion of the Maya swap alone doesn't establish the profitability of the combined trades.

Decision checklist for an arbitrage candidate

  • Check that the chosen assets are admitted to Maya and the pools are open for swaps after bootstrap .
  • Compare quotes for the intended amount, including the quantity available for any dependent sale, in a common valuation unit.
  • Exclude a candidate whose expected proceeds don't cover acquisition, execution, and any required transfer or conversion costs, with each charge counted once.
  • When a later trade depends on cross-chain receipt, keep the expected margin conditional on its price and availability at execution.
- updated