-
Notifications
You must be signed in to change notification settings - Fork 22
cli: various improvements #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 9 commits
cac1b03
dc40186
0a126fa
842e185
2025fc2
84cc620
640dcda
f0fff83
c7f2c69
619fda0
2a1316d
39bf1d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,52 @@ | ||
| ## Solana Program Library Single-Validator Stake Pool | ||
| # Single-Validator Stake Pool | ||
|
|
||
| The single-validator stake pool program is an upcoming SPL program that enables liquid staking with zero fees, no counterparty, and 100% capital efficiency. | ||
| Fully permissionless liquid staking. | ||
|
|
||
| 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. | ||
| | Information | Account Address | | ||
| | --- | --- | | ||
| | Single Pool | `SVSPxpvHdN29nkVg9rPapPNDddN5DipNLRUFhyjFThE` | | ||
|
|
||
| The program is a stripped-down adaptation of the existing multi-validator stake pool program, with approximately 80% less code, to minimize execution risk. | ||
| ## Overview | ||
|
|
||
| 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. | ||
| 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. | ||
|
|
||
| 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. | ||
|
|
||
| Users can only deposit and withdraw active stake, but liquid sol deposit is coming in a future update. | ||
|
|
||
| ## Security Audits | ||
|
|
||
| The Single Pool Program has received three external audits: | ||
|
|
||
| * Zellic (2024-01-02) | ||
| - Review commit hash [`ef44df9`](https://github.com/solana-program/single-pool/commit/ef44df985e76a697ee9a8aabb3a223610e4cf1dc) | ||
| - Final report <https://github.com/anza-xyz/security-audits/blob/master/spl/ZellicSinglePoolAudit-2024-01-02.pdf> | ||
| * Neodyme (2023-08-08) | ||
| - Review commit hash [`735d729`](https://github.com/solana-program/single-pool/commit/735d7292e35d35101750a4452d2647bdbf848e8b) | ||
| - Final report <https://github.com/anza-xyz/security-audits/blob/master/spl/NeodymeSinglePoolAudit-2023-08-08.pdf> | ||
| * Zellic (2023-06-21) | ||
| - Review commit hash [`9dbdc3b`](https://github.com/solana-program/single-pool/commit/9dbdc3bdae31dda1dcb35346aab2d879deecf194) | ||
| - Final report <https://github.com/anza-xyz/security-audits/blob/master/spl/ZellicSinglePoolAudit-2023-06-21.pdf> | ||
|
|
||
| ## Building and Verifying | ||
|
|
||
| To build the Single Pool Program, you can run `cargo-build-sbf` or use the Makefile | ||
| command: | ||
|
|
||
| ```console | ||
| cargo build-sbf --manifest-path program/Cargo.toml | ||
| make build-sbf-program | ||
| ``` | ||
|
|
||
| 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: | ||
|
|
||
| ```console | ||
| solana-verify get-program-hash -um SVSPxpvHdN29nkVg9rPapPNDddN5DipNLRUFhyjFThE | ||
| ``` | ||
|
|
||
| with: | ||
|
|
||
| ```console | ||
| solana-verify build --library-name program | ||
| solana-verify get-executable-hash target/deploy/spl_single_pool.so | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ serde = "1.0.219" | |
| serde_derive = "1.0.103" | ||
| serde_json = "1.0.142" | ||
| serde_with = "3.13.0" | ||
| solana-account = "2.2" | ||
| solana-account-decoder = "2.3.4" | ||
| solana-borsh = "3.0" | ||
| solana-clap-v3-utils = "2.3.4" | ||
|
|
@@ -43,6 +44,7 @@ solana-stake-program = "2.2" | |
| solana-transaction = "2.2" | ||
| solana-transaction-status = "2.3.4" | ||
| solana-vote-program = "2.2" | ||
| spl-associated-token-account = { version = "7.0", features = ["no-entrypoint"] } | ||
|
||
| spl-token = { version = "8.0", features = ["no-entrypoint"] } | ||
| spl-token-client = { version = "0.16.1" } | ||
| spl-single-pool = { version = "2.0.0", path = "../../program", features = [ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the build works with this command, but in my testing and looking at the source code, I think
--library-nametakes the crate name:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
im not sure what you mean by "the build works with this command [but]
--library-nametakes the crate name." like both work but the latter is preferred for style? ive always built by giving itprogramThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean that it'll build the program, but the CLI code is expecting
spl_single_poolas the input, to show the build hash afterwardsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
39bf1d3
thats funny, im definitely not the only one because ive had people ask about the parse error
solana-verifygives at the end and been like "oh dont worry it just does that for some reason, the build still worked"