Users with pre-campaign trades will drain cashback funds by claiming retroactive rewards for periods before campaign existed
The cashback contract never checks or uses the campaign start time when calculating rewards, so trades created before the campaign can claim cashback for the entire period since the trade began. An attacker with an old trade could claim far more rewards than intended and drain the cashback pool.
0xpetern Follow with 0xv1bh4, BengalCatBalu and 36 others
Originally disclosed on Sherlock
Source: https://github.com/sherlock-audit/2025-09-super-dca-judging/issues/71
Found by
0xpetern, 0xv1bh4, BengalCatBalu, Boy2000, DSbeX, DuoSec, Ironsidesec, Josh4324, JuggerNaut, Ollam, ScarletFir, Sir_Shades, SuperDevFavour, TECHFUND-inc, Y4nhu1, Ziusz, _Ranjan2003, bustomer, codexNature, deadmanwalking, drdee, eww, fullstop, glitch-Hunter, heavyw8t, itsRavin, jayjoshix, ke1caM, khaye26, lucky-gru, maigadoh, makeWeb3safe, montecristo, peazzycole, secret__one, softdev0323, tinnohofficial, vivekd, zcai
Summary
The contract contains a cashbackClaim.startTime field that defines when the campaign begins, but this field is never validated or used in reward calculations. As a result, trades that started before the campaign launch can claim cashback rewards retroactively for all time periods, including those before the campaign existed. This allows early trade holders to drain disproportionate amounts of cashback funds meant for legitimate campaign participants.
Root Cause
The root cause is the complete absence of cashbackClaim.startTime validation in three critical locations:
ConstructorDoes not validate_cashbackClaim.startTime_isTradeValid(): Does not checktrade.startTime >= cashbackClaim.startTime_calculateEpochData(): CalculatestimeElapsedfromtrade.startTimeinstead ofmax(trade.startTime, cashbackClaim.startTime)
Internal Pre-conditions
- A user must have created a trade in the SuperDCATrade contract with
trade.startTime < cashbackClaim.startTime - The trade must meet minimum flow rate requirements (
trade.flowRate >= cashbackClaim.minRate) - The trade must still be active or have ended after the campaign started
- User must own the trade NFT
External Pre-conditions
N/A
Attack Path
- User creates Trade #1 on January 1, 2024 (timestamp: 1704067200) with valid flow rate
- Protocol team deploys SuperDCACashback contract on March 1, 2024 with
cashbackClaim.startTime = 1709251200(March 1, 2024) - Campaign is intended to reward participants starting March 1 onwards
- On March 15, 2024, user calls
claimAllCashback(1) _calculateEpochData()calculates:timeElapsed = currentTime - trade.startTime = March 15 - January 1 = 73 days- User receives rewards for 10+ completed epochs (~73 days worth) instead of just 2 epochs (~14 days)
- User claims 5x more rewards than intended, draining funds meant for legitimate campaign participants
- Multiple pre-campaign trade holders repeat this, potentially draining the entire cashback pool
Impact
- Fund Drainage: Pre-campaign trades can drain the majority of cashback funds before legitimate participants can claim
- Unfair Advantage: Users who happened to create trades months before campaign launch get massively disproportionate rewards (up to unlimited retroactive rewards)
- Campaign Failure: The cashback campaign fails to incentivize new behavior since all funds go to pre-existing trades
- Insolvency Risk: Contract becomes insolvent as retroactive claims exceed funded amounts
PoC
Timeline:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Jan 1, 2024 Mar 1, 2024 Mar 15, 2024
│ │ │
│ │ │
▼ ▼ ▼
Trade Created Campaign Launches User Claims
(startTime: (cashbackClaim. Rewards
timestamp 1) startTime:
timestamp 2)
Expected Reward Period: [────14 days────]
Actual Reward Period: [──────────73 days────────────]
(Jan 1 to Mar 15)
Mitigation
Implement proper validation and usage of the cashbackClaim.startTime
Discussion
sherlock-admin2
The protocol team fixed this issue in the following PRs/commits: https://github.com/Super-DCA-Tech/super-dca-cashback/pull/24
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The campaign start time is stored but never validated or used as a lower bound when calculating elapsed reward time.
Impact
Pre-campaign trades could claim disproportionate retroactive rewards, potentially draining the cashback pool and making the contract insolvent.
What the attacker needed
A trade created before the campaign start; trade flow rate meets the minimum; trade active or ended after campaign start; ownership of the trade NFT
The fix
The protocol team fixed this issue in a pull request.
How it was found
- Create a trade before the campaign start time with a valid flow rate.
- Deploy the cashback contract with a later campaign start time.
- Call claimAllCashback for the old trade after the campaign starts.
- The contract calculates elapsed time from the trade start, not the campaign start, paying out extra epochs.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A cashback campaign is meant to reward people for trading during a set period. The contract stores a start date for the campaign but never checks it when working out how much to pay. So someone who started trading months earlier gets paid for all that time too, taking money meant for new participants.
What is Business logic?
The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.