Skip to content

Remove Origin Sonic contracts and automation - #3017

Merged
clement-ux merged 2 commits into
masterfrom
clement/remove-sonic
Oct 9, 2026
Merged

clement-ux merged 2 commits into
masterfrom
clement/remove-sonic

Conversation

@clement-ux

@clement-ux clement-ux commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Origin Sonic (OS) is being wound down. Its staking strategy and SwapX AMO are empty, and the vault holds enough wS to cover every claim. This PR removes the Sonic code and automation from the repo. Git history keeps it if we ever need it again.

On-chain state checked at Sonic block ~80.56M:

  • All 5 validators (15, 16, 17, 18 and 45) have 0 stake, and there is no pending SFC withdrawal.
  • The SwapX AMO is empty and no default strategy is set.
  • The vault holds 5.55M wS. That covers the 2.66M of unclaimed queue requests and the 2.89M OS supply.
  • The OSVault implementation on-chain already matches deployments/sonic/OSVault.json, so deleting 026_VaultUpgrade.s.sol drops nothing pending.

Code Change

Removed

  • Solidity:
    • OSVault, OSonic, WOSonic
    • SonicStakingStrategy, SonicValidatorDelegator, SonicSwapXAMOStrategy
    • OSonicHarvester, OSonicZapper
    • the SwapX/Metropolis pool boosters and factories, SonicProxies
    • the Sonic interfaces, MockWS and MockSFC
  • The scripts/deploy/sonic/ folder and build/deployments-146.json. DeployManager and Base.s.sol no longer map chain 146.
  • Talos actions:
    • removed: otokenOsRebase, otokenOsCollectAndRelease, otokenOsSonicRestakeRewards, sonicUndelegate, sonicClaimWithdrawals, manageBribeOnSonic
    • permissionedRebase itself was removed on master by Add Admin Role to Vault  #2973 (merged into this branch)
    • helpers removed: utils/sonic.js, utils/sonicActions.js
    • curated ABIs removed: abi/sonic_staking_strategy.json, abi/poolBoosterSwapX.json, abi/vault.json, abi/poolBoosterCentralRegistry.json. Only the Sonic actions used them; I checked this repo and the org.
  • pnpm ops tasks sonicDefaultValidator and sonicStaking, plus the Sonic branches in tasks/vault.js and depositWETH.
  • Sonic anvil scripts, the Sonic role overrides and the commented Sonic env vars.
  • Docs: generated SVG diagrams, READMEs, ACTIONS.md, the Talos inventory (regenerated), CLAUDE.md and the agent skills.

Kept on purpose

  • otokenAddWithdrawalQueueLiquidity on Sonic (every 10 min). claimWithdrawal funds the queue on its own. But the dapp (oplabs/defi libs/defi/rebasing/src/hooks.ts) only marks a request claimable when queued <= withdrawalQueueMetadata.claimable. Without this poke, OS holders would stay stuck at "pending". The Base/Plume discussion in June 2026 reached the same conclusion. This keeps chain 146 in tasks/lib/{network,contracts,deployments}.ts and SONIC_PROVIDER_URL in the runner image.
  • deployments/sonic/* and addresses.sonic stay as the address registry.
  • brownie/ stays: it holds the historical strategist runlogs.

Talos schedules (seed_schedules.sql)

The seed now deletes the 6 obsolete Sonic rows on the next boot:

  • sonic_staking_request_withdraw
  • sonic_staking_claim_withdraw
  • otoken_os_collectAndRelease
  • otoken_os_sonicRestakeRewards
  • otoken_os_rebase
  • module_rebase_sonic (Add Admin Role to Vault  #2973 removed its insert row; this also deletes the existing row)

The insert is ON CONFLICT DO NOTHING, so this uses the same pattern as the Plume row. otoken_addWithdrawalQueueLiquidity_sonic is unchanged.

Deploy file vs Talos actions check

The deleted deploy script sonic/026_VaultUpgrade deployed OSVault (OSONIC_VAULT_IMPL). The only Talos action that still touches Sonic is otokenAddWithdrawalQueueLiquidity. It resolves OSonicVaultProxy from the kept descriptor and uses the curated abi/IVault.json, so nothing changes for it.

Testing

  • make build-contracts, build-tests-unit, build-tests-fork, build-tests-smoke and build-scripts all pass.
  • Unit tests: 2,233 passed (tests/unit/**).
  • pnpm test:tasks (75), pnpm test:scripts (66) and pnpm test:layouts (11) all pass. eslint is clean.
  • The ops command catalog snapshot was regenerated, and only the two Sonic tasks dropped out. The Talos catalog loads 35 actions.
  • Sonic anvil fork, OS withdrawal request then claimWithdrawal after the delay, with no keeper: the user receives 100k wS.
  • Sonic anvil fork, otokenAddWithdrawalQueueLiquidity --network sonic run with FORK=true IMPERSONATE=<talos relayer>: it adds the 100k shortfall, and claimable moves from 72.22M to 72.32M.
  • Fork and smoke tests compile, but I did not run them.

🤖 Generated with Claude Code

OS is being wound down: the staking strategy and SwapX AMO are empty and
the vault holds enough wS for every outstanding claim. Git history keeps
the code if it is ever needed again.

- delete the Sonic Solidity sources (vault, OS/wOS, staking strategy,
  validator delegator, SwapX AMO, harvester, zapper, SwapX/Metropolis
  pool boosters, proxies, interfaces, MockSFC) and the sonic deploy folder
- delete the six Sonic-only Talos actions, their helpers and curated ABIs,
  and drop their schedules (seed DELETEs the existing rows)
- keep otokenAddWithdrawalQueueLiquidity on Sonic: the dapp only shows a
  request as claimable once the queue's claimable amount covers it
- remove the Sonic ops CLI tasks, Sonic from permissionedRebase and the
  deploy framework, and update docs, CLAUDE.md and agent skills
- keep deployments/sonic and addresses.sonic as the address registry
@clement-ux clement-ux self-assigned this Oct 8, 2026
Resolve conflicts with #2973, which removed the permissionedRebase action
and its schedules: take master's deletion, drop the Sonic rows on top, and
regenerate the Talos inventory.

@naddison36 naddison36 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@clement-ux
clement-ux merged commit 4adbc2b into master Oct 9, 2026
12 checks passed
@clement-ux
clement-ux deleted the clement/remove-sonic branch October 9, 2026 11:42
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