Kana Labs
  • Getting Started
    • Welcome to Kana Labs
  • CROSS CHAIN SWAPS
    • AMM DEX Aggregator
  • INTEGRATE KANA WIDGET
    • Kana Widget
      • Install Widget
      • Configure Widget
      • Configure Aptos Keyless
  • Web3 Aggregator SDK
    • Web3 Aggregator SDK
      • Installation
      • SameChain
      • Cross Chain Swap
      • Aggregator API's
  • SPOT TRADING PLATFORM
    • Kana Trade
      • API Docs
  • PERPETUAL FUTURES
    • Kana Perps
      • Getting Started
        • Mint Tokens on Testnet
      • Breaking Down Kana Perps
        • Assets Supported
        • Order Types
        • Orderbook
        • Funding Rate
        • Leverage
        • Margin and Liquidation
        • Hedge Mode
          • Hedging a Short-Term 2-3% Price Decline
          • Dual Positioning for Flexible Profit-Taking
        • Trading Fees
      • API Docs
        • Installation Setup
        • Kana Perps Typescript REST API
        • Kana Perps Python Websocket API
        • Kana Perps Python REST API
        • Steps to place an order
        • Perps Contract Error Codes
        • Websocket Connection
        • Supported Markets
    • Perpetual Exchange(2)
      • Technical Architecture
      • Features
        • 1-Click Trading in Kana Perps
        • Delegation
      • Tutorials
        • Getting Started
        • Connecting Wallet & Enabling “One Click Transaction”
        • Deposit & Withdraw Tokens
        • Placing a Market Trade Order
        • Placing a Limit Trade Order
        • Partially & Fully Closing a Live Trade Order
        • Adding Margin to an Open Position
        • Defining Take Profit & Stop Loss
      • For Developers & MMs
        • Installation setup
        • Available Markets
        • Integrating REST APIs
          • Typescript
          • Python
          • Walkthrough
        • Integrating WebSockets
        • FAQ
          • Faucets
  • SPOT & PERP APIs
    • Trading APIs
      • Kana Trade API
      • Kana Perps API
        • Installation Setup
        • Example setup functions
        • Kana Perps Typescript REST API
        • Kana Perps Websocket API
        • Kana Perps Python Websocket API
        • Kana Perps Python REST API
        • Steps to place an order
  • PAYMASTER SERVICE
    • Kana Paymaster For Aptos and Supra
      • How it works?
      • How to Register?
      • Deposit Allowance
      • Manage Users
      • Paymaster SDK Tutorial (Typescript)
      • Paymaster API
      • Module & Function Whitelist
      • Subscription - Coming soon
      • FAQS
  • PERPETUAL OPTIONS
    • OPerps
  • Tokenomics & Governance
    • Kana Labs Tokenomics
  • REWARDS & REFERRAL PROGRAM
    • Rewards Program
      • Reward Program Season 1
      • Reward Program Season 2
      • How to Keep Track of Your Points?
      • Where to find the Missions Dashboard?
  • Referral Program
    • How to Generate Referral Link? (For the Referrer)
    • How to map your wallet to the invite IDs? (For the invited users)
Powered by GitBook
On this page
  • Overview
  • Account Roles and Capabilities
  • Use Cases
  • Security Benefits
  • Implementation Notes
  1. PERPETUAL FUTURES
  2. Perpetual Exchange(2)
  3. Features

Delegation

In Kana Perps, we separate fund management from trading execution using a delegation model (optional). This architecture improves security, reduces wallet prompts, and enables features like one-click trading.

Overview

There are two account roles in this model:

  • Main Wallet: Custodian of funds. Only used for deposits and withdrawals.

  • Delegate Account: Authorized to place/cancel orders and manage positions on behalf of the main wallet. Cannot withdraw funds.

The main wallet is only used for deposits and withdrawals, while the delegate account is used to place/cancel orders and close positions. This separation allows us to offer one-click trading in the frontend by avoiding repeated wallet confirmations for each trade action.

Account Roles and Capabilities

Action
Main Wallet
Delegate Account

Deposit Funds

✅

❌

Withdraw Funds

✅

❌

Place Orders

❌

✅

Cancel Orders

❌

✅

Close/Update Positions

❌

✅

Transfer Between Profiles

✅

❌

💡 The delegate account cannot withdraw funds, ensuring user funds remain secure even if the delegate key is compromised.

Use Cases

This delegation setup is ideal for:

  • One-click trading (auto-signing trade ops)

  • Enabling bots or trading assistants with limited permissions

🆚 Delegated vs Non-Delegated Scripts

Use Case
Script Module

Trading via delegate account

delegated_scripts.move

Direct control (no delegate)

perpetual_scripts.move

Security Benefits

  • Fine-grained control (toggle, change, extend, remove)

  • Time-bounded delegation

  • Only one proxy per user

  • On-chain enforcement of delegation permissions

Implementation Notes

  • Delegation is established by the main wallet via an on-chain transaction.

  • Delegates can be added or removed at any time.

  • Delegated function are available on delegated_scripts while non delegated functions available on perpetual_scripts

  • All delegate actions are scoped and validated to ensure they cannot move funds.

⚠️ Always recommend users to review delegate permissions and rotate keys if suspicious activity is detected.

Previous1-Click Trading in Kana PerpsNextTutorials

Last updated 1 month ago