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. All quotes are vs USDC.

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.

API Authentication

All HTTP API endpoints (/v2/*) require an API key. Pass it on every request via the X-API-KEY header:
-H "X-API-KEY: $KIPSELI_API_KEY"
Contact the Kipseli team to obtain your API key. Requests with a missing or invalid key return 401 UNAUTHORIZED.

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 /v2/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 /v2/swap/sign with your swap parameters. The API returns verificationData and timestamp. Optionally pass amountIn (and minAmountOut) to also receive pre-built calldata. See Request Swap Verification. Step 2 — Approve the Router
IERC20(tokenIn).approve(
    0x71C2Ed90CC288229Be59F26b8B3EEF3C07d7ab99,
    amountIn
);
Step 3 — Call swap() Option A — build the call yourself:
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.

Option B — use the calldata returned by the API (requires amountIn in Step 1):
(bool success, ) = address(0x71C2Ed90CC288229Be59F26b8B3EEF3C07d7ab99).call(calldata);
require(success, "swap failed");

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
UNAUTHORIZED401Missing or invalid API key
VALIDATION_ERROR422Field-level validation failure
SIGNING_FAILED500secp256k1 signing error
ENCODING_FAILED500ABI encoding error
INTERNAL_ERROR500Unexpected server error