This represents staked SOL, and can be sold for wSOL in the wSOL/stSOL Liquidity Pool

Related tags

Database rust
Overview

MetaPool

Overview

This a MVP for the Solana Feb-2021 Hackathon

For this project we extended the SPL-stake-pool into our own "Meta-Pool"

This project includes:

  • A Web App UI for the Meta-Pool including:

    • Stake accounts management for the SPL-stake-pool
    • Sell stSOL functionality for immediate unstake
  • a Backend Solana Program, the "Meta-Pool" extending the SPL-stake-pool by adding a Liquidity Pool and with that the possibility of "selling" your staking pool tokens (stSOL) and receive wSOL immediately. By using this functionality, users can skip the cool-down period and get their wSOL out of the staking-pool in a single step.

  • a new CLI tool, called meta allowing the same functionality of the SPL-stake-pool CLI, plus:

    • A command to create the liquidity pool: create-liq pool
    • A command to add-liquidity
    • A command to sell-stsol with the command line
    • A command to remove-liquidity (WIP)

Value Added

Helps users distribute stake between validators

  • The web app UI will use stats and validator metrics to choose different validators for the users to stake. The user receives stake-pool tokens (stSOL) so they can trade the token and they don't need to track dozens of stake-accounts.

Provides immediate unstake

  • The backend solana program adds a liquidity pool holding wSOL and stSOL (stake-pool tokens). The users can sell their stSOL for immediate unstaking, receiving wSOL. This also creates the opportunity for advanced users to become liquidity providers, providing the immediate unstaking service and earning fees on each sell.

Contributes to decentralization

  • This program helps decentralization by distributing users' staking-accounts to several validators.

Creates a new Liquidity Pool

  • This program includes a liquidity pool and the opportunity for liquidity providers to earn fees. The liquidity-pool is the wSOL/stSOL pool that provides immediate unstake (sell stSOL) for a fee.

stSOL Tokens

This program extends the SPL-stake-pool program. We named our stake-pool tokens: stSOL, for staked SOL

stSOLs represent staked SOL, and can be sold for wSOL in the wSOL/stSOL Liquidity Pool (paying a fee to skip the unstaking cool-down period). The value of your stSOL holdings is automatically incremented each epoch when staking rewards are paid.

Immediate Unstake

Users wanting to unstake skipping the 2 day cool-down period can do so in the wSOL/stSOL Liquidity Pool.

In the Liquidity Pool:

  • Users providing liquidity can earn fees on each sell
  • Users wanting to unstake without the cool-down period can do so for a fee.

The wSOL/stSOL Liquidity Pool is a one-sided Liquidity pool. Liquidity providers add only wSOL to the Liq-Pool. The Liq-Pool allows other users to SELL stSOL for wSOL at a discounted price. The discount represents how much users value skipping the 2 day cool-down period to receive their funds. In future enhancements we plan to compute fee % based on a curve to incentivize liquidity providers when the wSOL side of the pool is low.

Standard stake-pool

This contract extends the SPL-stake-pool, so users can utlize it as they do the standard SPL-stake-pool.

User stories:

Alice

Alice wants to stake her SOL with low risk, and also help the community by promoting validator diversification. Alice uses the meta-pool to stake.

Alice makes several stake-deposits. Each time the web-app UI redirects the stake to a different validator. Alice receives stSOL tokens, all in a single account, representing her share of the stake-pool.

She starts earning staking rewards on her stSOL. By holding stSOL she also has the possibility to sell some of her stSOL skipping the waiting period if the need arises.

Bob

Bob already has deposited stake and now holds 10,000 stSOL earning rewards.

Bob needs to unstake 1,000 SOL to use in an emergency. He can’t wait 2 days to get his SOL.

Bob sells 1,030 stSOL for 1,000 wSOL. He sells at a 3% discounted price to get the SOL immediately. Bob gets wSOL in his account. Bob can use his SOL immediately.

Carol

Carol is an investor. She wants to provide liquidity for the wSOL/stSOL pool, earning operation fees. Carol uses the meta-cli tool, to deposit 7,000 wSOL in the liquidity pool. She is the first in the pool, so she gets 7,000 $METALP tokens.

Bob swaps 1,030 stSOL for 1,000 wSOL. He sells at a 3% discounted price to get the SOL immediately. The Liq-Pool delivers 1,000 wSOL to Bob and acquires 1,030 stSOL from Bob. The new value of the $META-LP is now 7,030 SOL (6,000 wSOL + 1,030 stSOL),

Carol $META-LP holding value have increased, and now she owns some stSOL via the Liq-Pool. Carol can eventually withdraw all her liquidity retrieving 6,000 wSOL and 1,030 stSOL

You might also like...
Memcached support for the r2d2 connection pool (Rust)

Memcached support for the r2d2 connection pool (Rust)

rust-postgres support library for the r2d2 connection pool

r2d2-postgres Documentation rust-postgres support library for the r2d2 connection pool. Example use std::thread; use r2d2_postgres::{postgres::NoTls,

A lock-free, append-only atomic pool.

A lock-free, append-only atomic pool. This library implements an atomic, append-only collection of items, where individual items can be acquired and r

The rust client for CeresDB. CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

The rust client for CeresDB. CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

Hypergraph is data structure library to create a directed hypergraph in which a hyperedge can join any number of vertices.

Hypergraph is data structure library to create a directed hypergraph in which a hyperedge can join any number of vertices.

Rust lib for a Vec-like structure that can store different types of different sizes contiguous with each other in memory.

hvec In memory of Anna Harren, who coined the term turbofish - which you'll see a lot of if you use this crate. The main purpose of this crate is the

OBKV Table Client is Rust Library that can be used to access table data from OceanBase storage layer.

OBKV Table Client is Rust Library that can be used to access table data from OceanBase storage layer. Its access method is different from JDBC, it skips the SQL parsing layer, so it has significant performance advantage.

Rust client for the anna-rs KVS that can run in the WasmEdge Runtime

wasmedge-anna-client wasmedge-anna-client is a Rust client for anna-rs based on Tokio for WasmEdge. It communicates with Anna routing nodes and KVS no

rustodrive is a rust client library for communicating with ODrives using the CAN protocol.

rustodrive is a WIP client library for communicating with ODrives using the CAN protocol. It is more than a simple CAN sender/receiver and has many co

Owner
✧( ु•⌄• )◞◟( •⌄• ू )✧ Non- (stop)🚫 Thinking. Make a (Change)🏃!
null
High-performance, lock-free local and concurrent object memory pool with automated allocation, cleanup, and verification.

Opool: Fast lock-free concurrent and local object pool Opool is a high-performance Rust library that offers a concurrent and local object pool impleme

Khashayar Fereidani 8 Jun 3, 2023
A generic connection pool for Rust

r2d2 A generic connection pool for Rust. Documentation Opening a new database connection every time one is needed is both inefficient and can lead to

Steven Fackler 1.2k Jan 8, 2023
An async executor based on the Win32 thread pool API

wae An async executor based on the Win32 thread pool API use futures::channel::oneshot; #[wae::main] async fn main() { let (tx, rx) = oneshot::ch

Raphaël Thériault 10 Dec 10, 2021
Skytable rust client support library for the bb8 connection pool

bb8-skytable Skytable rust client support library for the bb8 connection pool. Heavily based on bb8-redis Basic usage example use bb8_skytable::{

null 3 Sep 18, 2021
LDAP support for the r2d2 connection pool

r2d2-ldap LDAP support for the r2d2 connection pool Install Add this to your Cargo.toml: [dependencies] r2d2-ldap = "0.1.1" Basic Usage use std::threa

Aitor Ruano 2 Nov 7, 2020
Oracle support for the r2d2 connection pool

r2d2-oracle The documentation can be found on docs.rs. Oracle support for the r2d2 connection pool. This fits in between the r2d2 connection manager a

Ralph Ursprung 7 Dec 14, 2022
ODBC adapter for r2d2 connection pool

ODBC adapter for r2d2 connection pool

Konstantin V. Salikhov 9 Nov 3, 2021
r2d2-couchdb: CouchDB support for the r2d2 connection pool

r2d2-couchdb: CouchDB support for the r2d2 connection pool

Pablo Aguiar 10 Dec 2, 2022
r2d2-cypher is a r2d2 connection pool for rusted-cypher

r2d2-cypher is a r2d2 connection pool for rusted-cypher

Markus Kohlhase 10 Oct 16, 2021
rust-mysql-simple support library for the r2d2 connection pool

r2d2-mysql rust-mysql-simple support library for the r2d2 connection pool.

outersky 44 Nov 1, 2022