From cd1e301ff33374648409be89d31ff88c24e95bf2 Mon Sep 17 00:00:00 2001 From: aoikurokawa Date: Mon, 23 Dec 2024 08:14:40 +0900 Subject: [PATCH 1/3] docs: building-ncn --- docs/_advanced/00_building_ncn.md | 91 ++++++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) diff --git a/docs/_advanced/00_building_ncn.md b/docs/_advanced/00_building_ncn.md index 50e600b3..069cea57 100644 --- a/docs/_advanced/00_building_ncn.md +++ b/docs/_advanced/00_building_ncn.md @@ -5,4 +5,93 @@ layout: post weight: 1 --- -These documents will be filled out shortly as the software is dogfooded internally. \ No newline at end of file +The purpose of the Restaking and Vault programs is to support the initialization, management, and functionality of NCNs and their relationships with Operators and Vaults. This document outlines the key components, design considerations, and steps to build and maintain an NCN. + +## Overview + +### Restaking Program +The Restaking program focuses on: +- Initializing NCNs and Operators. +- Managing NCN authorities. +- Registering relationships between NCNs, Operators, and Vaults. + +### Vault Program +The Vault program is responsible for: +- Creating and managing VRTs (Vault Resource Tokens). +- Allowing users to deposit and withdraw assets. +- Managing relationships with NCNs, delegations with Operators, and fee settings. + +--- + +## Typical NCN Design + +### Onchain NCN Program +The on-chain NCN program consists of several components: + +#### **Pricing** +- Determines the relative weight of assets (supported_mints) deposited in all Vaults linked to the NCN. +- Key considerations: + - Permissioned or permissionless design. + - Future integration into a generic [Weight Table Program](https://github.com/jito-foundation/jito-tip-router). + +#### **Snapshot** +- Captures the current status of all active NCNs and Vaults. +- Aggregates stake weight per operator for the current epoch. + +#### **Core Logic** +- The core of the NCN where Node Operators: + - Post on-chain data proving they fulfilled their roles. + - Enable the NCN to execute actions based on these results. + +#### **Rewards Payment** +- Calculates and distributes payments pro-rata based on the stake weight of successful operators and their Vaults. +- Future integration into the [Rewards NCN](https://github.com/jito-foundation/jito-rewards-ncn). + +--- + +### Offchain Components + +#### **Node Operator Client** +- The core off-chain logic of the NCN. +- Runs arbitrary computation and posts data on-chain via custom instructions. + +#### **Permissionless Cranker** +- Automates permissionless operations on a regular cycle. +- Examples: + - Jito Tip Router Program: Executes price updates, snapshots, initializes Merkle roots post-consensus, and handles rewards payments. + +--- + +## Steps to Build an NCN + +### 1. Initialize the NCN +- Deploy the on-chain NCN program. +- Register initial relationships with Operators and Vaults. + +### 2. Establish Pricing and Weight Rules +- Define how asset weights are calculated across Vaults. +- Choose between permissioned or permissionless mechanisms. + +### 3. Implement Core Logic +- Define the logic for your NCN’s specific purpose. +- Ensure data validation and action execution align with your use case. + +### 4. Develop Snapshot Functionality +- Enable the program to periodically aggregate and record the state of NCNs, Vaults, and their respective stake weights. + +### 5. Manage Rewards Payment +- Configure reward calculations and distributions based on operator performance. +- Prepare for future integration with the Rewards NCN. + +### 6. Create and Deploy Offchain Clients +- Provide an open-source Node Operator Client for operators. +- Ensure the client efficiently handles custom computations and data posting. + +### 7. Set Up a Permissionless Cranker +- Build a client to automate routine instructions, ensuring the NCN operates without manual intervention. + +--- + +## Further Reading + +- [NCN Cookbook](https://ncn-cookbook.vercel.app/building-ncn/ncn-design.html) From 9a5498d7a6aa465d8befb751a4b8d7b03bfc2be4 Mon Sep 17 00:00:00 2001 From: aoikurokawa Date: Mon, 23 Dec 2024 08:17:58 +0900 Subject: [PATCH 2/3] fix: typos --- docs/_advanced/00_building_ncn.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/_advanced/00_building_ncn.md b/docs/_advanced/00_building_ncn.md index 069cea57..040e4f35 100644 --- a/docs/_advanced/00_building_ncn.md +++ b/docs/_advanced/00_building_ncn.md @@ -5,8 +5,6 @@ layout: post weight: 1 --- -The purpose of the Restaking and Vault programs is to support the initialization, management, and functionality of NCNs and their relationships with Operators and Vaults. This document outlines the key components, design considerations, and steps to build and maintain an NCN. - ## Overview ### Restaking Program From fcb7407376716ca82709e27c01d3f6ec4083e125 Mon Sep 17 00:00:00 2001 From: aoikurokawa Date: Mon, 23 Dec 2024 08:20:12 +0900 Subject: [PATCH 3/3] fix: add jito --- docs/_advanced/00_building_ncn.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/_advanced/00_building_ncn.md b/docs/_advanced/00_building_ncn.md index 040e4f35..07c41dec 100644 --- a/docs/_advanced/00_building_ncn.md +++ b/docs/_advanced/00_building_ncn.md @@ -7,14 +7,14 @@ weight: 1 ## Overview -### Restaking Program -The Restaking program focuses on: +### Jito Restaking Program +The Jito Restaking program focuses on: - Initializing NCNs and Operators. - Managing NCN authorities. - Registering relationships between NCNs, Operators, and Vaults. -### Vault Program -The Vault program is responsible for: +### Jito Vault Program +The Jito Vault program is responsible for: - Creating and managing VRTs (Vault Resource Tokens). - Allowing users to deposit and withdraw assets. - Managing relationships with NCNs, delegations with Operators, and fee settings.