Skip to content

contracts: sysio.bond, sysio.synd, sysio.andon — syndication underwriting, emergency stop, custody totals - #662

Open
valthon wants to merge 7 commits into
masterfrom
feature/syndication-underwriting
Open

valthon wants to merge 7 commits into
masterfrom
feature/syndication-underwriting

Conversation

@valthon

@valthon valthon commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Hold inbound syndicated liquidity and yield until envelope underwriting permits release. Add generic statement bonds, fee and rate-limit policy, independent emergency stops, and live custody solvency checks while OPP continues processing.

Design sources: WIRE-V1-SYNDICATION-UNDERWRITING-SPEC.md and WIRE-V1-UNDERWRITING-REQUIREMENTS.md in the platform workspace. Test citations below are retained local ledgers/reports under that workspace; recorded results refer to the revisions named in those reports, not a fresh run of this PR tip.

What changes

Emergency stop and relay support

  • 32d8d6fafe — Add sysio.andon panic authority, registered pullers, and freeze-epoch accounting.
  • 962bbab4b2 — Handle paused Ethereum yield reporting and frozen Solana state; supply the pending-payout PDA for deferred desyndications.

Underwriting and syndication

  • 1492958330 — Add sysio.bond requests, shared coverage, challenges, rulings, pull-only claims, and shadow custody yield.
  • 5bbb0c5e4d — Add sysio.synd held intake, ordered release, fees, budgets, parked balances and invalid-envelope burns; move imports and desyndication from sysio.liq; add live total_syndicated messages, shortfall stops, coupled artifacts and recovery guidance.

Included from earlier work

  • 5d61ca7033 — Bond operator collateral in shadow LIQ

How it was tested

  • Generic underwriting: 51 bond cases, with the full committed-flavor contract suite 966/966 at the Part A recorded tip; every recorded Part A artifact gate returned RC 0. Source: wire-sysio/.superpowers/sdd/syndication-underwriting-part-a/progress.md and wire-sysio/.superpowers/sdd/syndication-underwriting-part-a/task-5-report.md.
  • Syndication policy: 1035/1035 full contract cases at 00160f0c25; all ten recorded Part A/B artifact gates returned RC 0. Source: wire-sysio/.superpowers/sdd/syndication-underwriting-part-b/progress.md and wire-sysio/.superpowers/sdd/syndication-underwriting-part-b/task-B5-report.md.
  • Emergency stop: 1056/1056 full contract cases; Part C committed-artifact gates returned RC 0. Relay tests: Solana 100/100, Ethereum 67/67, and plugin_test 307/307. Sources: wire-sysio/.superpowers/sdd/syndication-underwriting-part-c/progress.md and wire-sysio/.superpowers/sdd/syndication-underwriting-part-c/task-C2b-report.md.
  • Live totals and same-envelope freeze: 1076/1076 contract cases and 245,110 assertions; 45 wasm/ABI files matched the committed-flavor build. The final strict artifact gate returned RC 0 for 8530380084, c85c05118b, and c32df20652. Sources: wire-sysio/.superpowers/sdd/syndication-underwriting-part-d/progress.md and wire-sysio/.superpowers/sdd/syndication-underwriting-part-d/task-D2-report.md.
  • Cross-repo live evidence: 13 launch-compatible flows SUCCESS in the BAR regression, including underwriting, challenge, rate limit, and emergency-stop recovery. Source: wire-sysio/.superpowers/sdd/syndication-underwriting-part-e/task-bar-report.md. These are historical validation results; no new contract suite or artifact gate was run for publication.

Landing order and dependencies

  1. Merge wire-sysio first, then publish wire-opp-solana-models, @wireio/opp-solidity-models, and @wireio/opp-typescript-models with the new total_syndicated field.
  2. Land wire-solana and wire-ethereum after those packages publish. Their standalone CI cannot compile against the older models; Ethereum also requires @wireio/opp-solidity-models ^1.0.51. Solana targets codex/operation-disabled; Ethereum targets next.
  3. Land wire-libraries-ts after wire-sysio so its generated contract types match the deployed ABIs.
  4. Land wire-tools-ts after wire-libraries-ts and after cluster-tool + flow-liq-syndication: drive the simple_swap liq attestations through the real liqsol_core paths wire-tools-ts#98 and cluster-tool + flow-liq-yield: bootstrap sysio.swap/sysio.liq and drive the LIQ reward flow end to end wire-tools-ts#104 (Added CLion run configuration generation and associated docs update. Refactored CMake and source structure to improve modularity and reduce redundancy #104 is stacked on Avoid unused warning #98).
  5. Land wire-platform-manifest last, aligning documentation and rules with the runtime changes.

Ethereum includes the SyndicationPool commit from draft https://github.com/Wire-Network/wire-ethereum/pull/207 unchanged as 8ed70fb8; subsequent changes extend and harden it.

Related PRs

🤖 Generated with Claude Code

https://claude.ai/code/session_01WvJpbenHM8A16MLiMteYtj

Introduce sysio.andon as the shared emergency-stop authority. Governance
configures the panic account and registered pullers; only governance or
the panic account may clear a stop. Record freeze epochs so downstream
rate limits can exclude paused time.

Include the contract artifacts, epoch reader, isolated epoch test stub,
and tests for authority, idempotency, bounded input and epoch
accounting. The reader API treats an undeployed or never-pulled cord as
clear.

Change-Id: I25b86cbf76808933524d7bc2916523100ec6bc30
Allow operators to bond depot-native shadow LIQ alongside WIRE and route
withdrawals through each token's custody contract. Price shadow buckets
against their outpost reserve pair when quoting challenge bonds.

Attribute custodial yield to operator positions without crediting more
WIRE than custody has received. Share token resolution and shadow-yield
accounting with future custodians, and document the rounding and shared
row-layout constraints.

Include collateral, pricing, yield, reentrancy and termination coverage,
plus producer and custody integration guidance.

Change-Id: Idb3a3abbb3d5163e0eb49333cf453e33c69a9240
Provide statement-keyed underwriting requests backed by WIRE or shadow
LIQ. Accept coverage in token-sized increments, start a challenge window
when fully bonded, and let issuers place holds before governance rules.

Record awards without pushing payments during state transitions. Parties
claim their own bonds, bounties and custodial yield; a failed recipient
cannot block another claimant or a ruling. Freeze payouts through Andon
while preserving inbound bonds and challenges.

Include lifecycle, authorization, rounding, custody, retention and
freeze tests together with the integration guide and deployable
artifacts.

Change-Id: I1fd8f38630d0216297c173cc3bd2f6f007d87058
Treat the Ethereum pool's EnforcedPause refusal as an expected crank
outcome. On Solana, skip yield reporting for frozen or unmigrated global
state and provide the writable pending-payout PDA for each nonzero
desyndication request, even when pool account discovery is unavailable.

Pin refusal shapes, account derivation, legacy layouts and dispatch
account budgets in plugin tests. Document deferred payouts as an
operator-controlled recovery step.

Change-Id: Ifb24eb6d735f1ba996f584267fc6b6237a256a95
Hold inbound syndication and yield in sysio.synd until their envelope's
underwriting permits release. Integrate sysio.bond challenges and
rulings, fee-funded bounties, release budgets, parked custody and
invalid-envelope burns. Move imports, link sweeps and desyndication out
of sysio.liq.

Carry live custody totals in OPP messages and record shortfalls against
outstanding shadow. Pull Andon when authorized, keep envelope processing
running during a freeze, and defer releases without refilling frozen
budgets. Gate LIQ and swap outflows through the same emergency stop.

Deploy msgch, synd, liq, bond and authex as a compatibility-coupled set.
Include artifacts, migration-aware fixtures, integration and boundary
tests, upgrade requirements, launch reconciliation and the emergency
operator playbook. The one-sided custody check is not a complete audit.

Change-Id: Ie2d63363c595dd5a3b553136778ab1658621b458
Add a generic external custody simulator, generated cross-contract sequences, and native flow coverage mapping with drift checks. Exercise generic dual-asset collateral, authenticated linking, yield conversion, reward funding, and production message dispatch.

Repair dispute deployment and multisig chunking fixture assumptions exposed by the full gate. Validation: all 1,087 native contract cases and 248,033 assertions pass; all-target build and coverage-map checks pass.

Change-Id: If3a366f23f44ba6c72188995a08cf67d90d4a8dd
Compare governance resolution and funded provider settlement across generic external chains, linked and parked recipients, freeze recovery, release budgets, fees, yield, and outbound payout. Preserve explicit checks for authorization, collateral return, and payout replay protection.

Change-Id: I55e6b1f7054a09f9a2bfe54ea8f27ee6494745d6

This branch has not been deployed

No deployments
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