Repository navigation
SOLS: vendor upstream - #204
Open
billythedummy wants to merge 1 commit into
Open
billythedummy wants to merge 1 commit into
billythedummy wants to merge 1 commit into
Conversation
haozhidev
approved these changes
Sep 28, 2026
Open
vercettilev
added a commit
to vercettilev/oddie-hook
that referenced
this pull request
Oct 13, 2026
…ome before anyone is paid park_swsol (authority only, market open): the SOL moves straight from the market's vault into Sanctum's swSOL pool and Mint is called in the same instruction, so swSOL lands in a token account the vault PDA owns. The program checks exactly that many swSOL arrived. The vault is passed to Mint as a trailing account: the runtime only carries lamport changes of accounts in the call, and a vault debited outside the list next to a pool credited inside it fails as unbalanced. Sanctum's Mint ignores the extra account (tested against the mainnet program). unpark_swsol: BurnThenClaim with the vault as both the signer for its swSOL and the account the SOL is claimed to, so the SOL can only ever go back to the vault. Authority only while the market is open; anybody once it is settled or closed, so an authority that stops signing cannot strand the pool. resolve_market takes the vault as an optional trailing account and, when it is passed, refuses to settle while any stake is still parked. Optional so the server deployed today, which resolves with two accounts, keeps working across the upgrade (anchor-lang allow-missing-optionals). Addresses and instruction bytes are Sanctum's, from igneous-labs/inf-1.5#204 (vendor/sols/core), checked against mainnet. Error codes appended (6029-6034). Tests: tests/swsol.ts, 7 cases, run by scripts/test-swsol.sh on a local validator with the mainnet swSOL program, mint and pool cloned in; the suite skips itself under a plain anchor test. Existing suite 26/26. Not deployed. The server side (parking long markets, unpark + resolve in one transaction, monthly reward pass-through) is not written yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.