# Team Members & Project Ideas
Lucio Tato - Backend rust sc (Buenos Aires, Argentina)
https://github.com/luciotato
discord: LMT-luciotato#1019
www.narwallets.com
Similar NEAR project: https://narwallets.github.io/meta-pool/
https://www.linkedin.com/in/lucio-tato/
x4e(mastercooker) - backend (England)
https://github.com/x4e
discord: mastercooker#7021
dVcrypt (David, San Francisco, USA)
backend dev with some blockchain experience
discord dVcrypt#1416
http://www.tradeonserum.com/
Marco (The Netherlands)
Product Manager, Infrastructure Architect, Systems Monitoring
discord: MB - Stakeconomy.com#1777
https://github.com/stakeconomy
Amir Cohen - Full-stack dev (israel)
https://github.com/amir0900
discord: Monolist | stakeconomy.com#3896
## Project Ideas
a) Code MVP for https://narwallets.github.io/meta-pool/ in Solana
We had a few meeting last few weeks with the Solana team. last week with their product manager, these are our notes:
https://docs.google.com/document/d/13tnZ6FSxjakaDyRwimriKUSRZNOuqvKDtUGSD_4Lx04/edit?usp=sharing
## Current Advance
* We're reusing solana's stake-pool (SSP) code (our copy here: https://github.com/SolAutoStake/StakePool)
* SSP docs are here: https://github.com/joncinque/solana-program-library/blob/sp-docs/docs/src/stake-pool.md
* Docs PR is https://github.com/solana-labs/solana-program-library/pull/1277/files
* SSP has a CLI here we will adapt too.
* The SSP charges 3% just for tokenizing stake.
### Changes
* Generate our own token
* Do not charge 3% just for tokenizing, charge 0.3%
* Add a liquidity pool
* Charge fixed 2.5% (or .5-5% according to curve), for swapping stSOL->SOL skipping waiting period
* Requires 2 new instructions to add/remove liquidity
* Requires 1 new instruction to sell stSOL
* Alter/new cli to manage 3 new instructions
* The Front-end should manage deposit (converts staked-account->stSOL), withdraw (converts stSOL->staked-account) and the new instruction sell stSOL (converts stSOL->SOL directly skipping 2-3 days cooldown period)
## Current Tasks:
### Backend team
Mastercooker:
* Create/register the token. alter the code to reference stSOL
* create new token: $METALP, to represent shares of the Liq.Pool
* ~~create a github org & clone the code~~. done: https://github.com/SolAutoStake/StakePool
* ~~own the stSOL token part of the code. ~~ not-needed
David/dVcrypt:
* ~~own the cli-tool code enough to add a cli command to set the weight value.~~ Cancelled, we can't make a stake distributor in so little time.
* ~~own the Validator-list code, add a "weight" value, that's which % of the total staking pool the validator gets. ~~ Cancelled, we can't make a stake distributor in so little time.
Lucio:
* Add 3 new "instructions" :
* Add Liquidity to SSLP (Input SOL, Output $METALP)
* Remove Liquidity to SSLP (Input $METALP, Output SOL)
* Sell stSOL (Input stSOL, Output SOL from the SSLP minus fee)
* Move fee to Sell_stSOL instruction
### Front-end team
Amir/Monolist:
* General front end for Solana Stake-Pool
* stSOL popup
* add amout input to sell stSOL popup
* select a destanation wSOL account from the list(imported)
* 80% of our code is the same as the stake-pool
* The first 2 steps are to "deposit" & "withdraw" active-stake accounts into/from the pool
* There are examples of calling the stake-pool contract from rust here:
* Deposit: https://github.com/solana-labs/solana-program-library/blob/a7f16f7b200b3abe0e77b8aa56692749ce211e6f/stake-pool/cli/src/main.rs#L500
* Withdraw: https://github.com/solana-labs/solana-program-library/blob/a7f16f7b200b3abe0e77b8aa56692749ce211e6f/stake-pool/cli/src/main.rs#L783
* Add our new instructions
* ( @luciotato please reffer for the instruction)
* add sell st_sol - UI & logic
* I'm creating a call to "sell_st_sol" in the 'meta' cli. **It's not ready yet.**
* The main new instruction is "Sell stSOL -> wSOL", There's a *token-swap-program* in the Solana Program Library (SPL) https://spl.solana.com/token-swap and there's also a *front-end* for the program here: https://github.com/project-serum/oyster-swap . Maybe you can reuse some of that code.
* add support in sollet external wallet
* pull relative spl address based on owner account(system program)
* set hard-coded name($stSOL/$METALP) based on program address
## Notes
We're using TESTNET because Validators are in TESTNET
-to compile the cli in ubuntu
sudo apt-get install libudev-dev
sudo apt-get install pkg-config
program is deployed at E2wGYXEPw46FdJWL1MfRoN3JhQY4w6Dmaz9s4ehV2483
with Dave's testnet account: 6Hqtywmjddy9xoUz1b9pNXsPDf3FZehmgPmUCk3o8Ee4
[53,110,139,84,179,218,171,165,131,24,83,152,172,186,32,137,128,36,53,120,222,54,161,33,226,253,244,76,4,136,62,101,78,155,3,197,78,198,149,210,58,209,120,150,147,11,5,184,216,193,109,16,5,173,10,22,107,199,63,227,146,158,241,177]
stakeconomy testnet validators:
vote acc 2HUKQz7W2nXZSwrdX5RkfS2rLU4j1QZLjdGCHcoUKFh3
vote acc 87QuuzX6cCuWcKQUFZFm7vP9uJ72ayQD5nr6ycwWYWBG
https://www.validators.app/validators/testnet/8SQEcP4FaYQySktNQeyxF3w8pvArx3oMEh7fPrzkN9pu?locale=en&order=score
https://www.validators.app/validators/testnet/9cZua5prTSEfednQQc9RkEPpbKDCh1AwnTzv3hE1eq3i
```
Pool Main Validator Accounts
There's only one acc per validator in the stake-pool
./meta create-validator-stake --validator 2HUKQz7W2nXZSwrdX5RkfS2rLU4j1QZLjdGCHcoUKFh3
Creating stake account EUuiYECwpBMp1FMeKaGXKZggFkRCEoHF2oEjrrgs2baU
--> delegated to 2HUKQz7W2nXZSwrdX5RkfS2rLU4j1QZLjdGCHcoUKFh3
lucio@lucio-kde:~/repos/StakePool/metacli$ ./meta create-validator-stake --validator 87QuuzX6cCuWcKQUFZFm7vP9uJ72ayQD5nr6ycwWYWBG
Creating stake account 33FQwAUomJxozTnrzeiDxYNJffWZec72fsGQi9wmda9V
--> delegated to 87QuuzX6cCuWcKQUFZFm7vP9uJ72ayQD5nr6ycwWYWBG
```
pending: Add those 2 when activated. Adding the acc adds the validator to the stake-pool vaidator list
## $METALP accounts - Liq.Pool LP tokens
You obtain these when you add liquidity (`>meta add-liquidity`)
```
example:
>./meta add-liquidity 4 --source ALuw8nNFNxMhgEL44sezPGSTtqrjU9tkVw5YZWsn9iE3
list:
> spl-token accounts 3XrStMayUhNpsFJzmKyynC99fs1Ppbenpj3kpC77EQEh
Account Balance
----------------------------------------------------
8jjuSgsmLPqCwJm9fDPV6mVye5QPH5UXWxCH44MpixXS 4
B1z3NwVijPahzTWGTnjqUmvosFddSgqwBQjgyTUxMwb2 5
CFxr4Ar2aQ9RLNLSFHceUezHFHpGUpdStfGrAJFmyzdi 0
```
### Testnet Demo Accounts
```
// Solana base programs
const W_SOL_1111111_MINT_ACCOUNT:&str="So11111111111111111111111111111111111111112";
//Values for TESTNET
const SMART_POOL_PROGRAM_ACCOUNT_ID:&str="E2wGYXEPw46FdJWL1MfRoN3JhQY4w6Dmaz9s4ehV2483";
/*
Creating mint 21ofzqmgounc8bX4CK6j3Ff4zjvX6GmRykUnJAU96zKz
Creating pool fee collection account EG42YnCDMx1ham3NVryGM71yiCo3zNSyJ1ktPvguFtqE
Creating stake pool C3WQybyZc45bhRP4PJnM7JhKQFXmqQR5eWr8n8Lxjgex
Signature: 5AdVComuwVXbcyD2MmXNMgAKGx7aE1o8eXXzCgvmxjdgoPmr7Hd5xL28NARTH88PGbGb3ZzxbkjYKcpgic5fUDTY
*/
const STAKE_POOL_STATE_ACCOUNT:&str="C3WQybyZc45bhRP4PJnM7JhKQFXmqQR5eWr8n8Lxjgex";
const ST_SOL_MINT_ACCOUNT:&str="21ofzqmgounc8bX4CK6j3Ff4zjvX6GmRykUnJAU96zKz";
//const POOL_FEE_COLLECTION_ACCOUNT:&str="EG42YnCDMx1ham3NVryGM71yiCo3zNSyJ1ktPvguFtqE";
/*
lucio@lucio-kde:~/repos/StakePool/metacli$ ./meta create-liq-pool
Creating the 2 sides of the pool, wsol & st_sol accounts
liquidity pool wsol account: 2G3TZSRxmPtuwrdcXMQMjzKdebSXuXrPaupVGzZ1Ssf3
liquidity pool st_sol account: 9ipM64eAyTtV5mY27qrdAe5x143QfcjuDRWp72EZBeez
Creating meta_lp_mint_account EYbFdPKbRa3MxGxQy9YgFSFs7448Gq17fWRYSeNhVNtq
*/
/// state acc for the liq pool
const LIQ_POOL_ACCOUNT:&str="rxTBFFRfwcgx5YedbwLcKntCwMs9tJoQvzYmRnbpLKS";
/// liq pool legs wSOL & stSOL, spl-token accounts
const LIQ_POOL_WSOL_ACCOUNT:&str="2G3TZSRxmPtuwrdcXMQMjzKdebSXuXrPaupVGzZ1Ssf3";
#[allow(dead_code)]
const LIQ_POOL_ST_SOL_ACCOUNT:&str="9ipM64eAyTtV5mY27qrdAe5x143QfcjuDRWp72EZBeez";
/// mint for META_LP
const META_LP_MINT_ACCOUNT:&str="EYbFdPKbRa3MxGxQy9YgFSFs7448Gq17fWRYSeNhVNtq";
PDA_LIQ_POOL_authority GZMs49Ab3qipCShUrET7XwRwTc383ZtbKRpRb4XpkgJE
stake_pool_deposit_authority Lr45T8qwy6a6FRG3LxZ3eBHiPveF2Sos4nypTquVyYx
pool_withdraw_authority BepTWihwFSMgqDchwGhkSiYTkzHUC2urG9tVpwxCW7vg
validator_stake_list (state account): 14brXrbKoL2ahUKGBRubXUDPAAvHDBGEmVnFrQgoE1f7
Accounts in the stake-pool. One per validator
Validators (2)
----------------
Validator 2HUKQz7W2nXZSwrdX5RkfS2rLU4j1QZLjdGCHcoUKFh3 Balance:10002282881
Validator 87QuuzX6cCuWcKQUFZFm7vP9uJ72ayQD5nr6ycwWYWBG Balance:11002282880
EUuiYECwpBMp1FMeKaGXKZggFkRCEoHF2oEjrrgs2baU 10.002282881 SOL -> 2HUKQz7W2nXZSwrdX5RkfS2rLU4j1QZLjdGCHcoUKFh3
33FQwAUomJxozTnrzeiDxYNJffWZec72fsGQi9wmda9V 11.00228288 SOL -> 87QuuzX6cCuWcKQUFZFm7vP9uJ72ayQD5nr6ycwWYWBG
Steps to native delegate stake in Solana:
1. create stake-account with some SOL
2. delegate the stake-account to a Validator
3. wait for activation
Our meta pool
4. deposit the delegated & active stake-account into the stake-pool, get stSOL
```
Project Submitted:
### Content Created
Video Presentation: https://youtu.be/QnL5atH78fM
Slides Presentation: https://docs.google.com/presentation/d/1z_yRACW9CxHkJHYUV-WkNHuhZytooxnnaCAKwCf5-iA/edit?usp=sharing
Github Repo: https://github.com/SolAutoStake