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
| Chain | PropAMM |
|---|---|
| Base | 0x93f75BdaBb53d3423E036408930e7361f25D6eEc |
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);
| Parameter | Type | Description |
|---|---|---|
tokenIn | address | Input token |
tokenOut | address | Output token |
maxAmountIn | uint256 | Cap on the amount of input token spent |
maxAmountOut | uint256 | Cap on the amount of output token received |
limitPrice | UFixed18 | 18-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.
| Parameter | Type | Description |
|---|---|---|
tokenIn | address | Input token |
tokenOut | address | Output token |
maxAmountIn | uint256 | Cap on the amount of input token spent |
maxAmountOut | uint256 | Cap on the amount of output token received |
limitPrice | UFixed18 | 18-decimal fixed-point limit price |
to | address | Recipient of the output tokens |
callbackData | bytes | Forwarded to the caller's callback |
Returns amountIn and amountOut — the actual amounts swapped.
Integration overview
- Call
quoteto preview amounts for your limits and limit price. - Approve
tokenInon the PropAMM contract. - Call
swapwith the same parameters plus a recipient address and optionalcallbackData.