Skip to content
Business logic Audit finding Intermediate

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

https://github.com/sherlock-audit/2025-09-super-dca/blob/main/super-dca-cashback/src/SuperDCACashback.sol#L152

https://github.com/sherlock-audit/2025-09-super-dca/blob/main/super-dca-cashback/src/SuperDCACashback.sol#L168

The root cause is the complete absence of cashbackClaim.startTime validation in three critical locations:

  1. Constructor Does not validate _cashbackClaim.startTime
  2. _isTradeValid(): Does not check trade.startTime >= cashbackClaim.startTime
  3. _calculateEpochData() : Calculates timeElapsed from trade.startTime instead of max(trade.startTime, cashbackClaim.startTime)

Internal Pre-conditions

  1. A user must have created a trade in the SuperDCATrade contract with trade.startTime < cashbackClaim.startTime
  2. The trade must meet minimum flow rate requirements (trade.flowRate >= cashbackClaim.minRate)
  3. The trade must still be active or have ended after the campaign started
  4. User must own the trade NFT

External Pre-conditions

N/A

Attack Path

  1. User creates Trade #1 on January 1, 2024 (timestamp: 1704067200) with valid flow rate
  2. Protocol team deploys SuperDCACashback contract on March 1, 2024 with cashbackClaim.startTime = 1709251200 (March 1, 2024)
  3. Campaign is intended to reward participants starting March 1 onwards
  4. On March 15, 2024, user calls claimAllCashback(1)
  5. _calculateEpochData() calculates: timeElapsed = currentTime - trade.startTime = March 15 - January 1 = 73 days
  6. User receives rewards for 10+ completed epochs (~73 days worth) instead of just 2 epochs (~14 days)
  7. User claims 5x more rewards than intended, draining funds meant for legitimate campaign participants
  8. 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

Diff
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

The original report as published on Sherlock, by 0xpetern. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

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

  1. Create a trade before the campaign start time with a valid flow rate.
  2. Deploy the cashback contract with a later campaign start time.
  3. Call claimAllCashback for the old trade after the campaign starts.
  4. 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.

More by 0xpetern

View all

9 more disclosed reports, best first.

More from Super DCA Liquidity Network

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.