Repository navigation
chore: remove Sonic ARM automation and code - #363
Merged
Merged
Conversation
Origin Sonic is being wound down. The Sonic ARM (OriginARM proxy 0x2F872623d1E1Af5835b08b0E49aAd2d81d649D30, chain 146) still has ~723 S of unreserved liquidity and a ~12,335 S withdrawal queue that LPs can claim without any cron, so its automation is no longer needed. - Delete the Sonic Talos actions (allocate, auto request/claim withdraw, collect fees/rewards, OS/Silo price setter) and the helpers only they used (sonicHarvest, osSiloPrice, osStaking, silo, fly). - Delete SonicHarvester and SiloMarket (Sonic-only, not deployed on mainnet) with their ABIs, script/deploy/sonic, and test/fork/Harvester. - Remove the sonic hardhat network, SONIC_URL plumbing, the deploy-sonic and NETWORK=sonic Makefile targets, and the Sonic library in Addresses.sol. - collectRewards no longer defaults to Origin and requires --arm. - Remove the six Sonic rows from migrations/seed_schedules.sql and the Sonic section of docs/ACTIONS.md. The six live Talos schedules must be disabled in the database separately; the seed file only inserts rows (ON CONFLICT DO NOTHING). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Evidence (verified on-chain 2026-10-12, chain 146)
0x2F872623d1E1Af5835b08b0E49aAd2d81d649D30: totalAssets ≈ 723.6 S; OS balance ≈ 0.002; Silo Varlamore market (0x248Dbbc31F2D7675775DB4A9308a98444DaBaECf) shares ≈ 0; vaultWithdrawalAmount = 0.migrations/seed_schedules.sql, former lines 73–78):sonic_auto_request_withdraw,sonic_auto_claim_withdraw,sonic_collect_fees,sonic_allocate,os_silo_set_prices,sonic_collect_rewards.Removed / Kept on purpose
Removed
allocateSonic,autoRequestWithdrawSonic,autoClaimWithdrawSonic,collectFeesSonic,collectRewardsSonic,setOSSiloPriceAction.sonicHarvest.js,osSiloPrice.js,osStaking.js,silo.js,fly.js. TasksharvestRewards,setHarvester,setOSSiloPrice,flyTradeQuote,flyTradeTx.collectRewardsloses its Origin/Sonic branch and now requires--arm(Lido or EtherFi).SonicHarvester.solandmarkets/SiloMarket.sol(not deployed on mainnet) with their ABIs; theSoniclibrary inAddresses.sol.script/deploy/sonic/**,make deploy-sonic,NETWORK=sonic, the chain-146 branch inDeployManager.test/fork/Harvester/**; Sonic/OS/WOS/Silo fields intest/Base.sol.sonicnetwork;SONIC_URLin.env.example,docker-compose.yml,dockerfile-actions,foundry.tomland twomain.ymlenv lines;FORK_BLOCK_NUMBER_SONIC; the Fly key in.env.exampleand the twoFLY_API_KEYlines inmain.yml(onlyfly.jsused it).seed_schedules.sql; the "Origin ARM — Sonic" section ofdocs/ACTIONS.md;docs/plantuml/sonicContracts.*; Sonic deploy and Tenderly steps inREADME.md,CLAUDE.md,.claude/CLAUDE.mdandscript/deploydocs.Kept
build/deployments-146.json(historical registry),OriginARM.sol,ZapperARM.solandPendleOriginARMSY.sol(all used on mainnet).runner.tsanddump-actions-catalog.cjsare generic and needed no change.OriginAssetAdapterandWrappedOriginAssetAdapter: not Sonic-specific, referenced only bytest/Base.sol. Candidates for a later cleanup.src/abis/OriginARMV1.json: its only consumer wasallocateSonic, so it is now orphaned. Left in place because its prettier failure is pre-existing.addresses.sonic.{WS,WOS,OSonicProxy}, still read byutils/arm.js.liquidity.jschain-146 branches, theSONIC_ORIGIN_WS_ARMexclusion in1Inch.js, and theSoniclookup inaddressParser.js. The last one now fails for chain 146 with a clear "library not found" error.Before merging
seed_schedules.sqlonly inserts rows (ON CONFLICT DO NOTHING), so it does not disable the live ones. Otherwise those crons will fail once an image without these actions ships.0xe0a83068c0ddccfcbf2e5fff977321b0a485440f) is the v1 ARM from before New ARM features before Ethena audit #208:traderate0/traderate1/crossPrice, nobaseAssetConfigs, nopause(). SosetPrices(uint256 buyT1, uint256 sellT1)is the call to use, not the multi-asset one in today'sAbstractARM.sol. On-chain values read 2026-10-12: buy pricetraderate1= 0.99765, sell price = 1.0,crossPrice= 0.9999._requireLiquidityAvailable, which checksamount + (withdrawsQueued - withdrawsClaimed) <= wS balance. LPs can still claim with no cron running.os_silo_set_pricesstops. If OS trades below 0.99765, anyone can sell OS to the ARM at that price and take the unreserved wS; v1 has no buy-liquidity cap.0x739212d5bAfE6AAC8Be49a60B7d003bD41DBf38b(or the owner) callssetPrices(buyT1, sellT1)with a very lowbuyT1(it must be< crossPrice, e.g.0.5e36) andsellT1 = 1e36(>= crossPrice). OS-to-wS buys then become uneconomic, and claims are unaffected.Test plan
forge build: pass.forge fmt --check: pass.forge test --summary --mp 'test/unit/**': pass (36 suites, 0 failed).pnpm hardhat --help: pass. Removed tasks are absent.dump-actions-catalog.cjsproduces 140 tasks.pnpm lint: pass.pnpm typecheck: same single pre-existing error (TS2688,@types/node).pnpm prettier:check: only the pre-existingsrc/abis/OriginARMV1.json.test/js/*.test.js(9 files): pass withNODE_PATHset. Without it,debugdoes not resolve under pnpm (pre-existing;logger.jsrequires a package thatpackage.jsondoes not declare).migrations/seed_schedules.sqlloaded into SQLite: 40 rows before, 34 after, no Sonic rows left.Restore path:
git revert a851bf5.🤖 Generated with Claude Code