Skip to content

Lock in additive contract surfaces in core ADRs (016, 026) #353

Closed

Description

@alpergundogdu

Why

The launch-time contract set must be forward-compatible with the additive contract deployments that come later — ADR 031 (BME prepay), ADR 032 (bandwidth futures + Enterprise SLA), and any other additions to the design that build on top of the core surface.

"Additive contract surface" means: a new contract can deploy at any time, integrate with the existing core contracts, and be granted whatever roles it needs by governance — without changing the existing contracts, migrating state, or redeploying.

Three properties have to hold at launch for this to work cleanly. They are mostly already true by current design, but should be made explicit in the canonical ADRs so they don't drift.

Properties to lock in

1. TOKEN supports burn

Required by ADR 031: a PrepayBurner contract takes TOKEN, burns it, and credits the client an internal USDC balance.

Where to lock in: ADR 026 §1 — the supply-and-distribution section already specifies fixed 1B supply; add an explicit "TOKEN MUST be ERC-20 burnable (ERC20Burnable); any contract may burn TOKEN it holds via burn / burnFrom. Burns reduce totalSupply and emit Transfer(from, address(0), amount)."

2. SafetyReserve.payout interface is stable for evidence-hash + recipient + amount

Required by ADR 032: Enterprise SLA contracts trigger SafetyReserve.payout on proven breach. The interface must accept any well-formed evidence-bundle hash + recipient + amount, gated only by governance/multisig authorization (the four gates already in ADR 026 §5).

Where to lock in: ADR 026 §5 — add an explicit "the payout(bundleHash, recipient, amount) interface is contract-stable: future SLA contracts, insurance products, and incident-response tooling integrate via this signature without contract changes. Evidence formats off-chain and are referenced by hash on-chain; the contract enforces the four payout gates uniformly."

3. Channel mechanism is permissionless and role-extensible

Required by both ADR 031 and ADR 032. Specifically:

  • StablePaymentChannel.openChannel / PaymentChannel.openChannel accept channel creation from any caller (not just clients) — so prepay-funded balances and bandwidth-future redemptions can open channels on behalf of end users.
  • AccessControl roles can be granted by governance to new contracts (Bandwidth Futures, SLA contracts) without changing the channel contract itself.

Where to lock in: ADR 016 § 5 Access Control Matrix — add a paragraph: "Additive contract surface. New top-level contracts (e.g., PrepayBurner, BandwidthFutures, Enterprise SLAContract templates) integrate with the launch-time contracts via standard AccessControl role grants. No launch-time contract is locked to a specific set of integrators; governance can grant new roles or revoke existing ones via the standard 7-day vote + 48-hour timelock path. The launch-time interface surface (function signatures + events) is treated as stable for cross-contract integration."

Acceptance

  • ADR 026 §1 explicitly states TOKEN ERC-20Burnable requirement.
  • ADR 026 §5 explicitly states SafetyReserve.payout interface stability and integration model.
  • ADR 016 §5 (Access Control Matrix) has an "Additive contract surface" paragraph.
  • No launch-time contract design is changed — these are properties already in scope; this issue makes them explicit so they don't drift.

Out of scope

  • Designing the new contracts themselves (PrepayBurner, BandwidthFutures, SLAContract) — those are documented in 031 / 032.
  • Implementation work — this is an ADR-level lock-in.

Metadata

Metadata

Assignees

Labels

kind:docs

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions