Skip to content

docs(adr): sync BuybackBurner docs with the venue-neutral three-layer refactor #1579

Closed

Description

@yigitdot

Spotted while reviewing #1570. That PR corrected the Balancer V3 approval target across ADRs 003/016/018 and realigned the ADR 016 tables, but three related pieces of drift are outside its scope. All three are fallout from the venue-neutral burner refactor (#686): the docs still describe BuybackBurner as one flat contract.

Scope: parts 1 and 2 are documentation only. Part 3 is a decision that may or may not produce a Solidity interface file — see below.

1. ADR 003 § BuybackBurner presents a flat "canonical interface" for a three-layer contract

adr/003-payments.md:586-598 ends with "This is the canonical BuybackBurner interface." The table lists members that live on three different contracts, and one that is venue-specific:

Member Actually declared on
executeBuyback, rescueUSDC BuybackBurner (abstract base) — BuybackBurner.sol:104,166
poke, setKeeper, setSlippageTolerance, setMinBuybackAmount, setMaxBuybackAmount, setEpochLiquidityCapFraction, getAccumulatedFees, keeper GuardedBuybackBurner (abstract) — GuardedBuybackBurner.sol:232,244,253,260,267,281,296,90
setSwapRouter, setPool Both concrete subclasses — BuybackBurnerBalancerV3.sol:214,229 / BuybackBurnerUniswapV3.sol:204,218
setVault BuybackBurnerBalancerV3 only — BuybackBurnerBalancerV3.sol:249. BuybackBurnerUniswapV3 has no setVault at all.

The setVault row is the sharpest problem: a table headed "canonical interface" lists a method that exists on only one of the two shipped venue bindings, so it is not canonical in any venue-neutral sense.

This became newly inconsistent with #1570, which added to adr/018-liquidity-strategy.md:10 the assertion that "the base BuybackBurner is venue-neutral and stores only USDC and TOKEN; the subclass owns the whole venue set."

Fix: add a "Declared on" column, or split the table by layer, and mark setVault Balancer-only.

2. The approvals footgun is absent from the deployment runbook, which ADR 018 says is mandatory

adr/018-liquidity-strategy.md:208 states:

V3's approvals footgun must also be documented in deployment runbooks.

grep -in "approv|allowance|footgun|permit2" adr/appendix-l2-deployment.md returns nothing. The appendix cites the Balancer V3 Vault address at adr/appendix-l2-deployment.md:150 purely as a chain-constants table entry, with no approval framing — which is correct as far as it goes, but the runbook is the one place ADR 018 says the footgun must land, and it is not there.

Note this is now more than a gap: post-#1570 the correct mechanism is a scoped per-swap Permit2 approval, and an operator following only the appendix would have no signal that Permit2 is involved at all.

Fix: add a short approvals subsection to adr/appendix-l2-deployment.md pointing at ADR 018 § Buyback execution via Balancer V3, which #1570 established as authoritative. Include the canonical Permit2 address 0x000000000022D473030F116dDEE9F6B43aC78BA3 in the constants table beside the Vault entry.

3. IBuybackBurner is referenced in two places but does not exist

contracts/src/interfaces/ has no IBuybackBurner.sol, yet:

  • adr/018-liquidity-strategy.md:208 — "One new interface method (setPool(address)) must be added to IBuybackBurner"
  • contracts/src/GuardedBuybackBurner.sol:295 — comment referencing `IBuybackBurner.getAccumulatedFees`, ADR 003

Every other cross-contract dependency in the tree is behind a narrow interface (ICapacityBondEjector, IFeeRouterSettlement, and so on), and FeeRouter holds buybackBurner as a plain address.

Decide and make consistent, either way:

  • Docs-only outcome: if the interface should not exist, drop the ADR 018:208 sentence and fix the stale source comment. Given FeeRouter never calls into the burner, this is the likelier answer.
  • Contract outcome: if it should exist, create it and have FeeRouter type its dependency against it. Note the constraint from part 1 — a venue-neutral IBuybackBurner cannot include setVault, and arguably not setSwapRouter/setPool either, since those are subclass surface.

Verification

Parts 1 and 2:

make -C adr check-refs
pre-commit run --files adr/003-payments.md adr/018-liquidity-strategy.md adr/appendix-l2-deployment.md

Part 3, only if it lands a new interface file:

(cd contracts && forge fmt --check && FOUNDRY_PROFILE=ci forge build --sizes --deny warnings && forge test)

🤖 Generated with Claude Code

Activity

  1. added
    kind:docs
    design:adr
    design:consistency
    area:contracts
    prio:medium
    on Aug 2, 2026
  2. self-assigned this
    on Aug 3, 2026
  3. alpergundogdu commented on Aug 3, 2026

    @alpergundogdu
    Contributor

    Resolved by #1581 (merged, commit 373401e). The multi-issue "Closes" line only auto-closed the first number; closing manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:contractsdesign:adrdesign:consistencykind:docsprio:medium

Type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions