Repository navigation
refactor(contracts)!: drop buyback-and-burn and protocol-owned liquidity - #2970
Merged
Merged
Conversation
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]>
Gas snapshotNo gas changes vs base. |
Code coverage overviewLanguages: Rust, Solidity Rust / code-coverage/cargo-llvm-cov
View coverage of the 4 most impacted files.
Solidity / code-coverage/forge
View coverage of the 3 most impacted files.
ℹ️ Calculations represent line coverage. Results may change as calculations are updated. Updated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2926.
Summary
FeeRoutersplits 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
BuybackBurner,GuardedBuybackBurner,BuybackBurnerUniswapV3,IUniswapV3Pool,IUniswapV3SwapRouter,IUniswapV3PoolCreation,ActivateBuyback.s.sol,BuybackVenueLib.FeeRouter/IFeeRouter: nobuybackBps,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 dropsBuybackBurnerandfeeRouterBuybackBps; the421614manifest drops the burner entry.TokenisERC20+ERC20Permit(the burn existed only for the burner);CapacityBond.tokenisIERC20.solidity fork testCI job and[profile.fork]/[rpc_endpoints]go too). UpdatedFeeRouter,DeployProtocol,DeployProtocolScript,E2EProtocol,CctpSweepReceiver,LoopbackCctp,PaymentPoolSweep,GovernanceLifecycle,Token,MockFeeRouter. Gas snapshot regenerated.Rust
incentive:FeeRouterbinding dropsbuybackBps;ZeroAmountselector doc updated.cliknown_chainstest manifest drops the burner key.e2e:payment_pool_probe_selectordeleted (it covered only the undeployed burner);deployment_preflight_guardprobes every manifest contract;chain::build_contracts(its only caller) removed.Docs
adr/_history/deleted entirely (git history keeps it); thecheck-no-history-linksMake target and CI step go with it. 018 added to the do-not-reuse list inCLAUDE.md.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-featurescargo nextest run -p decdn-cli -p decdn-incentive(1645 passed)cargo nextest run -p decdn-e2e --features anvil-e2e --test deployment_preflight_guardmake -C adrcheck-book-list / check-bare-refs / check-md-anchors / check-anchor-targets / check-no-section-numbers🤖 Generated with Claude Code