Skip to content

chore(deploy): config-driven price-oracle bring-up script + runbook + config block#188

Merged
drewstone merged 1 commit into
mainfrom
chore/oracle-bringup-script-and-runbook
Jun 20, 2026
Merged

chore(deploy): config-driven price-oracle bring-up script + runbook + config block#188
drewstone merged 1 commit into
mainfrom
chore/oracle-bringup-script-and-runbook

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Summary

Closes the ops/deploy gap behind the oracle audit fixes. The price oracle is real and consumed (Tangle payments/exposure + ServiceFeeDistributor), but FullDeploy only wires a pre-existing address — it never deploys or configures one, and base-mainnet.json left it unset. So the protocol launches on the raw-token-amount fallback (intentional at genesis: the exposure-weighted rail is dormant, incentives.weights.stakersBps = 0) with no scripted/runbooked path to turn USD normalization on. This adds that path. No src/ changes.

What's here

  • script/ConfigureOracle.s.sol — config-driven (reads the oracle block of FULL_DEPLOY_CONFIG, same convention as FullDeploy/DeployGovernance):
    • deploys a ChainlinkOracle or UniswapV3Oracle,
    • configures every feed (chainlink) / pool (uniswap) + maxAge + the L2 sequencer-uptime gate,
    • optionally wires Tangle + ServiceFeeDistributor via setPriceOracle (bootstrap window only — needs ADMIN_ROLE),
    • hands the oracle's Ownable ownership to the timelock/multisig as the final step,
    • production guard (bypass TANGLE_DEPLOY_LOCAL=1): requires owner set, maxAge set, ≥1 feed/pool, and the sequencer feed on Base/OP/Arbitrum,
    • writes a manifest; prints the governance setPriceOracle calls when wire=false.
  • deploy/RUNBOOK-launch.md §3c — oracle bring-up procedure: bootstrap-vs-governance wiring, required prod params, and the stakersBps flip to actually activate the rail.
  • deploy/config/base-mainnet.json — self-documenting oracle block: deploy=false at genesis, Base sequencer feed pre-filled, TODOs for feeds/owner.

Verification

Usage:

PRIVATE_KEY=<pk> FULL_DEPLOY_CONFIG=deploy/config/base-mainnet.json \
  forge script script/ConfigureOracle.s.sol:ConfigureOracle --rpc-url "$L2_RPC" --broadcast --slow

… config block

Closes the ops/deploy gap behind the oracle audit fixes: the price oracle is real
and consumed (Tangle payments/exposure + ServiceFeeDistributor), but FullDeploy
only WIRES a pre-existing address — it never deploys or configures one, and
base-mainnet.json left it unset, so the protocol launches on the raw-token-amount
fallback. That's intentional at genesis (exposure-weighted rail dormant,
stakersBps=0), but there was no scripted/runbooked path to turn USD normalization on.

- script/ConfigureOracle.s.sol: config-driven (reads the `oracle` block of
  FULL_DEPLOY_CONFIG, mirroring FullDeploy/DeployGovernance conventions). Deploys a
  ChainlinkOracle or UniswapV3Oracle, configures every feed/pool + maxAge + the L2
  sequencer-uptime gate, optionally wires Tangle + ServiceFeeDistributor
  (setPriceOracle, bootstrap window only), and hands the oracle's Ownable ownership
  to the timelock/multisig as the final step. Production guard (bypass with
  TANGLE_DEPLOY_LOCAL=1) requires owner set, maxAge set, >=1 feed/pool, and the
  sequencer feed on Base/OP/Arbitrum. Writes a manifest; prints the governance
  setPriceOracle calls when wire=false.
- deploy/RUNBOOK-launch.md §3c: oracle bring-up procedure + bootstrap-vs-governance
  wiring + the stakersBps flip.
- deploy/config/base-mainnet.json: self-documenting `oracle` block (deploy=false at
  genesis; Base sequencer feed pre-filled; TODOs for feeds/owner).

No src changes. Script compiles and dry-runs end-to-end (deploy + configure +
manifest); base-mainnet.json validated.

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Auto-approved PR — a833a702

Blanket team auto-approval is enabled for this reviewer service.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

tangletools · auto-approval · reason: blanket_auto_approve · 2026-06-20T05:15:23Z

@drewstone drewstone merged commit 2d0f24e into main Jun 20, 2026
1 check passed
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