Skip to content

Commit

Permalink
Start of docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ebatsell committed Aug 19, 2024
1 parent 10e887a commit 6803eb4
Show file tree
Hide file tree
Showing 16 changed files with 228 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Build Jekyll site
on:
push:
branches: ["master"]

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# Build the cargo docs
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly-2023-10-05
- name: Generate Cargo Docs
run: cargo doc --no-deps
- name: Copy Cargo Docs to Jekyll source
run: cp -R target/doc docs/api

# Setup Github Pages
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Build
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
6 changes: 6 additions & 0 deletions docs/_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
title: Jito StakeNet Documentation
description: Jito StakeNet Documentation
url: "https://docs.stakenet.jito.network"

markdown: kramdown
theme: jekyll-theme-primer
68 changes: 68 additions & 0 deletions docs/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en-US" }}">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

{% seo %}
<link rel="stylesheet" href="{{ "/assets/css/style.css?v=" | append: site.github.build_revision | relative_url }}">
{% include head-custom.html %}
</head>
<body>
<div class="container-lg px-3 my-5 markdown-body">
{% if site.title and site.title != page.title %}
<h1><a href="{{ "/" | absolute_url }}">{{ site.title }}</a></h1>
{% endif %}

{{ content }}

{% if site.github.private != true and site.github.license %}
<div class="footer border-top border-gray-light mt-5 pt-3 text-right text-gray">
This site is open source. {% github_edit_link "Improve this page" %}.
</div>
{% endif %}
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/4.1.0/anchor.min.js" integrity="sha256-lZaRhKri35AyJSypXXs4o6OPFTbTmUoltBbDCbdzegg=" crossorigin="anonymous"></script>
<script>anchors.add();</script>
<style>
.markdown-body .highlight pre,
.markdown-body pre {
background-color: initial;
border: none;
}

.language-mermaid {
background: none !important;
border: none !important;
}

.mermaid-wrapper {
display: flex;
justify-content: center;
margin: 20px 0;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mermaid/10.9.1/mermaid.min.js"></script>
<script>
var config = {
startOnReady: true,
theme: 'forest',
flowchart: {
useMaxWidth: false,
htmlLabels: true
}
};
mermaid.initialize(config);
mermaid.init(undefined, '.language-mermaid');

// Find all Mermaid code blocks and wrap them in a div
document.querySelectorAll('pre code.language-mermaid').forEach(function(el) {
var wrapper = document.createElement('div');
wrapper.className = 'mermaid-wrapper';
el.parentNode.insertBefore(wrapper, el);
wrapper.appendChild(el.parentNode);
});
</script>
</body>
</html>
Empty file added docs/admin-abilities.md
Empty file.
Binary file added docs/assets/staked_venn_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file added docs/cli.md
Empty file.
8 changes: 8 additions & 0 deletions docs/developers/managing-validator-states.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: default
title: Validator States
---

# Validator States

[Explanation of different validator states and how Steward manages them goes here]
8 changes: 8 additions & 0 deletions docs/developers/spl-stake-pool-internals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: default
title: SPL Stake Pool Internals
---

# SPL Stake Pool Internals

[Detailed explanation of SPL Stake Pool internals goes here]
39 changes: 39 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
layout: default
title: Steward Program Documentation
---

# Steward Program

The Steward Program is an Anchor program designed to manage the staking authority for a SPL Stake Pool. Using on-chain validator history, the steward selects a set of high-performing validators to delegate to, maintains the desired level of stake on those validators over time, and continuously monitors and re-evaluates the validator set at a set cadence.

## Purpose

The Steward Program was created to automatically manage the Jito Stake Pool. Using on-chain validator history data, the steward chooses who to stake to and how much by way of its staking algorithm. Additionally, the steward surfaces this staking algorithm through variable parameters to be decided by Jito DAO. In turn, this greatly decentralizes the stake pool operations.

## Table of Contents

1. [Program Overview](program-overview.md)
2. [State Machine](state-machine.md)
3. [Validator Management](validator-management.md)
4. [Admin Abilities](admin-abilities.md)
5. [Parameters](parameters.md)

6. Validators

- [Scoring System](validators/scoring-system.md)
- [Instant Unstaking](validators/instant-unstaking.md)
- [Eligibility Criteria](validators/eligibility-criteria.md)

7. Developers

- [SPL Stake Pool Internals](developers/spl-stake-pool-internals.md)
- [Validator States](developers/validator-states.md)
- [Program Architecture](developers/program-architecture.md)
- [Integration Guide](developers/integration-guide.md)

8. [Appendix](appendix.md)

For validators interested in understanding how they are scored and managed within the Steward Program, please refer to the Validators section.

For developers interested in the technical details of the Steward Program, please refer to the Developers section.
Empty file added docs/parameters.md
Empty file.
8 changes: 8 additions & 0 deletions docs/program-overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: default
title: Program Overview
---

# Program Overview

[Content about the program overview goes here]
Empty file added docs/state-machine.md
Empty file.
23 changes: 23 additions & 0 deletions docs/terminology.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Jito (Re)staking Terminology
---

# Terminology

- **Node**: A piece of software running the required protocols as specified by the node consensus network.
- **Node Consensus Network (NCN)**: A set of nodes running software for the same network, working together to achieve
consensus and provide services.
- **Operator**: An entity that manages one or more nodes in the node consensus network.
- **Vault**: A smart contract that securely holds staked assets and delegates them to operators.
- **Vault Receipt Token (VRT)**: A tokenized representation of staked assets inside a vault, allowing for liquidity and
composability.
- **Staking**: The process of locking up assets as collateral to support network operations and earn rewards.
- **(Re)staking**: The process of staking already-staked assets, such as liquid staking tokens to participate in
additional networks or services.
- **Slashing**: A penalty mechanism where a portion of staked assets is forfeited if an operator misbehaves or fails to
meet performance requirements.
- **Delegation**: The act of assigning staked assets to specific operators within the network.
- **Multi-Asset Staking**: The ability to stake various types of SPL tokens, not limited to native blockchain tokens.
- **Liquid Staking**: A form of staking that provides liquidity to Solana stakers.
- **SPL Token**: Solana Program Library Token, a standard for creating and managing tokens on the Solana blockchain.
- **Epoch**: A fixed period in the blockchain during which staking rewards are calculated and distributed.
8 changes: 8 additions & 0 deletions docs/validators/instant-unstaking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: default
title: Instant Unstaking
---

# Instant Unstaking

[Detailed description of the instant unstaking process goes here]
8 changes: 8 additions & 0 deletions docs/validators/rebalancing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: default
title: Scoring System
---

# Scoring System

[In-depth explanation of the scoring system with visuals goes here]
8 changes: 8 additions & 0 deletions docs/validators/scoring-system.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
layout: default
title: Scoring System
---

# Scoring System

[In-depth explanation of the scoring system with visuals goes here]

0 comments on commit 6803eb4

Please sign in to comment.