tanX Docupaper
AboutTrade
  • ABOUT
    • ๐Ÿ“’tanX Docupaper
  • TECH
    • ๐Ÿ‘ฉโ€๐Ÿ’ปTech Docupaper
      • ๐ŸจHigh level architecture
      • ๐Ÿค”Starkware logic
      • ๐ŸŒŠTransactional flow
        • Off-chain accounts
        • The deposit flow
        • The withdrawal flow
        • The trade flow
        • The transfer flow
        • Full withdrawal
    • ๐Ÿ”ŒAPI Documentation
      • ๐Ÿ˜‹Getting started
        • Test connectivity
      • ๐Ÿ“ˆMarket
        • 24hr Tickers Price
        • K-line/Candlestick data
        • Orderbook
        • Recent trades
      • โ†”๏ธTrading
        • Create order
        • Get order
        • List orders
        • Cancel order
        • Bulk Cancel
        • List trades
      • ๐Ÿ”Account
        • Generating L2 Key Pairs
        • Login
        • Deposit
        • Withdrawal
        • Profile Information
        • Balance details
        • Profit and loss details
      • ๐ŸŒWeb-socket stream
        • ๐Ÿ—๏ธPrivate web-socket connection
        • ๐Ÿ‘ฅPublic websocket connection
      • โœจInternal Transfer
        • Create Internal Transfer
        • Get Internal Transfer
        • Check User Existence
        • List Internal Transfers
      • ๐ŸงชSDK Reference
        • NodeJS SDK
        • Python SDK
  • LEGAL
    • โ€ผ๏ธtanX Disclaimer
Powered by GitBook
On this page

Was this helpful?

  1. TECH
  2. Tech Docupaper
  3. Transactional flow

The withdrawal flow

PreviousThe deposit flowNextThe trade flow

Last updated 1 year ago

Was this helpful?

Before withdrawal can occur, Starkware requires transferring the funds from your tanX User vault to another off-chain vault that is identified with the same userโ€™s Ethereum address instead of their Stark key.

The add_transaction API with the TransferRequest transaction type registers the Ethereum address.

You can enable registration in your off-chain applicationโ€™s logic in one of the following ways:

  • Your user enters a request to transfer the funds from the vault with their Stark key to a vault that they identify with their Ethereum address.

  • When your application prompts the user for the information required to send a WithdrawalRequest transaction to the Starkware gateway, it also prompts them to enter the parameters necessary to execute a TransferRequest transaction, and your application executes the transfer as a seamless step in the withdrawal process.

The basic withdrawal flow takes place as detailed here, as tanX transfers the funds to the user in a trust-less way.

๐Ÿ‘ฉโ€๐Ÿ’ป
๐ŸŒŠ
Withdrawal flow architecture