Skip to main content
POST
/
v1
/
swap
/
sign
curl --request POST \ --url https://propamm.kipseli.win/v1/swap/sign \ --header 'Content-Type: application/json' \ --data ' { "tokenIn": "0x4200000000000000000000000000000000000006", "tokenOut": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", "fee": "3000", "userAddress": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" } '
{ "verificationData": "0xabcdef...", "timestamp": 1741737600 }
Before executing a swap on-chain, call this endpoint to obtain verificationData and timestamp. Both values must be passed directly into the swap() function — if either is modified or expired, the transaction will revert. Optionally, pass amountIn (and minAmountOut) to receive pre-built calldata ready for direct submission.

Swap Execution Flow

Step 1 — Call this endpoint

Minimal (verification data only):
curl -X POST https://propamm.kipseli.win/v1/swap/sign \
  -H "Content-Type: application/json" \
  -d '{
    "tokenIn":     "0x4200000000000000000000000000000000000006",
    "tokenOut":    "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "fee":         "30",
    "userAddress": "0x1111111111111111111111111111111111111111"
  }'
Response:
{
  "verificationData": "0x...",
  "timestamp": 1741737600
}
With calldata (pass amountIn and optionally minAmountOut):
curl -X POST https://propamm.kipseli.win/v1/swap/sign \
  -H "Content-Type: application/json" \
  -d '{
    "tokenIn":      "0x4200000000000000000000000000000000000006",
    "tokenOut":     "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "fee":          "30",
    "userAddress":  "0x1111111111111111111111111111111111111111",
    "amountIn":     "1000000000000000000",
    "minAmountOut": "3150000000"
  }'
Response:
{
  "verificationData": "0x...",
  "timestamp": 1741737600,
  "calldata": "0x..."
}
The calldata field is ABI-encoded for swap(address,uint256,address,uint256,uint256,bytes) and can be submitted directly to the router without further encoding.

Step 2 — Approve the Router

IERC20(tokenIn).approve(
    0x71C2Ed90CC288229Be59F26b8B3EEF3C07d7ab99,
    amountIn
);

Step 3 — Execute the swap on-chain

Option A — build the call yourself:
IPropAmm(0x71C2Ed90CC288229Be59F26b8B3EEF3C07d7ab99).swap(
    tokenIn,
    amountIn,
    tokenOut,
    minOutAmount,      // slippage protection — use quote() to calculate
    timestamp,         // from API response
    verificationData   // from API response
);
ParameterDescription
tokenInInput token address
amountInAmount of input token (in token decimals)
tokenOutOutput token address
minOutAmountMinimum acceptable output — set this to protect against slippage
timestampReturned by this API — pass through unchanged
verificationDataReturned by this API — pass through unchanged
Option B — use the calldata from the API (requires amountIn in Step 1):
(bool success, ) = address(0x71C2Ed90CC288229Be59F26b8B3EEF3C07d7ab99).call(calldata);
require(success, "swap failed");
The calldata is already ABI-encoded for swap(address,uint256,address,uint256,uint256,bytes) — no further encoding needed.

Fee Parameter

The fee field uses 0.1 bps resolution:
ValueRate
10.1 bps (0.001%)
101 bps (0.01%)
303 bps (0.03%)
10010 bps (0.10%)
The fee is deducted from the output amount (amountOut) and settled monthly in a mutually agreed currency.

Body

application/json
tokenIn
string
required

EVM hex address of the input token (checksummed or lowercase)

Example:

"0x4200000000000000000000000000000000000006"

tokenOut
string
required

EVM hex address of the output token (checksummed or lowercase)

Example:

"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"

fee
string
required

Fee tier as a decimal string in 0.1 bps resolution(e.g. "3000" = 3%)

Example:

"3000"

userAddress
string
required

EVM hex address of the user submitting the swap

Example:

"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"

amountIn
string

Input token amount in wei as a decimal string. When provided, the response will include a calldata field with ABI-encoded calldata for the swap function.

Example:

"1000000000000000000"

minAmountOut
string

Minimum accepted output token amount in wei as a decimal string. Only used when amountIn is provided. Defaults to 0 if omitted.

Example:

"3150000000"

Response

Quote signed successfully

verificationData
string

ABI-encoded hex string (with 0x prefix) containing (fee, originRate, userAddress, signature). Pass this directly to the on-chain verification contract.

Example:

"0xabcdef..."

timestamp
integer<int64>

Unix timestamp (seconds) at which the signature was generated

Example:

1741737600

calldata
string

ABI-encoded calldata (with 0x prefix) for the swap(address,uint256,address,uint256,uint256,bytes) function. Only present when amountIn was provided in the request. The encoded arguments are (tokenIn, amountIn, tokenOut, minAmountOut, quoteTimestamp, verificationData).

Example:

"0x..."