SEP-24: Deposits & Withdrawals
Supporting deposits and withdrawals of an asset on and off the Stellar network requires cooperation between wallet (client) and anchor (server) applications. In this section, we’ll only go over the steps necessary for building a SEP-24 server, but we also have documentation for building a wallet.
Specifically, we will go over SDF’s Tools and References as well as all three stages of the development process:
The complete customer experience from deposit to withdrawal goes something like this:
- The customer opens the SEP-24 wallet application of their choice
- The customer selects an asset to deposit and the wallet finds an anchor (clients could also chose the specific anchor)
- Once the wallet authenticates with the anchor, the customer begins entering their KYC and transaction information requested by the anchor
- The wallet provides instructions, and the customer deposits real fiat currency with the anchor (e.g. makes a bank transfer)
- Once the wallet receives the deposit, the customer receives the tokenized asset on the Stellar network from the anchor’s distribution account
The customer can then use the digital asset on the Stellar network for remittance, payments, trading, store of value, or another use case not listed here. At some later date, the customer could decide to withdraw their assets from the Stellar network, which would look something like this:
- The customer opens their wallet application
- The customer selects the asset for withdrawal and wallet finds the anchor
- After authenticating with the anchor, the wallet opens the given interactive URL and allows the customer to enter their transaction information (KYC has already been collected)
- After asking for customer approval, the wallet sends the specified amount of the customer’s asset balance to the anchor’s distribution account on Stellar
- Once the anchor receives the payment, the customer receives the withdrawn funds via bank transfer.
As already mentioned, this guide will focus on the Interactive Anchor/Wallet Asset Transfer SEP (aka SEP-24), but SEP-24 requires SEP-1, which links meta-information to organizations and assets (which we go over in detail with this guide), and SEP-10, which creates authenticated user session.
Last updated Jul. 27, 2021