Get swap amounts

Get swap amounts on Tessera

Base
Base

Reads onchain state

Reads what Tessera, Wintermute's on-chain market-making venue, would pay right now for an exact input. The venue's own view prices the swap at the quote its market maker posted this block and returns the input it would take and the output it would pay; a pair the venue does not quote answers zero. Reach for it to set a swap floor from the live quote with a slippage haircut, to compare Tessera against another venue before routing, or to gate a trade on a minimum rate with a predicate.

Plug lets you combine onchain actions like this one into a single transaction, without writing a smart contract. Use in App opens a new plug with this action already in it.

USDC Into cbBTC and ETH Limit Buy

tessera
hanji
3actions
  1. 1·Get swap amounts

    Step one reads from Tessera, Wintermute's on-chain market-making venue, what 2 USDC would currently receive in cbBTC for an exact input, producing a live quote.

  2. 2·Swap with allowances

    Using that quoted cbBTC amount, this step swaps 2 USDC against Tessera at the price its engine quotes this block, so the trade executes on the number just read rather than a stale one.

  3. 3·Place market order with target value

    Separately, 2 USDC is spent on the Hanji ETH/USDC order book to buy ETH at market, with execution capped at a maximum price of 5000.

Get amount received for to
Swap for with exact
Spend on for at a price of at most
  • USDC Into cbBTC and ETH Limit Buy

    tessera
    hanji

More on Tessera · 1