Skip to main content

What is Kipseli PropAMM?

Kipseli PropAMM is a professional Automated Market Maker deployed on Base that enables token swaps with competitive, on-chain pricing. Integrators can get quotes and execute swaps by combining on-chain contract calls with a lightweight signing API.

Contract Addresses (Base Mainnet)


Contract Interfaces

Router (IPropAmm)

interface IPropAmm {
    function swap(
        address tokenIn,
        uint amountIn,
        address tokenOut,
        uint minOutAmount,
        uint quoteTimestamp,
        bytes calldata verificationData
    ) external returns (uint amountOut);

    function quote(
        address tokenIn,
        uint amountIn,
        address tokenOut,
        uint timestampInMilisec,
        bytes memory sig
    ) external view returns (uint amountOut);
}

Helper (IQuoteLens)

interface IQuoteLens {
    function getListedTokens() external view returns (address[] memory);
    function getQuoteToken() external view returns (address);
    function getReserveBalances(address[] memory tokens) external view returns (uint[] memory);
}

Whitelist Requirement

Both on-chain quoting (EIP-712 signature) and the swap signing API require your address to be whitelisted. Contact the Kipseli team and provide your signing address to get access.

Integration Overview

Getting a Quote

Choose one of two methods: Method 1 — On-chain via EIP-712 signature
  1. Generate timestampInMilisec (current time in ms). Must be within 10 seconds of the current block.
  2. Sign the EIP-712 typed data with your whitelisted key (see EIP-712 Signature below).
  3. Call quote(tokenIn, amountIn, tokenOut, timestampInMilisec, signature) on the Router.
  4. Receive amountOut — your expected output amount.
Method 2 — Off-chain via API Call GET /v1/price to get the live on-chain orderbook for all configured pairs. See Get Orderbook.

Executing a Swap

Step 1 — Get verification data Call POST /v1/swap/sign with your swap parameters. The API returns verificationData and timestamp. See Request Swap Verification. Step 2 — Approve the Router
IERC20(tokenIn).approve(
    0x71C2Ed90CC288229Be59F26b8B3EEF3C07d7ab99,
    amountIn
);
Step 3 — Call swap()
IPropAmm(0x71C2Ed90CC288229Be59F26b8B3EEF3C07d7ab99).swap(
    tokenIn,
    amountIn,
    tokenOut,
    minOutAmount,      // slippage protection — derive from quote()
    timestamp,         // from API response
    verificationData   // from API response
);
Both timestamp and verificationData must be passed directly from the API response without modification. If either is changed or expired, the transaction will revert.

EIP-712 Signature

To call quote() on-chain, you must sign the following struct with a whitelisted key:
PropAmmVerification(
    address tokenIn,
    address tokenOut,
    uint256 timestampInMilisec
)
Domain:
{
  "name": "VerificationImpl",
  "version": "1",
  "chainId": 8453,
  "verifyingContract": "0xCa369e97cc161c3c3a7368f9bC55A47F36a0A91E"
}
Example (ethers.js):
const domain = {
  name: "VerificationImpl",
  version: "1",
  chainId: 8453,
  verifyingContract: "0xCa369e97cc161c3c3a7368f9bC55A47F36a0A91E",
};

const types = {
  PropAmmVerification: [
    { name: "tokenIn", type: "address" },
    { name: "tokenOut", type: "address" },
    { name: "timestampInMilisec", type: "uint256" },
  ],
};

const value = { tokenIn, tokenOut, timestampInMilisec };

const signature = await signer.signTypedData(domain, types, value);

// Call on-chain:
// quote(tokenIn, amountIn, tokenOut, timestampInMilisec, signature)

Fee Structure

The fee field in swap requests uses 0.1 bps resolution:
ValueRate
10.1 bps (0.001%)
101 bps (0.01%)
303 bps (0.03%)
10010 bps (0.10%)
  • Fee is deducted from the output amount (amountOut).
  • Fees are settled monthly in a mutually agreed currency (e.g. USDC, ETH).

Error Format

All API errors follow a consistent envelope:
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "tokenIn: invalid EVM address",
    "requestId": "abc-123"
  }
}
CodeHTTP StatusDescription
INVALID_JSON400Malformed or missing JSON body
UNSUPPORTED_FIELD400Unknown field in request body
VALIDATION_ERROR422Field-level validation failure
SIGNING_FAILED500secp256k1 signing error
ENCODING_FAILED500ABI encoding error
INTERNAL_ERROR500Unexpected server error