# On-chain swaps — openOracle use case

> Swaps settled at the oracle price, not at whatever a pool happens to quote.

Source: https://www.openoracle.org/use-cases/swaps

# ON-CHAIN SWAPS

The oracle game settles close to the true price, within a fraction of a standard deviation. A swap can settle directly at that price, so execution quality comes from the oracle’s accuracy rather than from whatever depth a pool happens to hold.

Written for Protocol teams and risk owners in this vertical

01 Today 02 What changes 03 Parameters 04 Next

01 // Today

## What breaks today

An AMM swap prices against whatever depth happens to be resting at that block, usually routed through aggregators. The price you get depends on pool state, not on a considered quote.

### Pool depth drives execution

Time-varying pool depth decides your execution quality

### Router and aggregator stack

Routers and aggregators add hops, fees and failure modes

### Arbitrage tax on LPs

Passive liquidity loses to arbitrage, and traders pay for that loss through fees and spreads

### State, not a considered quote

The price you get depends on pool state at that block, not on a quote sized to your trade

02 // What changes

## What openOracle changes

Propose, match, execute — the oracle game runs only after both sides commit

> openSwap is a fully on-chain request for quote. The swapper proposes, a matcher takes the other side and funds the oracle game as initial reporter, and once the game settles anyone can execute the swap at the oracle-implied price.

## ONE TICKET. NO ROUTER.

Swapper

Pair

WETH → USDC

Size

25.0 WETH

Envelope

±0.40%

Max game

4s

Matcher

Taker

0x91…D4C

Side

The other

Funds

L = 10%

Role

Reporter

Oracle game

Window

4s

Dispute

Anyone

Execute 1,842.50 At the settled price

03 // Parameters

## How to size it

There is no default configuration. These are a few settings that matter for this vertical and the direction to move them in. For further commentary on these and other important parameters, review the documentation.

01 Settlement time Short. openSwap matchers are advised to filter to a small fixed set — for example exactly 4 seconds — so one volatility model covers every game.

02 Initial liquidity At minimum ~10% of the swap amount, or enough size so dispute gas is cheap in percentage terms.

03 Multiplier 105 to 130, pairing with the 10% liquidity filter.

[PARAMETER REFERENCE ⟶](https://www.openoracle.org/build/integrate#parameters)[PRICE AN ATTACK ⟶](https://www.openoracle.org/security#cost)

▸ Reference

[openSwap introduction](https://docs.openoracle.org/openswap-v2/introduction) [Swapping](https://docs.openoracle.org/openswap-v2/swapping#creating-a-swap) [Providing liquidity](https://docs.openoracle.org/openswap-v2/providing-liquidity#matching-the-swap)

04 // Next

[Lending Liquidations priced by the market at the moment they matter, not by a committee. ⟶](https://www.openoracle.org/use-cases/lending) [Derivatives Opens, closes and liquidations priced by a game sized to the position. ⟶](https://www.openoracle.org/use-cases/derivatives)

[◂ All use cases](https://www.openoracle.org/use-cases)

Reach out to the openOracle team for guidance

[info@openoracle.org](mailto:info@openoracle.org)
