1-Click Trading in Kana Perps

1-Click Trading allows users to trade seamlessly on Kana.trade without repeated wallet popups. By leveraging the delegation model, users can authorize a delegate account to execute trades on their behalf — securely and efficiently.


🚀 How It Works

When users connect a wallet (e.g., Petra, Martian, etc.) to the Kana Perps frontend, they are prompted to enable 1-Click Trading. Here’s what happens under the hood:

  1. User Signs a Message: The user signs a short message using their main wallet. This signature is used to verify ownership and generate a consistent, unique delegate key.

  2. Delegate Wallet Generation: On the frontend, a delegate account is created. This process uses:

    • A server-side secure key (salt)

    • The signed message This ensures a deterministic delegate address that is unique to the user and can be regenerated whenever they reconnect.

  3. Enable Delegation On-Chain: The frontend triggers a transaction to authorize the delegate account on-chain. This allows the delegate to manage positions and place/cancel orders, but not withdraw funds.

  4. Persistent 1-Click Experience: Every time the user reconnects using the same wallet, the same delegate address is derived and re-enabled, enabling consistent, no-popup trading.


🧠 Why It’s Secure

  • The delegate account is scoped by on-chain permissions — it can only interact with trading functions, never withdrawals.

  • Since delegation uses a server-held salt and signed message, only the original user can regenerate the same delegate.

  • Users can revoke or rotate delegates at any time from the UI or by direct on-chain action.


🔐 Requirements

To use 1-Click Trading:

  • A supported wallet extension (e.g., Petra, Nightly)

  • Sign a delegation-enabling message

  • Approve the on-chain delegation transaction


✅ Benefits

  • No repeated popups when trading

  • Faster execution, ideal for scalping or bot-assisted strategies

  • Maintains fund-level security — delegate can’t touch deposits or withdrawals


📌 Notes

  • Delegation is optional, but required for 1-Click Trading.

Last updated