Skip to content

Commit

Permalink
Flesh out docs more
Browse files Browse the repository at this point in the history
  • Loading branch information
kayabaNerve committed Mar 12, 2024
1 parent 442d8c0 commit 233164c
Show file tree
Hide file tree
Showing 12 changed files with 99 additions and 12 deletions.
9 changes: 9 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@ description: Documentation for the Serai protocol.
theme: just-the-docs

url: https://docs.serai.exchange

callouts:
warning:
title: Warning
color: red

definition:
title: Definition
color: blue
2 changes: 2 additions & 0 deletions docs/amm/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ layout: default
nav_order: 2
---

# Automatic Market Makers

*text on how AMMs work*

Serai uses a symmetric liquidity pool with the `xy=k` formula.
Expand Down
2 changes: 2 additions & 0 deletions docs/cross_chain/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ title: Cross-Chain Architecture
layout: default
nav_order: 3
---

# Cross-Chain Architecture
39 changes: 39 additions & 0 deletions docs/economics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,42 @@ layout: default
nav_order: 4
has_children: true
---

# Economics

Serai's economics change depending on which of three eras is currently
occurring.

## Genesis Era

The network starts with the "Genesis" era, where the goal of the network is to
attract the liquidity necessary to facilitate swaps. This period will last for
30 days and will let anyone add liquidity to the protocol. Only with its
conclusion will SRI start being distributed.

After the Genesis era, the network enters the "Pre-Economic Security" era.

## Pre-Economic Security

{: .definition-title }
> Definition: Economic Security
>
> Economic security is derived from it being unprofitable to misbehave.
> This is by the economic penalty which is presumed to occur upon misbehavior
> exceeding the value which would presumably be gained.
> Accordingly, rational actors would behave properly, causing the protocol to
> maintain its integrity.
>
> For Serai specifically, the stake required to produce unintended signatures
> must exceed the value accessible via producing unintended signatures.
With liquidity provided, and swaps enabled, the goal is to have validators stake
sufficiently for economic security to be achieved. This is primarily via
offering freshly minted, staked SRI to would-be validators who decide to swap
external coins for their stake.

## Post-Economic Security

Having achieved economic security, the protocol changes its economics one last
time (barring future upgrades to the protocol) to a 'normal' state of
operations.
6 changes: 6 additions & 0 deletions docs/evolutions/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Evolutions
layout: default
nav_order: 5
has_children: true
---
29 changes: 25 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,29 @@ layout: home
nav_order: 1
---

Serai is a cross-chain decentralized exchange, integrating Bitcoin, Ethereum,
and Monero.

{: .warning }
This documentation site is still under active development and may have missing
sections, errors, and typos.
sections, errors, and typos. Even once this documentation site is 'complete', it
may become out-of-date (as Serai is an evolving protocol yet to release) or have
minor errors.

# Serai

Serai is a fairly launched cross-chain decentralized exchange, integrating
Bitcoin (BTC), Ethereum (ETH, DAI), and Monero (XMR).

The Serai mainnet has yet to launch, and until then, all details are subject to
change.

Prior to the Serai mainnet launching, SRI, Serai's native coin, will not
exist. As a fairly launched project, SRI will have no ICO, no IEO, no presale,
no developers' tax/fund, and no airdrop for out-of-mainnet activity.

Out-of-mainnet activity includes:

- Being a community member (such as on Discord or on Twitter)
- Participating in testnets
- Contributing to the GitHub

None of these will be awarded any airdrop. All distributions of SRI will happen
on-chain per the protocols' defined rules, based on on-chain activity.
2 changes: 2 additions & 0 deletions docs/infrastructure/coordinator.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ nav_order: 3
parent: Infrastructure
---

# Coordinator

The coordinator is a local service which communicates with other validators'
coordinators. It provides a verifiable broadcast layer for various consensus
messages, such as agreement on external blockchains, key generation and signing
Expand Down
2 changes: 1 addition & 1 deletion docs/infrastructure/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Infrastructure
layout: default
nav_order: 5
nav_order: 6
has_children: true
---
4 changes: 4 additions & 0 deletions docs/infrastructure/message_queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ nav_order: 1
parent: Infrastructure
---

# Message Queue

The Message Queue is a microservice to authenticate and relay messages between
services. It offers just three functions:

1) Queue a message.

2) Receive the next message.

3) Acknowledge a message, removing it from the queue.

This ensures messages are delivered between services, with their order
Expand Down
12 changes: 7 additions & 5 deletions docs/infrastructure/processor.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@ nav_order: 2
parent: Infrastructure
---

# Processor

The processor performs several important tasks with regards to the external
network. Each of them are documented in the following sections.

# Key Generation
## Key Generation

# Scanning
## Scanning

# Signing Batches
## Signing Batches

# Planning Transactions
## Planning Transactions

# Cosigning
## Cosigning
2 changes: 1 addition & 1 deletion docs/integrating/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Integrating with Serai
layout: default
nav_order: 6
nav_order: 7
has_children: true
---
2 changes: 1 addition & 1 deletion docs/validator/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Running a Validator
layout: default
nav_order: 7
nav_order: 8
has_children: true
---

0 comments on commit 233164c

Please sign in to comment.