Skip to content

Commit

Permalink
update anchor platform architecture page (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeUrban authored Jun 25, 2024
1 parent 6b63a92 commit 1a5bc72
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions platforms/anchor-platform/admin-guide/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,25 @@ The client is an application, such as a wallet or remittance sender, that acts o

#### SEP Server

The SEP server is a client-facing server and therefore needs to be accessible from an external network. The SEP server processes user requests and manages the state of transactions they initiate. When the SEP server needs to provide information it doesn't have to the client, such as the exchange rate for an asset pair, it makes synchronous [callback][callback-api] requests to the Business Server.

Some SEP requests are designed for a client to fetch business-related data, such as quotes or fees. Because it's business-driven, the SEP server will create a request to your server, passing information back to the client. It will also transform the response into a SEP-compliant format. Note that your server only needs to implement endpoints required by the particular SEP you would like to support.
The SEP server is a client-facing server and therefore needs to be accessible from an external network. The SEP server processes user requests and manages the state of transactions they initiate. When the SEP server needs to provide information it doesn't have to the client, such as the exchange rate for an asset pair or the KYC status of a customer, it makes synchronous [callback][callback-api] requests to the business server and returns the information in a SEP-compliant format.

:::note

The SEP server will never store any sensitive information, such as KYC (PII), in the database.

:::

#### Database
#### Business Server

The Anchor Platform uses a PostgreSQL database to store Stellar events and entities. Its primary use is to store SEP (24 & 31) transactions.
The business server is a service that you (the business) must implement to connect the Anchor Platform with your internal systems. The business server responds to callback requests sent by the SEP server, such as requests for a quote, receives events sent by event service, such as notification of a received payment to your Stellar account, and provides updates to the platform server when off-chain events occur, such as the initiation of a bank transfer to a customer.

#### Platform Server

The platform server is an internal component. It should be hosted in a private network and should not be accessible from the Internet. This server enables the business to fetch and update the state of transactions using its [API][platform-api].

#### Business Server
#### Database

Finally, the business server is a server that you (the business) must implement to connect the Anchor Platform with your internal systems. The business server responds to callback requests sent by the Anchor Platform (such as requesting a quote for SEP-38) and provides updates to the Anchor Platform when off-chain events occur (like completing a bank transfer).
The Anchor Platform uses a PostgreSQL database to store Stellar events and entities. It is primary used to store transactions.

### Complete Architecture

Expand All @@ -51,20 +49,20 @@ In addition to the components described above, the Anchor Platform includes seve

The event service enables the Anchor Platform to send HTTP webhooks to registered clients and your business server when the state of transactions change, removing the need for clients and/or your business server to poll the Anchor Platform's APIs. It works by reading events from published to a Kafka topic by the other Anchor Platform components. [Read more][events] about using the event service.

#### Stellar Observer

The Stellar observer monitors the Stellar blockchain using Horizon, automatically detects user payments sent to the business, and updates the corresponding transactions in the Anchor Platform's database. If you use the [events] service, payments to your accounts will trigger a HTTP callback made to your business server.

If you already have a solution for monitor payments to your Stellar accounts, such as an integration with your exchange, Horizon, or RPC, then this component is not required, although your business server will need to notify the Anchor Platform when a payment associated with an Anchor Platform transaction was made to your one of your Stellar accounts via the [Platform API][platform-api].

#### Custody Server

The custody server connects to a enterprise wallet providers, such as Fireblocks, to send and receive payments for transactions initiated via the Anchor Platform. This service is an alternative to the Stellar Observer for businesses who use one of the supported providers, except that in addition to the functionality offered by the Stellar Observer, the Custody Server can also facilitate outbound payments to client's Stellar accounts.
The custody server connects to enterprise wallet providers, such as Fireblocks, to send and receive payments for transactions initiated via the Anchor Platform. This service is an alternative to the Stellar Observer for businesses who use one of the supported providers. In addition to the functionality offered by the Stellar Observer, the Custody Server can also facilitate outbound payments to client's Stellar accounts. If you also use the [events] service, payments to your accounts will trigger a HTTP callback made to your business server.

If you already have an integration with your wallet provider, then this component is not required, although your business server will need to notify the Anchor Platform when a payment associated with an Anchor Platform transaction was sent to or from your Stellar accounts via the [Platform API][platform-api].

Currently the only supported provider is Fireblocks.

#### Stellar Observer

The Stellar observer, an alternative to the custody server pictured above, monitors the Stellar blockchain using Horizon, automatically detects user payments sent to the business, and updates the corresponding transactions in the Anchor Platform's database. If you also use the [events] service, payments to your accounts will trigger a HTTP callback made to your business server.

If you already have a solution for monitor payments to your Stellar accounts, such as an integration with your exchange, Horizon, or RPC, then this component is not required, although your business server will need to notify the Anchor Platform when a payment associated with an Anchor Platform transaction was made to your one of your Stellar accounts via the [Platform API][platform-api].

[seps]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/README.md
[platform-api]: ../api-reference/resources/README.mdx
[callback-api]: ../api-reference/callbacks/README.mdx
Expand Down

0 comments on commit 1a5bc72

Please sign in to comment.