Skip to content

quickswap: split revenue 30% foundation / 70% holders from Nov 5, 2025#8042

Merged
treeoflife2 merged 1 commit into
masterfrom
quickswap-rev-split-nov2025
Jul 16, 2026
Merged

quickswap: split revenue 30% foundation / 70% holders from Nov 5, 2025#8042
treeoflife2 merged 1 commit into
masterfrom
quickswap-rev-split-nov2025

Conversation

@treeoflife2

Copy link
Copy Markdown
Member

What

QuickSwap governance vote (snapshot quickvote.eth) changed the protocol revenue split to 30% foundation / 70% holders across all QuickSwap children.

Vote executed ~9PM Nov 4, 2025, so the first full day under the new split is Nov 5, 2025 (1762300800). The total protocol take is unchanged; only the foundation/holders split shifts.

Changes

  • quickswap-v2.ts: 20/80 to 30/70 of the 0.05% protocol cut
  • quickswap-v3.ts: added a Nov 5 branch, 30/70 of the 13.23% revenue (IMX/MANTA forks already 30/70)
  • quickswap-v4.ts: getRatios swaps to 30/70 at the cutoff

Perps and liquidityHub adapters untouched (no foundation/holders split).

A refill is needed to apply the corrected historical split.

Governance vote (snapshot quickvote.eth) executed ~9PM Nov 4, 2025 changed
the protocol revenue split to 30% foundation / 70% holders across all
QuickSwap children. Date-gated in V2, V3 and V4 (first full day Nov 5);
total protocol take unchanged, only the foundation/holders split shifts.
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Summary by CodeRabbit

  • New Features

    • QuickSwap revenue reporting now adjusts automatically based on the relevant governance date, with updated fee splits for later periods.
    • Improved support for log-based data fetching on QuickSwap v2, making adapter behavior more aligned with on-chain activity.
  • Bug Fixes

    • Corrected revenue attribution for QuickSwap v3 and v4 so protocol, foundation, and holders shares reflect the latest split rules.
    • Updated methodology text to match the current fee breakdowns and historical periods.

Walkthrough

QuickSwap v2, v3, and v4 dex adapters are updated to apply a time-based fee/revenue split keyed on a November 5, 2025 timestamp cutoff (post governance vote), replacing static ratio constants with computed logic, and updating adapter methodology description strings accordingly.

Changes

QuickSwap fee split update

Layer / File(s) Summary
QuickSwap v2 fee config and adapter rewiring
dexs/quickswap-v2.ts
Static feeConfig and uniV2Exports-based construction replaced with a getFeeConfig(timestamp) function, mkFetch(factory) helper using getUniV2LogAdapter, and a direct SimpleAdapter object (version: 1) with updated methodology text for the 30/70 post-Nov 4, 2025 foundation/community split.
QuickSwap v3 fee percentage branching
dexs/quickswap-v3.ts
getV3FeePercentages adds a nov5th2025 cutoff, returning distinct protocol/holders/revenue ratios before and after the cutoff (30/70 split of the 0.1323 base post-cutoff), with methodology strings updated to match.
QuickSwap v4 dynamic ratio computation
dexs/quickswap-v4.ts
Static PROTOCOL_RATIO/HOLDERS_RATIO constants replaced by a getRatios(timestamp) helper used in fetch to compute dailyProtocolRevenue/dailyHoldersRevenue, with methodology text updated accordingly.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related PRs

Suggested labels: dexs, methodology, bug-fix

🚥 Pre-merge checks | ✅ 10 | ❌ 5

❌ Failed checks (5 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title is relevant, but it does not follow the required '[type] protocol-name - description' format. Use the repository format, e.g. '[update] quickswap - split revenue 30% foundation / 70% holders from Nov 5, 2025'.
Breakdown Methodology Check ⚠️ Warning QuickSwap adapters export only methodology; no breakdownMethodology is present, so helper labels aren’t mapped in-adapter. Add/export breakdownMethodology for each fee label emitted by the uniswap helper (or remove the check path) so labels are covered.
Pullhourly Required For Version 2 ⚠️ Warning dexs/quickswap-v3.ts is version 2 but only has a commented pullHourly line, so it omits the required explicit key. Set pullHourly: true on the v2 QuickSwap adapter (or false with an explanatory comment if hourly pulls are impossible).
Adapter Shape ⚠️ Warning quickswap-v3 still splits per-chain factory and start into separate maps instead of one chainConfig object, violating the preferred adapter shape. Merge each chain’s factory and start into one chainConfig map and have fetch read chainConfig[options.chain], with adapter: chainConfig.
Methodology Keys ⚠️ Warning dexs/quickswap-v2.ts and v3.ts still use UserFees in methodology, but repo guidelines allow only display names like Fees, Revenue, SupplySideRevenue, etc. Rename UserFees to Fees (or another allowed display name) in the methodology objects for quickswap-v2 and quickswap-v3; keep v4’s keys as-is.
✅ Passed checks (10 passed)
Check name Status Explanation
Description check ✅ Passed The PR description explains the change, rationale, effective date, and affected adapters, which is sufficient for a non-new-listing update.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Income Statement Compliance ✅ Passed PASS: v2/v3 use shared helpers and v4 sets dailyFees=fees, dailyRevenue=feesshare, dailySupplySideRevenue=fees(1-share), so revenue equals fees minus supply-side.
Version 2 Required ✅ Passed quickswap-v2 is an existing adapter update, quickswap-v3 exports version: 2, and quickswap-v4 relies on a daily-aggregates API, so the exception applies.
Dune Adapters Are Version 1 ✅ Passed quickswap-v2 exports version:1; v3/v4 use log/API fetches only, with no Dune calls or TIME_RANGE/date filters found.
Income Statement Balance ✅ Passed All three adapters still split fees correctly: dailyFees equals revenue+LP cut, and protocol+holders ratios sum to the revenue share in each period.
Fetchoptions Usage ✅ Passed All changed fetches take a single FetchOptions arg, return no timestamp field, and the version-2 adapter here isn’t hourly (pullHourly absent/commented), so startOfDay use is acceptable.
Efficiency And Error Handling ✅ Passed No listed anti-patterns appear in the touched code; the new cutoff/ratio constants are commented, and the helpers use targets/eventAbi plus multiCall.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch quickswap-rev-split-nov2025

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

The quickswap-v2.ts adapter exports:

> adapters@1.0.0 test
> ts-node --transpile-only cli/testAdapter.ts dexs quickswap-v2.ts

🦙 Running QUICKSWAP-V2.TS adapter 🦙
---------------------------------------------------
Start Date:	Wed, 08 Jul 2026 00:00:00 GMT
End Date:	Thu, 09 Jul 2026 00:00:00 GMT
---------------------------------------------------

------ ERROR ------

Promise pool failed! 
 Error: [host: https://coins.llama.fi/prices] [429] "For higher rate limits subscribe to API plan at https://defillama.com/subscription"
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise pool
Error: Aborting, previous errors in promise poo...

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@dexs/quickswap-v2.ts`:
- Line 35: The methodology text for the Quickswap v2 protocol revenue split is
inconsistent with the cutoff logic: the `ProtocolRevenue` description currently
says the new 30% split starts “since Nov 4, 2025,” but the actual effective date
in the surrounding QuickSwap v2 methodology is Nov 5, 2025. Update the affected
`ProtocolRevenue` strings in `dexs/quickswap-v2.ts` to say “since Nov 5, 2025”
so they match the `timestamp >= nov5th2025` behavior and avoid misleading users.

In `@dexs/quickswap-v3.ts`:
- Line 77: The methodology text for the protocol revenue split is inconsistent
with the actual cutoff used in the QuickSwap logic. Update the `ProtocolRevenue`
description in `quickswap-v3.ts` (and the matching text in `quickswap-v2.ts` if
present) so it says the new split applies starting Nov 5, 2025, matching the
`timestamp >= nov5th2025` check used in the revenue calculation.

In `@dexs/quickswap-v4.ts`:
- Line 76: The methodology text for the protocol revenue split is inconsistent
with the actual cutoff used in the Quickswap logic. Update the descriptive
string in quickswap-v4.ts (and the related metadata entry it shares) so it
matches the effective date applied by the timestamp check in the Quickswap
revenue calculation, which uses nov5th2025 / Nov 5, 2025 00:00 UTC. Keep the
wording aligned with the same convention used in quickswap-v2.ts and
quickswap-v3.ts.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 75770029-37a5-4896-82d9-1e68a0fc0628

📥 Commits

Reviewing files that changed from the base of the PR and between d5c28a5 and b2cd025.

📒 Files selected for processing (3)
  • dexs/quickswap-v2.ts
  • dexs/quickswap-v3.ts
  • dexs/quickswap-v4.ts

Comment thread dexs/quickswap-v2.ts
Comment thread dexs/quickswap-v3.ts
Comment thread dexs/quickswap-v4.ts
@treeoflife2
treeoflife2 merged commit 8e25af5 into master Jul 16, 2026
2 of 3 checks passed
@treeoflife2
treeoflife2 deleted the quickswap-rev-split-nov2025 branch July 16, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant