From e54e5b3ed48c45a84438d656b8ac1b91fd68e882 Mon Sep 17 00:00:00 2001 From: JafarAz Date: Sun, 21 Jan 2024 20:52:04 -0300 Subject: [PATCH 1/6] wakey --- docs/docs/intro.md | 8 +-- docs/docs/products/cvm.md | 2 - .../restaking.md => solana-restaking.md} | 18 +++---- .../docs/technology/solana-restaking/flow.png | 3 ++ .../technology/solana-restaking/vaults.md | 49 +++++++++++++++++++ docs/sidebars.js | 14 +++++- 6 files changed, 73 insertions(+), 21 deletions(-) delete mode 100644 docs/docs/products/cvm.md rename docs/docs/technology/{ibc/solana/restaking.md => solana-restaking.md} (93%) create mode 100644 docs/docs/technology/solana-restaking/flow.png create mode 100644 docs/docs/technology/solana-restaking/vaults.md diff --git a/docs/docs/intro.md b/docs/docs/intro.md index 07c9c7d92dd..0958f59277c 100644 --- a/docs/docs/intro.md +++ b/docs/docs/intro.md @@ -27,7 +27,7 @@ slug: /

Architecture

- 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.
@@ -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 diff --git a/docs/docs/products/cvm.md b/docs/docs/products/cvm.md deleted file mode 100644 index 45876c0891b..00000000000 --- a/docs/docs/products/cvm.md +++ /dev/null @@ -1,2 +0,0 @@ -# /home/dz/github.com/ComposableFi/composable/docs/docs/products/cvm - diff --git a/docs/docs/technology/ibc/solana/restaking.md b/docs/docs/technology/solana-restaking.md similarity index 93% rename from docs/docs/technology/ibc/solana/restaking.md rename to docs/docs/technology/solana-restaking.md index a93f1c4e917..87202193558 100644 --- a/docs/docs/technology/ibc/solana/restaking.md +++ b/docs/docs/technology/solana-restaking.md @@ -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. @@ -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: @@ -35,12 +33,7 @@ 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. You must wait for the guest blockchain's unbonding period to receive your tokens. ## How Restaking Will Work @@ -48,7 +41,9 @@ Restaking is a critical part of the guest blockchain mechanism that facilitates 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. @@ -69,3 +64,6 @@ 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. + + + diff --git a/docs/docs/technology/solana-restaking/flow.png b/docs/docs/technology/solana-restaking/flow.png new file mode 100644 index 00000000000..6d446d0f74a --- /dev/null +++ b/docs/docs/technology/solana-restaking/flow.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d12cca837e7c29af5acc11675ac2d3f4a5131635ecb1565c17db7b6a74d6ad17 +size 119130 diff --git a/docs/docs/technology/solana-restaking/vaults.md b/docs/docs/technology/solana-restaking/vaults.md new file mode 100644 index 00000000000..161cdb4283e --- /dev/null +++ b/docs/docs/technology/solana-restaking/vaults.md @@ -0,0 +1,49 @@ +# Restaking Vaults + +Composable’s Restaking Vaults 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**. Composable’s Restaking Vaults 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 gues 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 + +NFTs can be easily transferred to anyone while retaining the state information. The NFT holder is the only account hat has the ability to claim the rewards. The rewards can also be made partially transferable but through the contract. + +## 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 + - take 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. +::: \ No newline at end of file diff --git a/docs/sidebars.js b/docs/sidebars.js index 8ea78f52c80..13211be2cb4 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -201,7 +201,6 @@ collapsed: true, items: [ "technology/ibc/solana/technical-overview", - "technology/ibc/solana/restaking", ], }, "technology/ibc/cosmos-ibc", @@ -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", ], @@ -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", From 21d14b77d149aedce2374cceb93fc856be72550f Mon Sep 17 00:00:00 2001 From: JafarAz Date: Mon, 22 Jan 2024 11:23:39 -0300 Subject: [PATCH 2/6] ms --- docs/docs/technology/solana-restaking.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/docs/technology/solana-restaking.md b/docs/docs/technology/solana-restaking.md index 87202193558..8da0067ae34 100644 --- a/docs/docs/technology/solana-restaking.md +++ b/docs/docs/technology/solana-restaking.md @@ -65,5 +65,13 @@ jitoSOL is the liquid staking token from [Jito](https://www.jito.network/), whic 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. From 708acbc3b07b145cf003d4d531a4ebbb20ad33b0 Mon Sep 17 00:00:00 2001 From: Jafar <107645336+JafarAz@users.noreply.github.com> Date: Mon, 22 Jan 2024 16:25:45 +0000 Subject: [PATCH 3/6] fix typos Co-authored-by: Dhruv D Jain Signed-off-by: Jafar <107645336+JafarAz@users.noreply.github.com> --- docs/docs/technology/solana-restaking/vaults.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/technology/solana-restaking/vaults.md b/docs/docs/technology/solana-restaking/vaults.md index 161cdb4283e..b573be040bb 100644 --- a/docs/docs/technology/solana-restaking/vaults.md +++ b/docs/docs/technology/solana-restaking/vaults.md @@ -16,7 +16,7 @@ There will be a cap set on the vaults in the following three phases during the l ## 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 gues blockchain has elapsed. +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. @@ -27,14 +27,14 @@ The NFT would be used to derive the seeds of an account which would store the fo - Stake token mint - the last time they received the rewards -NFTs can be easily transferred to anyone while retaining the state information. The NFT holder is the only account hat has the ability to claim the rewards. The rewards can also be made partially transferable but through the contract. +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 - - take mint + - stake mint - last epoch height at which rewards were claimed - validator pubkey From 649e49ad5232ba4293e6df21e6f0547b6dada888 Mon Sep 17 00:00:00 2001 From: Jafar <107645336+JafarAz@users.noreply.github.com> Date: Tue, 23 Jan 2024 18:03:24 +0000 Subject: [PATCH 4/6] Update docs/docs/technology/solana-restaking.md Co-authored-by: Dhruv D Jain Signed-off-by: Jafar <107645336+JafarAz@users.noreply.github.com> --- docs/docs/technology/solana-restaking.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/technology/solana-restaking.md b/docs/docs/technology/solana-restaking.md index 8da0067ae34..39d6d0258d6 100644 --- a/docs/docs/technology/solana-restaking.md +++ b/docs/docs/technology/solana-restaking.md @@ -33,7 +33,7 @@ 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 the launch of Solana IBC. You must wait for the guest blockchain's unbonding period to receive your tokens. +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 From 28df46eb1fec2b35002164527a7eeb388bf9d0f8 Mon Sep 17 00:00:00 2001 From: JafarAz Date: Tue, 23 Jan 2024 19:22:37 -0300 Subject: [PATCH 5/6] Update vaults.md --- docs/docs/technology/solana-restaking/vaults.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/technology/solana-restaking/vaults.md b/docs/docs/technology/solana-restaking/vaults.md index b573be040bb..c575452d620 100644 --- a/docs/docs/technology/solana-restaking/vaults.md +++ b/docs/docs/technology/solana-restaking/vaults.md @@ -1,6 +1,6 @@ # Restaking Vaults -Composable’s Restaking Vaults 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**. Composable’s Restaking Vaults 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. +Picasso's [Restaking Vaults](https://github.com/ComposableFi/emulated-light-client/blob/stake-during-bounding/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/df10524387eb27af5ddd97016b25ce03a38be0e2/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. From a37563c5d1939295acffe4b9f80311b2f0446df0 Mon Sep 17 00:00:00 2001 From: Jafar <107645336+JafarAz@users.noreply.github.com> Date: Thu, 25 Jan 2024 15:06:48 +0000 Subject: [PATCH 6/6] Apply suggestions from code review Co-authored-by: Dhruv D Jain Signed-off-by: Jafar <107645336+JafarAz@users.noreply.github.com> --- docs/docs/technology/solana-restaking/vaults.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs/technology/solana-restaking/vaults.md b/docs/docs/technology/solana-restaking/vaults.md index c575452d620..41b630460c4 100644 --- a/docs/docs/technology/solana-restaking/vaults.md +++ b/docs/docs/technology/solana-restaking/vaults.md @@ -1,6 +1,6 @@ # Restaking Vaults -Picasso's [Restaking Vaults](https://github.com/ComposableFi/emulated-light-client/blob/stake-during-bounding/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/df10524387eb27af5ddd97016b25ce03a38be0e2/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. +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. @@ -26,6 +26,7 @@ The NFT would be used to derive the seeds of an account which would store the fo - 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.