Skip to content

feat(xc-admin-cli): propose integrity-pool reward withdraw#3922

Merged
guibescos merged 2 commits into
mainfrom
hydra/i-dnvdpfke/head
Jul 22, 2026
Merged

feat(xc-admin-cli): propose integrity-pool reward withdraw#3922
guibescos merged 2 commits into
mainfrom
hydra/i-dnvdpfke/head

Conversation

@guibescos

@guibescos guibescos commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Adds a withdraw-integrity-pool-rewards multisig command to xc-admin-cli that proposes the integrity-pool withdraw instruction through the Squads vault.

Details

  • Extends the bundled integrity-pool.json IDL with the withdraw instruction and the PoolConfig account so Anchor can build the instruction and read the reward-custody mint on-chain.
  • The command takes a required --destination (a PYTH token account) and an optional --amount in raw base units. When --amount is omitted it reads the reward-custody token balance and withdraws the full amount.
  • reward_program_authority is resolved to the multisig vault authority PDA (same pattern as set-publisher-stake-account); pool_config is auto-resolved from its PDA seeds and pool_reward_custody is derived as the pool_config ATA of the pool's pyth_token_mint.
  • Before proposing, the built instruction is simulated (sigVerify: false, since the authority signature is produced by the vault PDA at execution time) and the command aborts if the simulation fails.

Verification

Simulated the built instruction against Solana mainnet-beta (pool_config BE8Xq1iHSQYKG8CZorZsrTnxyeHKQLzCWm4dYKdFkVEL, reward custody FbSivnCf6iXfXns6osFih2MgX8icmSKx9iba3gyFpiCT): the transaction returned err: null with program logs showing Instruction: Withdraw and a successful SPL token transfer CPI.

Add a withdraw-integrity-pool-rewards multisig command that proposes the integrity-pool withdraw instruction through the Squads vault. When no amount is given it withdraws the full reward-custody balance, and it simulates the built instruction before proposing so a failing withdraw is never queued.
@vercel
vercel Bot temporarily deployed to Preview – staking July 22, 2026 14:31 Inactive
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

7 Skipped Deployments
Project Deployment Actions Updated (UTC)
api-reference Skipped Skipped Jul 22, 2026 4:31pm
component-library Skipped Skipped Jul 22, 2026 4:31pm
developer-hub Skipped Skipped Jul 22, 2026 4:31pm
entropy-explorer Skipped Skipped Jul 22, 2026 4:31pm
insights Skipped Skipped Jul 22, 2026 4:31pm
proposals Skipped Skipped Jul 22, 2026 4:31pm
staking Skipped Skipped Jul 22, 2026 4:31pm

Request Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

The withdraw command read pythTokenMint off the result of
integrityPoolProgram.account.poolConfig?.fetch(), which the generic
Idl-typed Program exposes as possibly-undefined with unknown fields,
breaking the tsc build (TS18048 / TS2345). Cast the fetched account to
its known shape so the mint can be passed to PublicKey.
@vercel
vercel Bot temporarily deployed to Preview – insights July 22, 2026 16:31 Inactive
@vercel
vercel Bot temporarily deployed to Preview – developer-hub July 22, 2026 16:31 Inactive
@vercel
vercel Bot temporarily deployed to Preview – staking July 22, 2026 16:31 Inactive
@vercel
vercel Bot temporarily deployed to Preview – proposals July 22, 2026 16:31 Inactive
@vercel
vercel Bot temporarily deployed to Preview – component-library July 22, 2026 16:31 Inactive
@vercel
vercel Bot temporarily deployed to Preview – entropy-explorer July 22, 2026 16:31 Inactive
@vercel
vercel Bot temporarily deployed to Preview – api-reference July 22, 2026 16:31 Inactive
@KemarTiti
KemarTiti self-requested a review July 22, 2026 16:55

@KemarTiti KemarTiti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@guibescos
guibescos merged commit 6d1eea5 into main Jul 22, 2026
15 of 16 checks passed
@guibescos
guibescos deleted the hydra/i-dnvdpfke/head branch July 22, 2026 16:55
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