Skip to content

SOLS: vendor upstream - #204

Open
billythedummy wants to merge 1 commit into
feat/solsfrom
feat/sols-i-vendor-sols
Open

billythedummy wants to merge 1 commit into
feat/solsfrom
feat/sols-i-vendor-sols

Conversation

@billythedummy

Copy link
Copy Markdown
Contributor

No description provided.

@billythedummy billythedummy mentioned this pull request Sep 29, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants