Skip to content

feat(scripts): add dao liquidation proposal template - #499

Merged
metapileks merged 4 commits into
developfrom
pileks/simple-liquidation
Oct 22, 2026
Merged

metapileks merged 4 commits into
developfrom
pileks/simple-liquidation

Conversation

@metapileks

@metapileks metapileks commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

There has been no script for winding a DAO down, and the vault transaction a liquidation needs doesn't fit a Squads transaction: its whole message is instruction data, so the transaction creating it blows the 1232-byte limit. Now scripts/v0.6/liquidationTemplate.ts puts the full liquidation up as one futarchy proposal, oversized vault transactions go behind a frozen lookup table automatically, and once the proposal executes the vault's base and USDC accounts belong to the MetaDAO ops vault, which burns and pays out without a second vote.

What changed

  • Liquidation template: one proposal that withdraws the vault's whole AMM position, removes the Meteora position's unlocked liquidity, claims its fees, revokes the base mint's authority and transfers ownership of the vault's base and USDC accounts to the estate handler. It lands in draft state. A run that fails after the Squads proposal exists is resumed via RESUME_SQUADS_PROPOSAL instead of re-run.
  • DAO actions: withdrawAllLiquidity takes the whole position with zero minimums, so a price move during the vote can't fail it. claimMeteoraFees, revokeMintAuthority (vault-held or via a mint governor the vault administers), approveDelegate and transferTokenAccountOwnership are new; the last two are the reversible and irreversible ways of handing a vault token account over.
  • Squads helpers: when the vault transaction doesn't fit, the payer creates, extends and freezes a lookup table of its accounts up front and the transaction is compiled against it. Probing, comparing and resuming resolve table-loaded addresses instead of refusing them.
  • Proposal and admin-approval flows: pass the lookup table through and send setup transactions as a list, token accounts first, then the table.
  • Execute script: sends a v0 transaction compiled against the vault transaction's lookup tables with a compute limit sized for several programs' worth of inner instructions, and fails loudly on an execution error.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; both previous findings are fixed and no new actionable issues were found.

Summary

Adds a DAO liquidation template and lookup-table support for large Squads proposals.

  • A liquidation vote gathers a DAO’s assets and hands them to its estate handler.
  • Large Squads proposals can use lookup tables from creation through execution.

Reviews (2) · Last reviewed commit: "fix(scripts): let any oversized proposal..." · Reviewed by Greptile

@metapileks
metapileks requested a review from metanallok October 21, 2026 19:35
@metapileks metapileks self-assigned this Oct 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Repository Guard

  • Cargo.lock: pass
  • yarn.lock (sdk): pass
  • yarn.lock (root): pass
  • Repo guard: pass

Repository Guard

Cargo dependency pinning

  • Status: pass
  • Every programs/*/Cargo.toml dep uses =x.y.z, a path = .. workspace ref, or a git dep with a 40-char rev.

Cross-program Anchor/Solana version consistency

  • Status: pass
  • anchor-lang and anchor-spl are pinned to the version declared in repo-guard.toml across every program.

solana-program crate pin

  • Status: pass
  • Every solana-program = "=X" declaration is =1.17.14 (locked to match Cargo.lock).

Anchor.toml solana_version

  • Status: pass
  • Anchor.toml declares solana_version = "1.17.34" (local-dev install for anchor test).

Crate minimum age

  • Status: pass
  • All Cargo deps changed by this PR are at least 14 days old on crates.io.

Yarn package.json pinning

  • Status: pass
  • All package.json deps use exact versions (no ^, ~, ranges).

npm minimum age

  • Status: pass
  • All npm deps changed by this PR are at least 14 days old.

Workflow toolchain consistency

  • Status: pass
  • Every workflow declares anchor-version: 0.29.0.
  • Per-file solana-cli-version values match [toolchain.workflow_solana_cli] in repo-guard.toml.

GitHub Action SHA pinning

  • Status: pass
  • Every third-party action is pinned to a SHA in [actions.sha_allowlist].

Sensitive program / config changes

  • Status: pass
  • No suspicious changes to program IDs, error enums, or sensitive files detected.

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.

Comment thread scripts/utils/squads.ts Outdated
Comment thread scripts/utils/daoActions.ts Outdated
@metapileks
metapileks merged commit 419cdea into develop Oct 22, 2026
5 checks passed
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.

1 participant