Skip to content

Commit

Permalink
docs(addition): add Solana vaults docs (#4425)
Browse files Browse the repository at this point in the history
  • Loading branch information
JafarAz authored Jan 25, 2024
2 parents a41291a + a37563c commit ad859be
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 21 deletions.
8 changes: 1 addition & 7 deletions docs/docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ slug: /
</div>
<div class="card__body">
<h3>Architecture</h3>
Read about the extension of the IBC protocol beyond Cosmos and the Composable Virtual Machine (CVM).
Read about the extension of the IBC protocol beyond Cosmos, the Composable Virtual Machine (CVM) and Restaking on Solana.
</div>
</div>
</a>
Expand Down Expand Up @@ -77,14 +77,8 @@ slug: /



*Composable Finance: Composing DeFi for mass adoption*

![composable_finance](./composable-face-banner.png)
*any money, any chain, anywhere*

:::note
The documentation for Composable is presently undergoing development, consequently it may result in an usual display.
:::
## The Vision

In an ideal cross-chain world, developers and users interact unhindered across ecosystems and protocols, regardless of
Expand Down
2 changes: 0 additions & 2 deletions docs/docs/products/cvm.md

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

The first opportunity for restaking on Solana via Picasso is launching soon, and we’re giving users a chance to get in on the action early and earn boosted rewards through a Restaking Vault and team staking competition.

:::note
As previously [announced](https://twitter.com/Picasso_Network/status/1734941879068762305) and [described](https://medium.com/@Picasso_Network/restaking-is-coming-to-solana-via-picasso-5ea0b027d269), Picasso is introducing the DeFi primitive of restaking into the Solana ecosystem via the Solana IBC connection on [trustless.zone](https://www.trustless.zone/). To allow users to participate in this opportunity as early as possible, we are opening a restaking vault prior to the launch of Solana IBC. Restaked assets will then be delegated to validators upon launch.

From here, users will not only begin earning staking rewards, but also they will get a head start in a new team staking competition. In this competition, teams of users will compete to earn boosted transfer revenues.
:::

## The Importance of Restaking
Restaking has been [described as a new primitive](https://consensys.io/blog/eigenlayer-a-restaking-primitive) in crypto economic security that enables the rehypothecation of a token on the consensus layer. Specifically, the process of staking involves a user staking an ecosystem’s native asset to that ecosystem’s validators. The user then receives a receipt token representing this stake. They then “restake” this receipt token with validators again. This mechanism enables users to multiply the crypto economic security (and the yield) of their initial tokens, as they are essentially able to stake the same assets twice, receiving yield and supporting PoS validation both times.
Expand All @@ -19,10 +21,6 @@ For the strength and security of the network, it is important to have validators
Moreover, the restaking vault allows users to beat the crowd and participate in restaking in the Solana ecosystem before everyone else - and get rewarded for doing so.

## How the Vault Works
Some of the initial assets that will be accepted into the restaking vaults are:
- jitoSOL, the liquid staking token of Jito
- mSOL, the liquid staking token of Marinade Finance
- SOL

Here’s how you can make use of the restaking vaults:

Expand All @@ -35,20 +33,17 @@ Here’s how you can make use of the restaking vaults:
5. At the launch of the connection, all deposited assets in the vault will be delegated to validators for the Solana IBC connection, helping to secure the network
6. Your assets will then be designated as restaked with validators
7. You’ll start accruing restaking rewards proportionate to the amount of assets and time you’re staked, in addition to a bonus for being a vault participant
8. You can withdraw your restaked assets at any time after connection launch

## Vault Launch
The restaking vaults on Solana are planned for a January launch. Vaults will stay open until the launch of Solana IBC. Once launch occurs, the assets will be assigned to the guest blockchain layer. It is important to be aware vault deposits will be locked until launch.

We will be doing three rounds of deposits with caps. More information on the caps will be distributed towards the date of launching.
8. You can withdraw your restaked assets at any time after the launch of Solana IBC once the guest blockchain's unbonding period is over.

## How Restaking Will Work

Restaking is a critical part of the guest blockchain mechanism that facilitates the Solana IBC connection. Essentially, the guest blockchain serves as an L2 of Solana, and this network needs to be validated like any other chain using the proof-of-stake (PoS) model, as Solana does.

Specifically, on the guest blockchain, previously staked assets are restaked with validators to secure the network. The security model involves control by a supermajority of nodes/validators on the guest blockchain. It is the nodes’ responsibility to sign corresponding payloads of transfer transactions. To join, a validator must provide a bonded stake. Thus, this model is gated from independent actors joining. Validators in the guest blockchain will be rewarded with a portion of bridging gas/transaction fees.

:::info
Picasso will accept staking of both Solana’s native SOL token as well as restaking of various receipt tokens for SOL staking platforms. These tokens can be staked with validators of the guest blockchain powering the Solana IBC connection. Users will be able to stake from trustless.zone, depositing their assets from their connected digital wallets into the staking contracts. From these contracts, assets will be delegated to validators of [the guest blockchain](https://research.composable.finance/t/crossing-the-cross-blockchain-interoperability-chasm/33) that supports the IBC Solana connection. Thus, restaking in this manner will support the guest blockchain along the premise of PoS, which enhances the security of this connection.
:::

In this mechanism, it is critical that we properly determine the value of these restaked tokens. To accomplish this, oracles will need to be utilized to query different token pricing. The oracles can provide price feeds on token pairs, eg. stETH / ETH and provide a reasonable estimate of the current value based on the swap price.

Expand All @@ -69,3 +64,14 @@ jitoSOL is the liquid staking token from [Jito](https://www.jito.network/), whic
[Orca](https://www.orca.so/) is a decentralized exchange (DEX) on Solana where every trade supports charities fighting climate change. Users providing liquidity into [Orca’s concentrated liquidity pools](https://v1.orca.so/liquidity) receive liquidity provider (LP) tokens to represent their deposits. The TVL in these liquidity pools is over $85 million, providing LPers with approximately $200,000 in weekly rewards.

Each of these tokens represents a significant market that can now be restaked to Picasso’s Solana IBC validators. If you already hold any of these tokens, or if we’ve inspired you to acquire some, we hope you’ll consider restaking them with us to support Picasso’s Solana IBC connection and to enhance your own yield.

## Multisig signers
The restaking layer will initially be governed by two multisigs with limited abilities until a decentralised governance system is established.

1. The **Admin multisig** is responsible for the following:

- Whitelisting tokens
- Setting the staking cap
- Setting if the guest chain is initialised or not

2. The **Upgradability multisig** holds the upgrade authority. This multisig has the ability to upgrade the restaking contract and no other powers.
3 changes: 3 additions & 0 deletions docs/docs/technology/solana-restaking/flow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions docs/docs/technology/solana-restaking/vaults.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Restaking Vaults

Picasso's [Restaking Vaults](https://github.com/ComposableFi/emulated-light-client/blob/master/solana/restaking/README.md) offer users a secure and flexible way to **stake various Solana ecosystem tokens, participate in the launch of IBC on Solana, and delegate tokens to validators**. Picasso's [Restaking Vaults](https://github.com/ComposableFi/emulated-light-client/blob/master/solana/restaking/programs/restaking/src/lib.rs) on Solana provide users the opportunity to stake SOL (Solana) and earn additional yield on Solana LSTs (Liquid Staked Solana tokens) in phase 1, and later, in phase 2, users will also be able to stake Orca LP tokens and receipt tokens from other platforms. The vaults are planned for a January launch where they will stay open until the launch of Solana IBC. Once launch occurs, the assets will be assigned to the guest blockchain layer. It is important to be aware vault deposits will be locked until launch. There will be three rounds of deposits with caps.

Understanding the processes outlined in this documentation will enable users to be a part of implementing IBC on Solana and help navigate engaging with the Restaking vaults effectively.

## Token Types
Users can stake SOL and SOL LSTs in phase 1, and in phase 2, Orca LP tokens and receipt tokens from other platforms are also eligible for staking. When users stake into the vault, they receive an NFT as a receipt token. This NFT serves as a unique identifier for the staked tokens, similar to the Uni V3 NFT receipt tokens. Once users stake their tokens in the vault, they are locked up until the launch of IBC on Solana.

There will be a cap set on the vaults in the following three phases during the launch of the vaults:

- Round 1: 50,000 SOL
- Round 2: 150,000 SOL
- Round 3: 500,000 SOL

## Delegation Options
Upon the launch of the bridge, users have the option to delegate their staked tokens to a validator. Users can choose to delegate to a validator of their choice, delegate to their own validator, or if they opt for neither of these, a validator will be randomly delegated the tokens.

Users who wish to remove their stake from the vault after IBC is live must wait until the unbonding period (denoted as "x") of the guest blockchain has elapsed.

## Receipt Token
Once users deposit stake into the vaults, they receive a unique NFT which represents the value of their stake. To ensure accurate tracking of rewards, the decision to use NFTs for Receipt Tokens is crucial. Fungible tokens cannot make them transferable because the state would have to be connected to the staker’s public key. If they are made transferable, rewards cannot be tracked.

The NFT would be used to derive the seeds of an account which would store the following:

- Stake amount
- Stake token mint
- the last time they received the rewards
- validator pubkey

NFTs can be easily transferred to anyone while retaining the state information. The NFT holder is the only account that has the ability to claim the rewards.

## Staking Process

1. The following process is how a user would deposit their stake, either SOL, JitoSOL, mSOL or bSOL
2. An NFT is minted and a new PDA is created with the NFT mint as the seed. The stake is updated throgh a CPI call to the guest chain program. The PDA would store the following data:
- stake amount
- stake mint
- last epoch height at which rewards were claimed
- validator pubkey

3. The user can claim the rewards if they own the receipt NFT. The rewards would be calculated from the height at which it was last claimed. If claiming for the first time, it will return all the rewards and store the current epoch height in the storage.

4. While withdrawing, the rewards and stake are returned to the user and the receipt NFT is burnt.

![vault-staking-flow](../solana-restaking/flow.png)

:::tip Fractionalisation
At a later time, fractionalisation will be introduced. This will allow users to transfer a part of their receipt token to another account and split the stake in the ratio mentioned and maintain the same rewards epoch height. After which each user can claim their rewards separately. Please note this is the only way a user can transfer a part of their receipt token.
:::
14 changes: 12 additions & 2 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@
collapsed: true,
items: [
"technology/ibc/solana/technical-overview",
"technology/ibc/solana/restaking",
],
},
"technology/ibc/cosmos-ibc",
Expand Down Expand Up @@ -229,6 +228,18 @@
"technology/cvm/tutorial",
],
},
{
type: "category",
label: "Solana Restaking",
link: {
type: "doc",
id: "technology/solana-restaking",
},
collapsible: false,
collapsed: false,
items: [
"technology/solana-restaking/vaults"],
},

"technology/mantis",
],
Expand All @@ -238,7 +249,6 @@
id: "develop/build-on-composable",
},
"develop/composable-cosmos",
"develop/composable-testnet-4",
"develop/local-picasso-guide",
"develop/oracle-set-up-guide",
"develop/collator-guide",
Expand Down

0 comments on commit ad859be

Please sign in to comment.