Skip to content

Commit b23776b

Browse files
authored
cli: various improvements (#393)
* `display --all` now performs 4 total rpc calls total instead of 1 + (3 * number of pools) * determine if accounts are initialized based on their data rather than lamports * show main stake account excess lamports in `display --verbose` * do not create an associated token account for `deposit --dry-run` * correctly print that we cannot display deposit/withdraw values for `--dry-run` * check a vote-owned account is actually a vote account for `initialize` * remove `ProgramClient` from tests * add test for `display --all` * update README.md
1 parent 013ac7b commit b23776b

File tree

7 files changed

+401
-197
lines changed

7 files changed

+401
-197
lines changed

Cargo.lock

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,51 @@
1-
## Solana Program Library Single-Validator Stake Pool
1+
# Single-Validator Stake Pool
22

3-
The single-validator stake pool program is an upcoming SPL program that enables liquid staking with zero fees, no counterparty, and 100% capital efficiency.
3+
Fully permissionless liquid staking.
44

5-
The program defines a canonical pool for every vote account, which can be initialized permissionlessly, and mints tokens in exchange for stake delegated to its designated validator.
5+
| Information | Account Address |
6+
| --- | --- |
7+
| Single Pool | `SVSPxpvHdN29nkVg9rPapPNDddN5DipNLRUFhyjFThE` |
68

7-
The program is a stripped-down adaptation of the existing multi-validator stake pool program, with approximately 80% less code, to minimize execution risk.
9+
## Overview
810

9-
On launch, users will only be able to deposit and withdraw active stake, but pending future stake program development, we hope to support instant sol deposits and withdrawals as well.
11+
The Single-Validator Stake Pool is an onchain program that enables liquid staking with zero fees, no counterparty, and 100% capital efficiency. The program defines a canonical pool for every vote account, which can be initialized permissionlessly, and mints tokens in exchange for stake delegated to its designated validator.
12+
13+
The program also allows permissionless harvesting of Jito tips and other MEV rewards, turning liquid sol paid into the stake account into active stake earning rewards, functionally distributing these earnings to all LST holders just like protocol staking rewards.
14+
15+
Users can only deposit and withdraw active stake, but liquid sol deposit is coming in a future update.
16+
17+
## Security Audits
18+
19+
The Single Pool Program has received three external audits:
20+
21+
* Zellic (2024-01-02)
22+
- Review commit hash [`ef44df9`](https://github.com/solana-program/single-pool/commit/ef44df985e76a697ee9a8aabb3a223610e4cf1dc)
23+
- Final report <https://github.com/anza-xyz/security-audits/blob/master/spl/ZellicSinglePoolAudit-2024-01-02.pdf>
24+
* Neodyme (2023-08-08)
25+
- Review commit hash [`735d729`](https://github.com/solana-program/single-pool/commit/735d7292e35d35101750a4452d2647bdbf848e8b)
26+
- Final report <https://github.com/anza-xyz/security-audits/blob/master/spl/NeodymeSinglePoolAudit-2023-08-08.pdf>
27+
* Zellic (2023-06-21)
28+
- Review commit hash [`9dbdc3b`](https://github.com/solana-program/single-pool/commit/9dbdc3bdae31dda1dcb35346aab2d879deecf194)
29+
- Final report <https://github.com/anza-xyz/security-audits/blob/master/spl/ZellicSinglePoolAudit-2023-06-21.pdf>
30+
31+
## Building and Verifying
32+
33+
To build the Single Pool Program, you can run `cargo-build-sbf` or use the Makefile
34+
command:
35+
36+
```console
37+
cargo build-sbf --manifest-path program/Cargo.toml
38+
make build-sbf-program
39+
```
40+
41+
The BPF program deployed on all clusters is built with [solana-verify](https://solana.com/developers/guides/advanced/verified-builds). It may be verified independently by comparing the output of:
42+
43+
```console
44+
solana-verify get-program-hash -um SVSPxpvHdN29nkVg9rPapPNDddN5DipNLRUFhyjFThE
45+
```
46+
47+
with:
48+
49+
```console
50+
solana-verify build --library-name spl_single_pool
51+
```

clients/cli/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ serde = "1.0.219"
1717
serde_derive = "1.0.103"
1818
serde_json = "1.0.142"
1919
serde_with = "3.13.0"
20+
solana-account = "2.2"
2021
solana-account-decoder = "2.3.4"
2122
solana-borsh = "3.0"
2223
solana-clap-v3-utils = "2.3.4"
@@ -43,6 +44,7 @@ solana-stake-program = "2.2"
4344
solana-transaction = "2.2"
4445
solana-transaction-status = "2.3.4"
4546
solana-vote-program = "2.2"
47+
spl-associated-token-account-interface = "1.0.0"
4648
spl-token = { version = "8.0", features = ["no-entrypoint"] }
4749
spl-token-client = { version = "0.16.1" }
4850
spl-single-pool = { version = "3.0.0", path = "../../program", features = [

0 commit comments

Comments
 (0)