- Get Started
- Become an Anchor
- Stellar Attachment Convention
- Compliance Protocol
- Add Stellar to your Exchange
- Hardware Requirements
- Issuing Assets
- Build Stellar Apps
- Contribution Guide
Anchors are entities that people trust to hold their deposits and issue credits into the Stellar network for those deposits. All money transactions in the Stellar network (except lumens) occur in the form of credit issued by anchors, so anchors act as a bridge between existing currencies and the Stellar network. Most anchors are organizations like banks, savings institutions, farmers’ co-ops, central banks, and remittance companies.
Before continuing, you should be familiar with:
As an anchor, you should maintain at least two accounts:
For this guide, we’ll use the following keys:
There are two simple ways to account for your customers’ funds:
Maintain a Stellar account for each customer. When a customer deposits money with your institution, you should pay an equivalent amount of your custom asset into the customer’s Stellar account from your base account. When a customer needs to obtain physical currency from you, deduct the equivalent amount of your custom asset from their Stellar account.
This approach simplifies bookkeeping by utilizing the Stellar network instead of your own internal systems. It can also allow your customers a little bit more control over how their account works in Stellar.
Use federation and the
memo field in transactions to send and receive payments on behalf of your customers. In this approach, transactions intended for your customers are all made using your base account. The
memo field of the transaction is used to identify the actual customer a payment is intended for.
Using a single account requires you to do additional bookkeeping, but means you have fewer keys to manage and more control over accounts. If you already have existing banking systems, this is the simplest way to integrate Stellar with them.
You can also create your own variations on the above approaches. For this guide, we’ll follow approach #2—using a single Stellar account to transact on behalf of your customers.
In order to act as an anchor, your infrastructure will need to:
Stellar provides a prebuilt federation server and regulatory compliance server designed for you to install and integrate with your existing infrastructure. The bridge server coordinates them and simplifies interacting with the Stellar network. This guide demonstrates how to integrate them with your infrastructure, but you can also write your own customized versions.
When using the above services, a complex payment using federation and compliance works as follows:
When someone is sending a transaction to you, the flow is slightly different:
While these steps can seem complicated, Stellar’s bridge, federation, and compliance services do most of the work. You only need to implement four callbacks and create a stellar.toml file where others can find the URL of your services.
In the rest of this guide, we’ll walk through setting up each part of this infrastructure step by step.