Skip to content

Incentive program (FEDEV-3501)#2401

Open
qwinndev wants to merge 135 commits into
releasefrom
incentive-points-dashboard
Open

Incentive program (FEDEV-3501)#2401
qwinndev wants to merge 135 commits into
releasefrom
incentive-points-dashboard

Conversation

@qwinndev

Copy link
Copy Markdown
Contributor

Summary

Implements the frontend for the GMX incentive/loyalty points program — an MVP where traders earn weekly Points based on trading fees paid, adjusted by staking, volume, and activity multipliers.

Key additions:

  • New Points page (/points) with dashboard, leaderboard, and rewards history tabs — tier blocks for Volume / Staking / Boosts, progress bars, FAQ and "How it works" sections
  • Incentives domain layer (src/domain/synthetics/incentives/) — types, constants, and data hooks (useAccountIncentiveDashboard, useAccountIncentiveStatus, useAccountRewardsHistory, useIncentivesLeaderboard, useIncentivesConfig, usePersonalizedBannerData, useIncentiveAccountEpochAudit)
  • Touch points across the app — Points nav item with "New" badge, multiplier badge in address dropdown / GMX account modal, points row and promo banner in TradeBox
  • Claim rewards flow — on-chain claiming via swap-path routing (useClaimAffiliateSwapRoutes, ClaimSwapTargetTokenSelector), historical points allocation modal
  • Incentives audit page (dev-only /incentives-audit) for debugging per-account epoch data
  • Tier badge icons (volume: Ranked/Certified/Veteran/Legendary/Apex; staking: Supporter/Advocate/Guardian/Steward/Titan) and activity boost icons
  • Full i18n — locale strings added across all supported languages

Linear

FEDEV-3501 — https://linear.app/gmx-io/issue/FEDEV-3501/incentive-scheme-frontend-squid

Test Plan

  • Points page loads and renders tier blocks correctly in both banner and active states
  • Tier progress bars and projected multipliers match expected values across volume/staking tiers
  • Leaderboard tab populates and sorts correctly
  • Rewards history tab renders historical epochs (including mobile layout)
  • Claim rewards modal completes the full on-chain swap + claim flow
  • Multiplier badge appears in address dropdown / GMX account modal when the account has an active multiplier
  • TradeBox points row and promo banner render correctly (personalization variants, manually-rewarded vs. new user)
  • Sidebar "New" badge for Points clears after first click
  • Historical points allocation modal displays correct values for manually-granted users
  • Verify locale strings render in at least one non-English locale

qwinndev added 30 commits April 8, 2026 19:20
Add tier badge icons (apex, certified, legendary, ranked, veteran) and
feature icons (boost, discounts, epoch, multiplier, points, staking).
Add types, constants, and SWR hooks for the incentive points system:
config fetching, account status, dashboard data, rewards history,
leaderboard, and personalized banner computation. Update subsquid
indexer URLs to incentive-enabled endpoints.
…omponent

Extract the animated gradient "New" badge from SupportChatNavItem into
a reusable NavItem.scss, rename CSS classes from support-chat-* to nav-*,
and simplify SupportChatNavItem to use the new showNewBadge prop.
Add /points route with three tabs: Dashboard (multiplier progress, tier
cards, how-it-works), Rewards History (per-epoch table with pagination),
and Leaderboard (time filters, address search, sorting). Includes sidebar
rewards widget with claim modal and epoch countdown. Add localStorage
keys and leaderboard sorter context.
Show a "Points" link in the side navigation when incentives are enabled,
with an animated gradient "New" badge that dismisses on first click.
Surface the user's current incentive multiplier as a green badge next
to their address in both multichain/non-multichain dropdowns, and add
a PointsSection to the account modal linking to /points.
Add a dismissible personalized promo banner on the trade page driving
traffic to /points, and a multiplier info row at the bottom of the
trade submission form.
- Fix points page tier cards, levels, and main data section per Figma designs
- Update AdvancedDisplayRows and PointsRow in TradeBox
- Add multiplier solid icon asset
- Clean up unused imports and incentive types
- Add custom Tailwind config entries for points UI
…namic config

- Implement Claim and Claim+Stake flows via ClaimHandler/RewardRouter contracts
- Add "Incentivized Markets" filter tab with multiplier badge in chart selector
- Replace hardcoded multiplier caps, epoch durations, and boost descriptions with API-driven values
- Rework manual allocation detection using pre-program rewards history entries
- Add estimated rewards, total earned rewards, and live epoch countdown to sidebar
- Show dynamic "stake X GMX more for Y boost" in account modal
- Simplify rewards history table columns with locale-aware epoch formatting
- Extract epoch timing, incentives text, and epoch label utilities with tests
- Update FAQ copy from "weekly" to "each epoch" with dynamic values
- Auto-dismiss promo banner on link click
- Update all locale files with new translation strings
Resolve conflicts:
- indexers.ts: keep test subsquid URLs for incentive-points development
- locale files: keep translations from both branches
Each progress section in the active staking tier card now shows a
tooltip on hover with the tier name, multiplier, and staked/threshold.
qwinndev added 28 commits May 11, 2026 09:04
…e-points-dashboard

# Conflicts:
#	src/components/ChartTokenSelector/ChartTokenSelector.tsx
#	src/components/FavoriteTabs/FavoriteTabs.tsx
#	src/components/GmList/useFilterSortPools.tsx
#	src/components/MarketSelector/GmPoolsSelectorForGlvMarket.tsx
#	src/components/MarketSelector/MarketSelector.tsx
#	src/components/MarketSelector/PoolSelector.tsx
#	src/context/TokensFavoritesContext/TokensFavoritesContextProvider.tsx
#	src/domain/synthetics/subaccount/utils.ts
#	src/locales/de/messages.po
#	src/locales/en/messages.po
#	src/locales/es/messages.po
#	src/locales/fr/messages.po
#	src/locales/ja/messages.po
#	src/locales/ko/messages.po
#	src/locales/pseudo/messages.po
#	src/locales/ru/messages.po
#	src/locales/zh-tw/messages.po
#	src/locales/zh/messages.po
@github-actions

Copy link
Copy Markdown

Playwright Component Test Report

All tests passed.

View Report

Commit f12b986


const gmxMaxUnstakeAmount = useMemo(() => {
const stakedAmount = processedData?.gmxInStakedGmx;
if (stakedAmount === undefined) return undefined;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be a single condition and check another places plaese

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.

3 participants