Gasless Relayer

Submit gasless on-chain transactions using EIP-2612 permit signatures. The relayer pays gas on your behalf.

CTF Approval

Approve the settlement contract to transfer your CTF (Conditional Token) positions gaslessly.

POST /api/v1/relayer/ctf-approval

Request Body

{
  "chainId": 137,
  "owner": "0xYourAddress...",
  "operator": "0xSettlementContract...",
  "approved": true,
  "deadline": "1735689600",
  "v": 27,
  "r": "0x...",
  "s": "0x..."
}
FieldTypeDescription
chainIdint64Chain ID (e.g., 137)
owneraddressYour wallet address
operatoraddressSettlement contract to approve
approvedbooltrue to approve, false to revoke
deadlinestringPermit expiration (Unix timestamp as string)
vuint8Signature component
rstringSignature component (32 bytes hex)
sstringSignature component (32 bytes hex)

Response

{
  "success": true,
  "tx_hash": "0xTransactionHash..."
}

Example

curl -X POST https://api.turbinefi.com/api/v1/relayer/ctf-approval \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "chainId": 137,
    "owner": "0xYourAddress",
    "operator": "0xSettlementContract",
    "approved": true,
    "deadline": "1735689600",
    "v": 27,
    "r": "0x...",
    "s": "0x..."
  }'

USDC Permit

Approve USDC spending gaslessly using an EIP-2612 permit. Use this for a one-time max approval so future orders don't need per-order permits.

POST /api/v1/relayer/usdc-permit

Request Body

FieldTypeDescription
chainIdint64Chain ID (e.g., 137)
owneraddressYour wallet address
spenderaddressContract to approve for spending
valuestringAmount to approve (as string). Use uint256.max for unlimited
deadlinestringPermit expiration (Unix timestamp as string)
vuint8Signature component
rstringSignature component (32 bytes hex)
sstringSignature component (32 bytes hex)

Response

{
  "success": true,
  "tx_hash": "0xTransactionHash..."
}

Example

curl -X POST https://api.turbinefi.com/api/v1/relayer/usdc-permit \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "chainId": 137,
    "owner": "0xYourAddress",
    "spender": "0xSettlementContract",
    "value": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
    "deadline": "1735689600",
    "v": 27,
    "r": "0x...",
    "s": "0x..."
  }'

CTF Redemption

Redeem CTF outcome tokens for USDC after a market resolves. The relayer submits the redeemPositionsWithPermit transaction on your behalf.

POST /api/v1/relayer/ctf-redemption

Request Body

FieldTypeDescription
chainIdint64Chain ID (e.g., 137)
owneraddressYour wallet address
collateralTokenaddressUSDC contract address
parentCollectionIdbytes32Parent collection (use zero bytes for top-level)
conditionIdbytes32Gnosis CTF condition identifier
indexSetsstring[]Outcome index sets to redeem (e.g., ["1", "2"])
deadlinestringPermit expiration (Unix timestamp as string)
vuint8Signature component
rstringSignature component (32 bytes hex)
sstringSignature component (32 bytes hex)
marketAddressaddressMarket contract address (optional, for PNL tracking)

Response

{
  "success": true,
  "tx_hash": "0xTransactionHash..."
}

Example

curl -X POST https://api.turbinefi.com/api/v1/relayer/ctf-redemption \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "chainId": 137,
    "owner": "0xYourAddress",
    "collateralToken": "0xUSDCAddress",
    "parentCollectionId": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "conditionId": "0xConditionId",
    "indexSets": ["1", "2"],
    "deadline": "1735689600",
    "v": 27,
    "r": "0x...",
    "s": "0x...",
    "marketAddress": "0xMarketContract"
  }'

Batch CTF Redemption

Redeem positions across multiple markets in a single transaction using Multicall3. More gas-efficient than individual redemptions.

POST /api/v1/relayer/batch-ctf-redemption

Request Body

FieldTypeDescription
chainIdint64Chain ID (e.g., 137)
owneraddressYour wallet address
redemptionsarrayArray of individual redemption data (see CTF Redemption fields above, plus marketAddress required)

Response

FieldTypeDescription
successboolWhether the transaction was submitted
txHashstringTransaction hash
statusstring"pending" or "confirmed"

Example

curl -X POST https://api.turbinefi.com/api/v1/relayer/batch-ctf-redemption \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "chainId": 137,
    "owner": "0xYourAddress",
    "redemptions": [
      {
        "marketAddress": "0xMarketA",
        "collateralToken": "0xUSDC",
        "parentCollectionId": "0x000...000",
        "conditionId": "0xConditionA",
        "indexSets": ["1", "2"],
        "deadline": "1735689600",
        "v": 27,
        "r": "0x...",
        "s": "0x..."
      }
    ]
  }'

Propose Resolution

Submit a resolution proposal for an expired market. The proposer asserts an outcome via the UMA Optimistic Oracle with a bond.

POST /api/v1/relayer/propose-resolution

Request Body

FieldTypeDescription
chainIdint64Chain ID (e.g., 137)
marketAddressaddressMarket contract address
proposeraddressYour wallet address
outcomeboolProposed outcome: true = YES, false = NO
deadlinestringPermit expiration (Unix timestamp as string)
vuint8Signature component
rstringSignature component (32 bytes hex)
sstringSignature component (32 bytes hex)
bondPermitDeadlinestringBond USDC permit deadline (optional, omit for testnet)
bondVuint8Bond permit signature component (optional)
bondRstringBond permit signature component (optional)
bondSstringBond permit signature component (optional)
The bond permit fields are required on mainnet where the proposer must post a UMA bond in USDC. On testnet, these can be omitted.

Response

{
  "success": true,
  "tx_hash": "0xTransactionHash..."
}

Example

curl -X POST https://api.turbinefi.com/api/v1/relayer/propose-resolution \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "chainId": 137,
    "marketAddress": "0xMarketContract",
    "proposer": "0xYourAddress",
    "outcome": true,
    "deadline": "1735689600",
    "v": 27,
    "r": "0x...",
    "s": "0x..."
  }'

Settle Market

Settle a market after the UMA oracle dispute window has passed (2 hours). Finalizes the winning outcome and enables redemptions.

POST /api/v1/relayer/settle-market

Request Body

FieldTypeDescription
chainIdint64Chain ID (e.g., 137)
marketAddressaddressMarket contract address
settleraddressYour wallet address
deadlinestringPermit expiration (Unix timestamp as string)
vuint8Signature component
rstringSignature component (32 bytes hex)
sstringSignature component (32 bytes hex)
winningOutcomeuint80 = YES, 1 = NO

Response

{
  "success": true,
  "tx_hash": "0xTransactionHash..."
}

Example

curl -X POST https://api.turbinefi.com/api/v1/relayer/settle-market \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
    "chainId": 137,
    "marketAddress": "0xMarketContract",
    "settler": "0xYourAddress",
    "deadline": "1735689600",
    "v": 27,
    "r": "0x...",
    "s": "0x...",
    "winningOutcome": 0
  }'

Get Pending Claims

Returns CTF redemptions waiting for on-chain confirmation.

GET /api/v1/pending-claims

Response

FieldTypeDescription
txHashstringRedemption transaction hash
userAddressaddressUser who redeemed
marketAddressaddressMarket contract address
marketIdstringMarket identifier
payoutint64Expected payout in USDC (6 decimals). 50000000 = $50
winningOutcomeint0 = YES, 1 = NO
submittedAtint64Unix timestamp when redemption was submitted

Example

curl "https://api.turbinefi.com/api/v1/pending-claims"

Get Failed Claims

Returns CTF redemptions that failed on-chain.

GET /api/v1/failed-claims

Response

The response fields are the same as pending claims.

Example

curl "https://api.turbinefi.com/api/v1/failed-claims"

Error Responses

All relayer endpoints return the same error format:

{
  "success": false,
  "error": "Description of what went wrong"
}

Common errors:

  • Invalid request body — Malformed JSON
  • Invalid address format — Address is not valid hex
  • Invalid signature format — r and s must be 66 characters (0x + 64 hex)
  • No relayer configured for chain — Chain ID is not supported