Skip to content

Gasless Trading (1CT)

One-Click Trading lets a user authorize a signing key once, onchain, and then trade without wallet popups and without paying gas. Every subsequent order is an offchain EIP-712 signature that the protocol relays and executes.

Direct onchain1CT
Wallet popup per tradeYesNone
Gas per tradeTrader paysProtocol pays
Time to submitWallet confirmation + broadcastSub-second
Oracle payloadYou fetch and attach itRelayer handles it
Main wallet keySigns every transactionNever used after setup

How it works

main wallet                 1CT signing key              LeverUp relayer            Diamond
    │                            │                             │                       │
    │ ① authorizeAgent(...)  ────┼─────────────────────────────┼──────────────────────►│
    │    one transaction, once   │                             │                       │
    │                            │                             │                       │
    │ ② click "Long" ───────────►│ EIP-712 sign (silent)       │                       │
    │                            │ POST /v2/trading/submit-intent                      │
    │                            ├────────────────────────────►│                       │
    │                            │                             │ batch + oracle prices │
    │                            │                             ├──────────────────────►│
    │                            │                             │        verify + execute
    │◄────────────── status ─────┴─────────────────────────────┴───────────────────────│

The signing key can only express trading intent. It cannot transfer tokens, cannot withdraw, and cannot act outside the permission bits the user granted. See Security Model.

Integration modes

ModeWho signsAuthorizationTypical use
Browser keyA key generated and stored in the user's browserauthorizeAgent(localKey, …)Frontends, wallets
Hosted agentA key your backend holdsauthorizeAgent(botAddress, …), optionally restricted per actionTrading bots, copy trading, managed strategies
Self-signingThe trader's own keyNone neededsigner == trader is accepted directlyBackend scripts, CLIs, integrators holding their own key

Self-signing is the fastest way to try 1CT: no authorization transaction, and you still get gas covered and oracle handling done for you.

What you can do

Fourteen operations, covering everything the onchain path supports:

market open · limit open · market close · batch close · partial close · cancel limit order · update limit order TP/SL · add margin · remove margin · update position TP/SL · create TP/SL orders · update TP/SL orders · cancel TP/SL order · cancel all TP/SL orders on a position

Full list with parameters: Actions Reference.

Endpoints

Base URL: https://oneclick-01-keeper.leverup.xyz

MethodPathPurpose
GET/v2/trading/anti-ddos-configPer-action execution fee configuration
POST/v2/trading/submit-intent?blockchain=MONADSubmit a signed intent, returns intentHash
GET/v2/trading/{intent_hash}/statusPoll execution status

Integration steps

StepWhatHow often
1Prepare config — Diamond address, chain id, service URLonce
2Prepare a signing keyonce per user
3Authorize the agent onchainonce per user (skip when self-signing)
4Cache the execution fee configon start, refresh every 60s
5Build actionDataper trade
6Sign the intentper trade
7Submit and pollper trade

A working implementation of steps 4–7 is on the Reference Client page.

Prerequisites

  • ERC-20 collateral only. Native MON is not supported through 1CT — wrap it to WMON first.
  • Approve the Diamond for both your collateral token and the execution fee token, before the first trade. If they are the same token, the allowance must cover amountIn + extraFee + antiDdosFee.
  • Referrals work here too. broker and extraFee are carried on every fee-charging action — see Brokers & Referrals.
  • Trade parameters (qty at 1e10, prices at 1e18, tokenIn/lvToken pairing) are identical to the onchain path. Read Precision & Units and Core Concepts first.

What is different from onchain

  1. You never send oracle data. The relayer fetches it. Intents carry no oracle payload.
  2. Execution is batched. Your intent is bundled with others and executed in one transaction.
  3. Failures are reported, not reverted. A rejected intent is skipped with a reason string rather than reverting a transaction you sent. See Submit & Track.
  4. Closes, margin changes and TP/SL creation require the position to be indexed. The relayer looks the position up to resolve its oracle feeds, so doing one of these immediately after opening can fail with 404 Position not found. Opens are unaffected, and so is cancelling or updating orders — including CANCEL_ALL_DECREASE_ORDERS, which takes a positionHash but needs no lookup. See Actions Reference.

Next: Security Model.

Trading perpetuals involves risk. Nothing here is financial advice.