Skip to content

refactor(contracts)!: drop buyback-and-burn and protocol-owned liquidity - #2970

Merged
alpergundogdu merged 1 commit into
mainfrom
claude/github-issue-2926-pr-97061a
Nov 24, 2026
Merged

alpergundogdu merged 1 commit into
mainfrom
claude/github-issue-2926-pr-97061a

Conversation

@alpergundogdu

Copy link
Copy Markdown
Contributor

Closes #2926.

Summary

FeeRouter splits each sweep into two legs: a rebate to an active operator and a treasury remainder. setSplit(rebateBps) takes the rebate only, still capped at 9900, so the treasury always keeps at least 1%. The served-bytes weight credit is priced on the treasury leg: min(servedBytes, treasuryLeg × 1 MiB / deliveryFloor), clamped by declared capacity.

Contracts

  • Deleted BuybackBurner, GuardedBuybackBurner, BuybackBurnerUniswapV3, IUniswapV3Pool, IUniswapV3SwapRouter, IUniswapV3PoolCreation, ActivateBuyback.s.sol, BuybackVenueLib.
  • FeeRouter / IFeeRouter: no buybackBps, buybackBurner, setBuybackBurner, SplitExceedsWhole, BuybackNeedsBurner. SplitUpdated(rebateBps).
  • BaseProtocolDeploy / DeployProtocol: the genesis buyback activation path (pool seed, keeper, burner handoff) is gone; the handoff covers exactly the six governed targets. Manifest drops BuybackBurner and feeRouterBuybackBps; the 421614 manifest drops the burner entry.
  • Token is ERC20 + ERC20Permit (the burn existed only for the burner); CapacityBond.token is IERC20.
  • Tests: deleted the burner, venue and genesis-activation suites (including the one fork suite, so the solidity fork test CI job and [profile.fork] / [rpc_endpoints] go too). Updated FeeRouter, DeployProtocol, DeployProtocolScript, E2EProtocol, CctpSweepReceiver, LoopbackCctp, PaymentPoolSweep, GovernanceLifecycle, Token, MockFeeRouter. Gas snapshot regenerated.

Rust

  • incentive: FeeRouter binding drops buybackBps; ZeroAmount selector doc updated.
  • cli known_chains test manifest drops the burner key.
  • e2e: payment_pool_probe_selector deleted (it covered only the undeployed burner); deployment_preflight_guard probes every manifest contract; chain::build_contracts (its only caller) removed.

Docs

  • ADR 018 deleted. adr/_history/ deleted entirely (git history keeps it); the check-no-history-links Make target and CI step go with it. 018 added to the do-not-reuse list in CLAUDE.md.
  • ADR 026: buyback, burn, POL, market making and the allocation table removed; the FeeRouter split is rebate + treasury. The free-registration / subscription rewrite stays with docs: ADRs for free registration, the subscription and the open DHT #2956.
  • ADR 016 (inventory, diagrams, tunable economics, deployment order renumbered, access control, call graph, fund flows, reentrancy), 003, 009, 036, appendix-l2-deployment, appendix-poc-production-seams, architecture.md, glossary, adr/README.md, README.md, contracts/README.md, CONTRIBUTING.md, the spec-discipline precedents.

Test plan

  • FOUNDRY_PROFILE=ci forge build --sizes --deny warnings, forge fmt --check, FOUNDRY_PROFILE=ci forge test (651 passed)
  • slither . --config-file slither.config.json (exit 0)
  • cargo clippy --workspace --all-targets --all-features
  • cargo nextest run -p decdn-cli -p decdn-incentive (1645 passed)
  • cargo nextest run -p decdn-e2e --features anvil-e2e --test deployment_preflight_guard
  • make -C adr check-book-list / check-bare-refs / check-md-anchors / check-anchor-targets / check-no-section-numbers
  • pre-commit on all changed files

🤖 Generated with Claude Code

FeeRouter splits each sweep into an operator rebate and a treasury
remainder. setSplit takes rebateBps only (capped at 9900), and the
served-bytes weight credit is priced on the treasury leg.

- Delete BuybackBurner, GuardedBuybackBurner, BuybackBurnerUniswapV3,
  the Uniswap interfaces, ActivateBuyback, BuybackVenueLib and the
  genesis buyback activation in the deploy script.
- Token is ERC20 + ERC20Permit; CapacityBond types its token as IERC20.
- Drop the fork-test CI job and foundry fork profile (its one suite was
  the buyback genesis test) and the payment_pool_probe_selector e2e,
  which existed only for the undeployed burner.
- Delete ADR 018 and adr/_history/; strip buyback, burn, POL, market
  making and the allocation table from ADR 026; update ADRs 003, 009,
  016, 036, the appendices, architecture, glossary and READMEs.

Closes #2926

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown

Gas snapshot

No gas changes vs base.

@github-code-quality

github-code-quality Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Code coverage overview

Languages: Rust, Solidity

Rust / code-coverage/cargo-llvm-cov

main 69c9f83 claude/github-issue-... 2cf137f +/-
78% 78% 0%
View coverage of the 4 most impacted files.
File main 69c9f83 claude/github-issue-... 2cf137f +/-
crates/node/src...nt/serve_leg.rs 95% 94% -1%
crates/node/src...s/client/mod.rs 88% 88% 0%
crates/e2e/src/chain.rs 12% 12% 0%
crates/protocol/src/framing.rs 92% 93% +1%

Solidity / code-coverage/forge

main 69c9f83 claude/github-issue-... 2cf137f +/-
90% 93% +3%
View coverage of the 3 most impacted files.
File main 69c9f83 claude/github-issue-... 2cf137f +/-
contracts/scrip...colDeploy.s.sol 95% 94% -1%
contracts/src/FeeRouter.sol 99% 99% 0%
contracts/scrip...yProtocol.s.sol 84% 92% +8%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.


Updated November 24, 2026 14:03 UTC

@alpergundogdu
alpergundogdu merged commit 9d4495f into main Nov 24, 2026
36 checks passed
@alpergundogdu
alpergundogdu deleted the claude/github-issue-2926-pr-97061a branch November 24, 2026 14:25
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.

Drop buyback-and-burn

1 participant