Website ↗
Integration Guide

Ulmo Markets PropAMM

Integrate with Ulmo Markets instant posted liquidity.

What is Ulmo Markets PropAMM?

Ulmo Markets PropAMM brings CEX-like pricing on-chain. It enables token swaps with competitive, on-chain pricing backed by Ulmo Markets' proprietary quoting engine.

Integrators can get quotes and execute swaps directly against the contract. The PropAMM exposes a quote function for previewing swap amounts and a swap function for execution, both gated by the hasEngine modifier.

Deployments

ChainPropAMM
Base0x93f75BdaBb53d3423E036408930e7361f25D6eEc

Contract interface

quote

Returns the amounts that would result from a swap given the caller's limits. This function is read-only (view).

function quote(address tokenIn, address tokenOut, uint256 maxAmountIn, uint256 maxAmountOut, UFixed18 limitPrice)
    external
    view
    hasEngine
    returns (uint256 amountIn, uint256 amountOut);
ParameterTypeDescription
tokenInaddressInput token
tokenOutaddressOutput token
maxAmountInuint256Cap on the amount of input token spent
maxAmountOutuint256Cap on the amount of output token received
limitPriceUFixed1818-decimal fixed-point limit price

Returns amountIn and amountOut — the actual amounts that would be swapped.

swap

Executes a swap against the PropAMM. Gated by the hasEngine modifier. Two overloads are available — with and without a callback.

function swap(
    address tokenIn,
    address tokenOut,
    uint256 maxAmountIn,
    uint256 maxAmountOut,
    UFixed18 limitPrice,
    address to,
    bytes calldata callbackData
) external hasEngine returns (uint256 amountIn, uint256 amountOut);
function swap(
    address tokenIn,
    address tokenOut,
    uint256 maxAmountIn,
    uint256 maxAmountOut,
    UFixed18 limitPrice,
    address to
) external hasEngine returns (uint256 amountIn, uint256 amountOut);

The second overload omits callbackData for direct swaps with no callback.

ParameterTypeDescription
tokenInaddressInput token
tokenOutaddressOutput token
maxAmountInuint256Cap on the amount of input token spent
maxAmountOutuint256Cap on the amount of output token received
limitPriceUFixed1818-decimal fixed-point limit price
toaddressRecipient of the output tokens
callbackDatabytesForwarded to the caller's callback

Returns amountIn and amountOut — the actual amounts swapped.

Integration overview

  1. Call quote to preview amounts for your limits and limit price.
  2. Approve tokenIn on the PropAMM contract.
  3. Call swap with the same parameters plus a recipient address and optional callbackData.