Skip to content

Commit 6a632dc

Browse files
authored
init (#1)
1 parent a5ac3b4 commit 6a632dc

File tree

145 files changed

+25451
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+25451
-0
lines changed

.eslintignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
dist
2+
node_modules
3+
docs
4+
.github
5+
build
6+
/*.js
7+
/*.ts
8+
/*.d.ts
9+
static
10+
.docusaurus

.eslintrc.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
extends: ["@stellar/eslint-config"],
3+
rules: {
4+
"import/no-unresolved": 0,
5+
},
6+
};

.github/workflows/main.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Format MDX and Lint
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout App Repo
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Node
19+
uses: actions/setup-node@v3
20+
with:
21+
node-version: '16'
22+
cache: 'yarn'
23+
cache-dependency-path: '**/yarn.lock'
24+
25+
- name: Install App Dependencies
26+
run: yarn --prefer-offline
27+
28+
- name: Format MDX with Prettier
29+
run: yarn check:mdx
30+
31+
- name: Lint with ESLint
32+
run: yarn lint:fix

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

.prettierrc.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
...require("@stellar/prettier-config"),
3+
// This is mostly content, and prose wrap has a way of exploding markdown
4+
// diffs. Override the default for a better experience.
5+
overrides: [
6+
{
7+
files: "*.mdx",
8+
options: {
9+
proseWrap: "never",
10+
},
11+
},
12+
],
13+
};

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Overview
3+
order: 10
4+
---
5+
6+
import { Alert } from "@site/src/components/Alert";
7+
8+
Supporting cross-border payments of an asset through the Stellar network requires cooperation between a sending anchor (**SA**) and receiving anchor (**RA**). In this section, we'll only go over the steps necessary for building a SEP-31 receiving anchor, but documentation for building a sending anchor is in development.
9+
10+
Specifically, we will go over the SDF's [Tools and References](./reference-implementations.mdx) as well as all three stages of the development process:
11+
12+
1. [Setting up a test server](./setting-up-test-server.mdx)
13+
1. [Setting up a production server](./setting-up-production-server.mdx)
14+
1. [Launching](./launch.mdx)
15+
16+
## The Basic User Experience
17+
18+
Unlike with SEP-24, SEP-31 involves a sending user (**SU**) and receiving user (**RU**), so both users' experience is described [here](../../anchoring-assets/enabling-cross-border-payments/setting-up-test-server/#stellar-docsearch-form).
19+
20+
<Alert>
21+
22+
Note: **SA**'s are not necessarily wallet applications. This means the **SU** may not interact with a mobile application, but could go to a website or physical remittance location instead. Obviously, this affects the **SU** experience.
23+
24+
</Alert>
25+
26+
Generally, the experience of the SU and RU would look something like this:
27+
28+
1. The **SU** opens an app, website, or goes to a physical remittance location
29+
1. The **SU** specifies the asset and amount to send, and the asset that should be received
30+
1. The **SA** finds the appropriate **RA** for the asset, authenticates with the **RA**, and parses the **RA**'s requirements for sending payments
31+
1. The **SA** collects both the **SU** and **RU** KYC information requested by the **RA** from the **SU**, as well as the transaction information
32+
- **RU**'s should not have to take any action to receive a cross-border payment
33+
- However, it is possible to require action from the **RU** if absolutely necessary
34+
1. The **SA** registers the **RU** and potentially **SU** with the **RA** via [SEP-12](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md)
35+
1. Once the **RA** is ready to receive the payment, the **SA** makes the Stellar path payment to the **RA** using the **SU** and **RU** assets
36+
1. Once the **RA** receives the path payment, it attempts make the associated off-chain transfer (usually bank transfer) using the KYC and transaction information sent by the **SA**
37+
1. If the transfer to the **RU** fails, the **SU** will be notified by the **SA** to update the invalid or missing fields, and the **RA** will retry once the **SA** sends the updated info.
38+
39+
The **RU** should then receive the funds sent by the **SA** once the **RA** has the necessary to make the final transfer.
40+
41+
<Alert>
42+
43+
Note: The final off-chain transfer by the **RA** may not be a bank transfer. For example, the destination could be a mobile money account managed by the **RA**. The methods used to transfer the payment off-chain to the **RU** is up to the **RA**, and **SA**s should be aware of the off-chain transfer methods of their partner **RA**s.
44+
45+
</Alert>
46+
47+
## Interoperability and Stellar Ecosystem Proposals
48+
49+
As mentioned, this section will outline how to implement a [SEP-31](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0031.md) receiver, but these servers require [SEP-1](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0001.md), [10](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0010.md), and [12](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md) to be implemented as well. SEP-1 is described in [this guide](../../issuing-assets/publishing-asset-info.mdx), and SEP-10 & 12 are described [here](../../anchoring-assets/enabling-cross-border-payments/setting-up-test-server.mdx#authentication).
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Launch
3+
order: 50
4+
---
5+
6+
Once the testnet and mainnet servers are deployed, KYC collection conforms to regulations, banking rails are integrated, and the whole system is audited, it's time to prepare for launch.
7+
8+
## Market Making
9+
10+
It is critical for an anchored asset to have liquid trading markets with XLM and ideally partner **SA** assets. Without a deep orderbook, its impossible to facilitate path payments at rates competivtive with equivalent off-chain fiat assets.
11+
12+
The SDF maintains a trading bot called [Kelp](https://kelpbot.io/) that supports many trading and market making strategies out of the box, all of which are described in [Kelp's Github Repo](https://github.com/stellar/kelp#kelp). You can use Kelp for free and start automating the order placement process in a matter of minutes.
13+
14+
Once the order placement is automatic, you should track the health of your token's market with these two parameters:
15+
16+
- Bid/Ask Amounts: Both sides of the order book should have at least 25k USD
17+
- Spread Size: The average price of the bids and asks should be within 4% of each other.
18+
19+
The 25k USD value is relative to a new anchor that is still developing its business. Once the volume of traded assets (and the total supply) grows, this value should be increased.
20+
21+
## Creating an Anchor Website
22+
23+
A website allows wallets and consumers to find information about your team and your business, get in contact with questions and feedback, and understand how your service works. Your issuing account should link to that website so there's a clear connection between the Stellar asset and the URL. To do that, usee the `set options`, and choose the URL as the home domain. You can find more information about how that process works [in our guide to publishing asset information](../../issuing-assets/publishing-asset-info.mdx).
24+
25+
Here is a list of requirements to make sure users have a great experience navigating through your website:
26+
27+
### Branding Visuals
28+
29+
Users should feel that they are in the company's domain based on the branding of the webpage. The brand universe can include many aspects, such as: company logo or symbol, slogan, colors, fonts, icons, etc...
30+
31+
### Company Description
32+
33+
Users want to know who you are and what you do before they'll trust your service or hold your asset. Your website should describe your business, clarify your mission, and outline your vision. Giving more information about your company's executive team, or about your team in general, is a great way to increase users' confidence, and conversions.
34+
35+
Describing how are you integrated with the Stellar Network (and with which wallets) is also a great way to show users that the system is reliable, and that it conforms to the best protocols and practices of the financial industry.
36+
37+
Finally, make sure to describe what your asset represents, how it's backed (e.g. it's 1:1 with a fiat reserve), how users can redeem it, and who can use it (anyone, just for retail, etc).
38+
39+
### Customer Support
40+
41+
Your webpage is also where users will go to report problems and reach out with questions and feedback. Make sure you clearly describe the process for contacting you, and for reporting bugs, and have a plan in place to offer necessary support.Adding a FAQ section once is a great way to defray support tickets and get information to users faster.
42+
43+
You should also have a contact email so customers can get in touch, report inconsistencies, and open tickets. Once you get those tickets, you need to answer them in a reasonable amount of time.
44+
45+
## Connecting to Sending Anchors
46+
47+
All **RA**s must connect with **SA**s that have transaction volume to send. The SDF works with strategic partners to build and improve these relationships, and the ultimate goal is for there to be an entire ecosystem (or network) of **SA**s and **RA**s globally.
48+
49+
Stellar.org does not yet host any resources documenting existing SEP-31 anchors, but it is coming.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"title": "Enable Cross-border Payments",
3+
"order": 30
4+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
title: Tools and References
3+
order: 20
4+
---
5+
6+
These docs walk through the steps necessary to set up and launch both a test server and a production server for SEP-31 cross-border payments, but before you get any deeper, it's worth noting: you don't have to start from scratch. SDF offers some tools that make it easy to implement those servers, and test them from the sending anchor (**SA**) side.
7+
8+
## Anchor Server Reference Implementation
9+
10+
To help with server setup, SDF created [Polaris](https://github.com/stellar/django-polaris), an extendable django reusable-app that comes with fully-implemented endpoints, templates, and database models. It's built in Python using the community-supported [Stellar Python SDK](https://github.com/StellarCN/py-stellar-base), and is compliant with the Stellar Ecosystem Protocols mentioned in the previous section.
11+
12+
TODO: REPLACE PNG ![Screenshots of the reference implementation](../../web-assets/polaris.png)
13+
14+
Polaris modularizes the parts of the codebase that interface with the Stellar network, and provides clear methods for developers to integrate their own customer registrations, banking connections, and KYC and transcation processing. That means you can focus on implementing the business- and country-related aspects of your product without having to spend much time defining how to connect the server to the Stellar Network.
15+
16+
If you choose to use Polaris, you can jumpstart your deployment, and connect local rails to Stellar in weeks instead of months.
17+
18+
## Demo Client & Deployed Example
19+
20+
Once you have a server set up, SDF also maintains a [Demo Wallet Project](https://demo-wallet.stellar.org/) that makes it easy to test your implementation on both the testnet and the pubnet.
21+
22+
This allows you to run through your receiving anchor's flow by entering information to a fake wallet application like a real sending user would.
23+
24+
![Screenshot of the demo client](../../web-assets/demo-wallet-sep31.png)
25+
26+
With the demo client, you can test your payment flows, and get information about the transactions that are created during those processes. It gives a clear step-by-step visual example of how the functionalities work along with insightful information about the requests, protocols, and possible validation messages. To start testing the deploys, simply update the settings of the Demo Client (click the gear button on the bottom right) to include your project's information.
27+
28+
## Anchor Validation Suite
29+
30+
The Anchor Validation Suite is a set of tests that helps confirming if your anchor implementation is compliant with the latest specifications of the SEP-31 standard. This is a great resource for people that are getting started building an anchor and want to check what's still missing in their implementation, or for teams that have already finalized the anchor development and want an extra validation on the codebase. Also, the Anchor Validation Suite doesn't replace the necessity of having a professional security auditor reviewing the whole project.
31+
32+
TODO: REPLACE PNG ![Screenshot of the Anchor Validation Suite's UI](../../web-assets/anchor-validation-suite.png)
33+
34+
The Anchor Validation Suite codebase is available in an open-sourced [Github Repository](https://github.com/stellar/transfer-server-validator/), where you can check in details exactly how all tests work. SDF also maintains a [deployed version of the Validation Suite](http://anchor-validator.stellar.org/) with a UI for running the tests without the need to setup your own infrastructure. In order to also test the interactive parts of SEP-24, you'll need to add test values to all the required interactive flow fields. The [Github Repository Readme file](https://github.com/stellar/transfer-server-validator/#providing-field-values) has more information on how exactly those fields need to be added. Finally, you can also trigger the tests directly from a Continuous Integration tool (like CircleCI or Jenkins), in order to have continuous monitoring of your anchor infrastructure.

0 commit comments

Comments
 (0)