Relaunch program - #484
Draft
metapileks wants to merge 31 commits into
Draft
Conversation
Contributor
|
Repository Guard
Repository GuardCargo dependency pinning
Cross-program Anchor/Solana version consistency
solana-program crate pin
Anchor.toml solana_version
Crate minimum age
Yarn package.json pinning
npm minimum age
Workflow toolchain consistency
GitHub Action SHA pinning
Sensitive program / config changes
Overall status: pass Lockfile freshness (Cargo.lock + yarn.lock) is checked by the workflow directly and cannot be bypassed. The sensitive-diff section is a review hint - CODEOWNERS handles the actual merge gate. |
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.
Adds
relaunch, a new program that relaunches existing tokens under futarchy. Holders of an old token escrow it during a deposit window. The program then sells the escrowed supply into the token's source pool, converts proceeds to USDC, and spins up a DAO for a new token — 12.5M new tokens distributed pro-rata to depositors and 12.5M paired with all recovered USDC as FutarchyAMM liquidity.Lifecycle
initialize_relaunch→start_deposits→deposit/deposit_via_buy(_raydium)→close_deposits→execute_sell(_raydium)→execute_usdc_swap(WSOL sources only, via a pinned Orca SOL/USDC whirlpool) →complete_relaunch→claim.Failure path: if the deposit threshold (bps of old supply) isn't met or the admin misses the post-close grace period,
mark_failed→claim_refundreturns escrowed tokens.Supported source venues
deposit_via_buyvariants let users buy the old token on its source pool and escrow it in one transaction.Also included
sdk/src/relaunch/v0.1module —RelaunchClientfor every instruction, PDA helpers, and pump/raydium/whirlpool account resolvers. Sell/swap/complete transactions use a global frozen address lookup table to fit versioned-tx limits.