Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: remove the explanation of slashing #153

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Expect breaking changes.**

- Universal framework for staking, restaking, and liquid restaking
- VRT construction and management
- Customizable slashing conditions
- Flexible NCN and operator management

## Installation
Expand Down
4 changes: 2 additions & 2 deletions docs/_about/01_high_level.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ that can receive delegations from the vault, the NCNs supported by the vault, an

- Universal framework for (re)staking SPL tokens to node consensus networks on Solana and SVM chains.
- Staked assets are tokenized into Vault Receipt Tokens (VRT)
- Flexible opt-in from node consensus networks, operators, and vaults for staking and slashing.
- Flexible opt-in from node consensus networks, operators, and vaults for staking.

### Entity Opt-in

Expand All @@ -32,7 +32,7 @@ operators, and vaults. The following diagram shows the opt-in process for the Ji

When a NCN, operator, and vault have all opted-in to each other and the vault has staked assets to the operator, those
assets are considered staked to the NCN. The operator will then be able to participate in the NCN's consensus protocol.
Assuming the vault has opted-in to the slasher, the staked assets can be slashed.
Assuming the vault has opted-in to the slasher.

### Vault Interactions

Expand Down
2 changes: 1 addition & 1 deletion docs/_restaking/00_restaking_accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ graph TD

## 4.4. NcnVaultSlasherTicket

This ticket represents the slashing relationship between an NCN and a Vault. The NCN register slashers, which allows the slasher to potentially slash the Vault under appropriate conditions.
This ticket represents the slashing relationship between an NCN and a Vault. The NCN register slashers.

```mermaid
graph TD
Expand Down
6 changes: 1 addition & 5 deletions docs/_vault/00_vault_accounts.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ weight: 1

## 1. About the program

The vault program manages the vault receipt tokens (VRTs) and associated deposits. The program stores deposited funds and handles the minting and burning of tokenized stake. It also manages the vault's stake in an NCN, including delegation and slashing.
The vault program manages the vault receipt tokens (VRTs) and associated deposits. The program stores deposited funds and handles the minting and burning of tokenized stake. It also manages the vault's stake in an NCN, including delegation.

## 2. Diagram

Expand Down Expand Up @@ -124,9 +124,5 @@ Assets are considered staked iff:
- The NCN has opted-in to the vault
- The Vault is delegated to that operator

When assets are staked and the following conditions are met, the vault can be slashed by a given slasher:

- The NCN has opted in to a slasher for the given vault.
- The vault has agreed to the conditions set by the NCN for slashing the vault.

![img.png](/assets/images/staked_venn_diagram.png)
40 changes: 1 addition & 39 deletions docs/_vault/01_vault_theory_of_operation.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Key features of the vault program include:
- Fee handling: Managing deposit, withdrawal, and reward fees.
- Administrative controls: Allowing authorized parties to manage vault parameters and perform administrative actions.
- Delegation support: Facilitating delegation to operators and managing relationships with Node Consensus Networks (NCNs).
- Slashing mechanism: Implementing a slashing feature to penalize misbehavior.
- State tracking: Maintaining and updating the vault's state to ensure accurate token representation.

The Vault Program is designed to be flexible and extensible, allowing for various configurations and supporting multiple roles such as admins, operators, and NCNs. It interacts with other components of the Solana ecosystem, including the System Program and Token Program, to provide a comprehensive liquid staking solution.
Expand Down Expand Up @@ -63,7 +62,7 @@ These parameters allow for fine-tuning of the vault's behavior and economics.
The Vault Program maintains several state variables to track various aspects of its operation. Here's an overview of some key state variables:

1. `vrt_supply`: Tracks the total number of Vault Receipt Tokens (VRT) in circulation. This is updated whenever VRTs are minted or burned. It shall always match the total supply of VRTs tracked by the token mint.
2. `tokens_deposited`: Represents the total number of supported tokens currently held by the vault. This is increased when users deposit tokens and decreased when tokens are withdrawn or slashed.
2. `tokens_deposited`: Represents the total number of supported tokens currently held by the vault. This is increased when users deposit tokens and decreased when tokens are withdrawn.
3. `delegation_state`: A complex state that tracks the aggregate delegation of tokens to operators. It includes:
- `total_security`: The total amount of tokens delegated as security.
- `enqueued_for_cooldown_amount`: Tokens that are scheduled to begin the cooldown process.
Expand Down Expand Up @@ -281,40 +280,3 @@ Here's a high-level overview of the process:
Key points:
- The burn process includes slippage protection to guard against unexpected price movements.

# 12. Slashing

Slashing is a mechanism designed to penalize malicious or negligent behavior in the vault system. It involves reducing the stake of participants who violate the protocol rules. Here's a high-level overview of how slashing works:

## 12.1. Opt-in Requirement

Slashing requires explicit opt-in from all involved parties:
- The Vault
- The NCN
- The Operator

Each party must create and maintain active tickets or states that indicate their willingness to participate in the slashing mechanism.

## 12.2. Slashing Process

1. A slasher initiates the slash instruction, specifying the amount to slash.
2. The system performs several checks:
- Verifies that all required tickets and states are active or in cooldown.
- Ensures the vault is up-to-date.
- Checks that the slash amount doesn't exceed the maximum slashable amount per epoch.
- The slasher is signing the transaction.

3. If all checks pass:
- The specified amount is deducted from the operator's delegation in the vault.
- The vault's total amount of deposited tokens is decreased.
- The slashed funds are transferred to the slasher's account.

## 12.3. Key Components

- VaultNcnSlasherTicket: Represents the vault's agreement to be slashed by a specific NCN and slasher.
- NcnVaultSlasherTicket: Represents the NCN's agreement to slash a specific vault.
- NcnOperatorState: Represents the mutual opt-in between an NCN and an operator.
- OperatorVaultTicket: Represents the operator's stake in the vault.
- VaultNcnTicket and NcnVaultTicket: Represent the relationship between the vault and the NCN.
- VaultNcnSlasherOperatorTicket: Tracks the amount slashed for a specific combination of vault, NCN, slasher, and operator.

This multi-party opt-in system ensures that slashing can only occur when all involved parties have explicitly agreed to participate, providing a fair and transparent mechanism for maintaining protocol integrity.
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ layout: home

Jito (Re)staking is a multi-asset staking protocol for node consensus networks. The protocol tokenizes staked assets as
vault receipt tokens for enhanced liquidity and composability. Node consensus networks can use Jito Restaking to easily
customize staking parameters, slashing conditions, and economic incentives to tailor their security and tokenomics.
customize staking parameters, and economic incentives to tailor their security and tokenomics.

### Addresses

Expand Down