Skip to content

Commit 33f0fce

Browse files
authored
feat: LRT docs (#113)
* chore: update flakes * feat: update restaking documentation and metadata * feat: enhance documentation for Liquid Restaking Tokens (LRT) - Update metadata and introduction for LRT developers - Improve comparison table between LRT and LST - Add detailed explanation of building LRT on Tangle Network - Clarify core concepts of liquid restaking and delegation vaults * chore: ran formatting * chore: address PR comments * chore: fix merge conflects * chore: update github actions
1 parent e23803b commit 33f0fce

File tree

11 files changed

+342
-12
lines changed

11 files changed

+342
-12
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
corepack enable
2929
3030
- name: Use Node.js ${{ matrix.node-version }}
31-
uses: actions/setup-node@v3
31+
uses: actions/setup-node@v4
3232
with:
3333
node-version: ${{ matrix.node-version }}
3434

.github/workflows/checks.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
corepack enable
2727
2828
- name: Use Node.js ${{ matrix.node-version }}
29-
uses: actions/setup-node@v3
29+
uses: actions/setup-node@v4
3030
with:
3131
node-version: ${{ matrix.node-version }}
3232

@@ -54,7 +54,7 @@ jobs:
5454
corepack enable
5555
5656
- name: Use Node.js ${{ matrix.node-version }}
57-
uses: actions/setup-node@v3
57+
uses: actions/setup-node@v4
5858
with:
5959
node-version: ${{ matrix.node-version }}
6060

flake.lock

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+11-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,14 @@
55
flake-utils.url = "github:numtide/flake-utils";
66
};
77

8-
outputs = { self, nixpkgs, flake-utils }:
9-
flake-utils.lib.eachDefaultSystem (system:
8+
outputs =
9+
{
10+
self,
11+
nixpkgs,
12+
flake-utils,
13+
}:
14+
flake-utils.lib.eachDefaultSystem (
15+
system:
1016
let
1117
overlays = [ ];
1218
pkgs = import nixpkgs {
@@ -21,9 +27,10 @@
2127
# Nodejs
2228
pkgs.nodePackages.typescript-language-server
2329
pkgs.nodejs_22
24-
pkgs.nodePackages.yarn
30+
pkgs.yarn-berry
2531
];
2632
packages = [ ];
2733
};
28-
});
34+
}
35+
);
2936
}

pages/restake/_meta.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,12 @@
2525
"join_a_pool": "Join a Liquid Staking Pool",
2626
"lst-rewards": "Incentives",
2727
"lst-assets": "Supported Assets",
28-
"lst_developers": "Developer Docs"
28+
"lst_developers": "Developer Docs",
29+
"-- liquid restaking": {
30+
"type": "separator",
31+
"title": "Liquid Restaking"
32+
},
33+
"lrt-concepts": "Introduction to Liquid Restaking",
34+
"lrt-vs-lst": "Liquid Restaking vs. Liquid Staking",
35+
"lrt_developers": "Developer Docs"
2936
}

pages/restake/introduction.mdx

+11-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ Tangle's core staking infrastructure is composed of three major pieces. The firs
1919
title: "Liquid Staking",
2020
description: "Explore Tangle's liquid staking protocols for validator-specific staking operations and liquid staked tokens (LSTs).",
2121
link: "../restake/lst-concepts"
22-
}
22+
},
23+
{
24+
title: "Liqued Restaking",
25+
description: "Learn about how to build a LRT (Liquid Restaking Token) vaults and how to use it for restaking.",
26+
link: "../restake/lrt-concepts"
27+
},
2328
]} />
2429

2530
## Nominated Staking
@@ -41,3 +46,8 @@ Users deposit assets into the restaking infrastructure by depositing into a pool
4146
Tangle includes a variety of liquid staking protocol implementations for partner projects and blockchain ecosystems, providing the restaking infrastructure with unique liquid staking tokens to be used in securing new services. The tokens Tangle takes an active part in developing and leveraging bear the prefix `tg...`. The `tg` LST protocols are stake operation specific liquid staking protocols. By stake operation, we mean a unique staking action that exists separate to another, such as staking on Validator A versus Validator B or staking on Vault A or Vault B for an arbitrary staking protocol. These examples would create `tgXYZ_A` and `tgXYZ_B` liquid staked tokens which are not fungible with respect to one another.
4247

4348
In doing so, Tangle's LST protocol creates a plethora of new LSTs and a well-defined pool in the restaking infrastructure. Validators, node operators, and vaults of various protocols have unique assets to represent their operations, and Tangle's liquid staking tokens provides these communities with additional product opportunities for leveraging those assets and actions.
49+
50+
## Liquid Restaking
51+
52+
Liquid Restaking Tokens (LRTs) are used to restake any assets into the restaking infrastructure.
53+
LRT in the nutshell is a way where you take any asset (usually an already staked asset, like stETH) and stake it again by depositing it into a the Tangle Restaking infrastructure and receive extra rewards for doing so.

pages/restake/lrt-concepts.mdx

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Liquid Restaking on Tangle Network
2+
3+
## Introduction
4+
5+
Liquid restaking allows users to participate in restaking while simultaneously maintaining liquidity of their assets.
6+
This mechanism is implemented through smart contracts that define their own liquid restaking mechanics while proxying calls to the underlying staking system. This allows users to stake their tokens, earn rewards, and maintain liquidity without being subject to traditional staking lock-up periods.
7+
8+
## Core Concepts
9+
10+
### Delegation Vaults
11+
12+
Delegation vaults are the backbone of liquid restaking on Tangle Network. These vaults:
13+
14+
- Allow users to deposit tokens which are then delegated to Tangle operators running blueprint services
15+
- Issue shares (liquid tokens) representing the user's deposited assets
16+
- Handle the complexities of managing deposits, unstaking, and withdrawals
17+
- Rewards distribution and claiming.
18+
19+
### Liquid Tokens
20+
21+
When users deposit assets into a liquid restaking vault, they receive shares in return. These shares:
22+
23+
- Represent ownership of the underlying staked assets
24+
- Can be transferred or traded while the underlying assets remain staked
25+
- Serve as a claim ticket for both the original deposit and earned rewards
26+
- Do not automatically increase in value like traditional LSTs but instead provide access to claim rewards
27+
28+
### Multi-step Withdrawal Process
29+
30+
The withdrawal process in liquid restaking involves multiple steps:
31+
32+
1. **Schedule Unstake**: User initiates the unstaking process from the operator
33+
2. **Execute Unstake**: The unstaking request is processed after the unbonding period
34+
3. **Schedule Withdrawal**: User requests to withdraw their assets from the vault
35+
4. **Execute Withdrawal**: The final withdrawal is processed, returning assets to the user
36+
37+
This process ensures orderly exits while maintaining the security of the network.
38+
39+
### Rewards Distribution
40+
41+
Liquid restaking vaults use an accumulator-based system for tracking and distributing rewards:
42+
43+
- Each reward token has a global accumulator tracking rewards-per-share over time
44+
- User positions are tracked by snapshots recording their share balance and last claim point
45+
- Rewards are calculated based on the difference between current and last-seen accumulator values
46+
- This system ensures fair distribution regardless of when users entered the pool or how many shares they hold
47+
48+
### Operator Delegation
49+
50+
Vaults will automatically delegate deposited assets to selected Tangle operators who:
51+
52+
- Run blueprint services on the network
53+
- Generate rewards through their participation

pages/restake/lrt-vs-lst.mdx

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Liquid Restaking Tokens (LRT) vs Liquid Staking Tokens (LST)
2+
3+
| Feature | LRT (Tangle Network) | LST (Traditional) |
4+
| ---------------- | -------------------------------------------- | ------------------------------------ |
5+
| Primary Function | Enables restaking across multiple Blueprints | Provides liquidity for staked assets |
6+
| Risk Profile | Shared security across services | Single network exposure |
7+
| Reward Sources | Multiple Services rewards + staking yields | Base chain staking rewards |
8+
| Use Cases | Cross-service validation, Blueprint creation | Trading, lending, DeFi integrations |
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"intro": "Introduction",
3+
"lrt-vault": "Creating a LRT on Tangle"
4+
}
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Building LRT on Tangle Network
2+
3+
Tangle Multi-Asset Delegations (MADs) pallet precompile provides information about the current state of the Tangle network restaking functionality.
4+
A precompiled contract is native Substrate code that has an Ethereum-style address and can be called using the Ethereum API, like any other smart contract.
5+
The precompiles allow you to call the Substrate runtime directly which is not normally accessible from the Ethereum side of Tangle.
6+
7+
### How to use the precompile
8+
9+
We have a detailed page about the [Multi-Asset Delegation Precompile](../../developers/precompiles/features/multi-asset-delegation.mdx).
10+
11+
In the next page, we will have a tutorial about how to use this precompile to build a LRT on Tangle.

0 commit comments

Comments
 (0)