Skip to content

Testnet deployment v0.1.0 (Arbitrum Sepolia): deploy → onboard origin → verify #1083

Closed

Description

@alpergundogdu

Deploy the protocol to Arbitrum Sepolia, cut v0.1.0, and bring a first origin online. Simple plan below.

Buyback is in scope for this deploy (not dormant): activated at genesis via the deploy-time flag tracked in #1084 (in progress). Targeted before deployment for the demo.

Environment

Network Arbitrum Sepolia
Chain ID 421614
Public RPC https://sepolia-rollup.arbitrum.io/rpc
Gas token Arbitrum Sepolia ETH (faucet)

Resolved config values

Input Value
USDC (immutable token set) 0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d
currentTermsHash 0x7da33feb48d0b64ca41a4478ea67aeb13832b56b7598cca803bc2b9f5ec37f4b
— terms preimage TERMS.md v1.0.0-draft, 3982 bytes (keccak256 of the raw file bytes; recompute if TERMS.md changes)
Emergency-multisig single controlled EOA (testnet)
Treasury single controlled EOA (testnet)
Buyback venue Uniswap V3 (Balancer V3 not deployed on Arb Sepolia)
Buyback keeper controlled EOA/bot (required — see #1084)
Uniswap pool fee tier 10000 (1%) — matches the ADR 018 80/20 1% venue intent

currentTermsHash reproduced with: cast keccak 0x$(xxd -p TERMS.md | tr -d '\n').

External dependency addresses (verified)

Hard deploy input — required: USDC 0x75faf114eafb1BDbe2F0316DF893fd58CE46AA4d (matches contracts/script/DeployProtocol.s.sol:39).

Uniswap V3 (buyback venue + #991 auto-swap):

Contract Arbitrum Sepolia
UniswapV3Factory 0x248AB79Bbb9bC29bB72f7Cd42F17e054Fc40188e
NonfungiblePositionManager 0x6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65
SwapRouter02 0x101F443B4d1b059569D643917553c771E1b9663E
QuoterV2 0x2779a0CC1c3e0E44D2542EC3e79e3864Ae93Ef0B
UniversalRouter 0x4A7b5Da61326A6379179b40d00F57E5bbDC962c2
Permit2 0x000000000022D473030F116dDEE9F6B43aC78BA3
WETH9 0x980B62Da83eFf3D4576C647993b0c1D7faf17c73

Only QuoterV2 / SwapRouter02 exist on Arb Sepolia — the legacy V1 Quoter/SwapRouter are not deployed, so pool/swap code must target the V2/02 variants.

Plan

0. Pre-deploy config (added)

  • Fund the deployer EOA with Arb Sepolia ETH (gas) and USDC (buyback-pool seed leg — external token, bridge/faucet it in). TOKEN is not pre-funded: DeployProtocol deploys Token itself (BaseProtocolDeploy.s.sol new Token(initialTokenHolder)) and mints the full fixed 1B supply to INITIAL_TOKEN_HOLDER. Set INITIAL_TOKEN_HOLDER = deployer so the minted TOKEN lands in the deployer before the in-script pool seed pulls both legs from it. USDC is the only external token — it is never deployed by the script.
  • Set DeployConfig: deployer, emergency-multisig = controlled EOA, treasury = controlled EOA, buyback keeper = controlled EOA/bot, BUYBACK_VENUE=uniswap.
  • Set currentTermsHash = 0x7da33feb48d0b64ca41a4478ea67aeb13832b56b7598cca803bc2b9f5ec37f4b — wrong value makes registerNode reject every operator, including our own origin node.

1. Deploy contracts + activate buyback (from list, expanded — #1084 landed)

  • Run DeployProtocol.s.sol against Arb Sepolia with buyback activation on. Activation is env-driven — there is no --activate-buyback forge flag. Set: ACTIVATE_BUYBACK=true, BUYBACK_VENUE=uniswap, BUYBACK_KEEPER=<keeper EOA>, UNISWAP_SWAP_ROUTER=0x101F443B4d1b059569D643917553c771E1b9663E (SwapRouter02), UNISWAP_POSITION_MANAGER=0x6b2937Bde17889EDCf8fbD8dE31C3C2a70Bc4d65 (NonfungiblePositionManager), UNISWAP_POOL_FEE=10000, and the pool-seed sizing BUYBACK_USDC_SEED / BUYBACK_TARGET_PRICE (defaults 100e6 USDC @ 10000 = $0.01/TOKEN; the paired TOKEN seed is derived). The deployer must hold at least BUYBACK_USDC_SEED USDC. Deploys the full ADR-016 surface (including Token), wires cross-contract roles (setContentBlacklist, role grants), sets the terms hash, and — before the governance handoff — creates + seeds the Uniswap TOKEN/USDC pool, deploys BuybackBurnerUniswapV3, wires FeeRouter.setSharesAndDestinations([6000,3000,1000], {burner, treasury}), and sets the keeper. Deployer ends with no privileged role.
  • Assert genesis FeeRouter split is [6000,3000,1000] and the burner is wired (not the dormant [9000,0,1000]).

2. Update deployments/ (from list)

  • Commit the deploy manifest to contracts/deployments/ (the script refuses to overwrite an existing manifest). No source verification at this stage.

3. Fund test tokens (added)

  • TOKEN → operators only. Distribute TOKEN to the known operator address(es) sized ≈ bond + small margin (direct transfer, or contracts/script/TestnetFaucet.s.sol with a hard-capped FUNDING_AMOUNT). Do not stand up an open-claim TOKEN faucet: TestnetFaucet.claim() is ungated (per-address cooldown only, Sybil-unlimited on a public testnet), and free TOKEN is the one drain vector for the buyback pool's USDC side (anyone holding TOKEN can swap TOKEN→USDC and empty the pool, which zeroes the keeper's per-epoch cap denominator usdc.balanceOf(pool)). Bonded TOKEN is locked in CapacityBond, so a bond-sized grant leaves nothing meaningful to dump.
  • USDC → clients via Circle's faucet (10 USDC/hr, rate-limited). No self-run USDC faucet — faucet USDC can only be swapped USDC→TOKEN, which adds USDC to the pool, so it can't drain it.

4. Cut release v0.1.0 (from list)

  • Tag/release v0.1.0. Binaries carry the deployed chain-id + contract addresses.

5. Onboard origin node on the unmetered machine (from list, expanded)

Target: thiras's unmetered machine.

  • decdn setup → bond → registerNode (accept terms, declare region); start the daemon.
  • In the node config, set blockchain.content_blacklist_address and blockchain.slash_judge_address (+ their *_from_block to the deploy block) from the manifest — this arms the blacklist auto-eviction and slash-detection loops (see resolved gaps below). Left unset, both loops stay dormant and you fall back to manual eviction with no slash visibility.
  • decdn publish namespace create → claim <hash> → assign the origin operator.

6. End-to-end verify (added)

  • Client fetch of the published hash through a real payment channel → bytes verify against the BLAKE3 address; confirm the origin serves and a second staked node can re-serve from cache.
  • Confirm settlement routes the buyback share to the burner and the keeper can execute a buyback (TWAP warmup ~1800s may delay the first swap).

Resolved since this plan was written

Remaining accepted gaps for this testnet

  • No source verification of deployed contracts at this stage (step 2).
  • Single controlled EOA stands in for the emergency-multisig and treasury (testnet only).

Depends on

Activity

  1. alpergundogdu commented on Jul 9, 2026

    @alpergundogdu
    ContributorAuthor

    Buyback activation landed. #1086 merged (squash 15ec8a3), closing #1084 — the deploy-time --activate-buyback flag with venue-select (Balancer/Uniswap) is now on main. Step 1 of this plan is unblocked: deploying with the flag + BUYBACK_VENUE=uniswap seeds the Uniswap TOKEN/USDC pool and flips FeeRouter to [6000,3000,1000] in-script, before the governance handoff.

    Review note: the merge included a fix for a custody bug caught in review — the Balancer seed was minting the pool BPT (protocol-owned liquidity) to the deployer instead of the Timelock (the Uniswap demo path was already correct). The demo-critical Uniswap genesis path was validated against live Arbitrum Sepolia.

    Deferred (non-blocking), tracked in #1090: wire the ARBITRUM_SEPOLIA_RPC_URL CI secret so the Uniswap fork test runs in CI, and de-duplicate the activation logic shared between ActivateBuyback.s.sol and the deploy scripts.

  2. added this to the v0.1 milestone on Jul 28, 2026
  3. thiras commented on Aug 1, 2026

    @thiras
    Contributor

    Audit note (2026-08-01, HEAD b2a9651): status check against the tracker.

  4. moved this from Backlog to Ready in deCDNon Aug 20, 2026
  5. alpergundogdu commented on Aug 20, 2026

    @alpergundogdu
    ContributorAuthor

    balancer/balancer-deployments@b55dc2b

    Balancer is deployed, so our next deploy should use balancer

  6. moved this from Ready to Backlog in deCDNon Aug 20, 2026
  7. moved this from Backlog to Needs Decision in deCDNon Aug 20, 2026
  8. moved this from Needs Decision to Done in deCDNon Sep 7, 2026
  9. unpinned this issue on Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions