Skip to content

Rolling campaigns with rank persistence (v1.1) #10

@alexanderkoh

Description

@alexanderkoh

Description

Users who kept LP through the vesting period of campaign N should get rank priority in campaign N+1 for the same pool. This creates a loyalty flywheel — long-term LPs get structural advantages.

Design (from spec)

  • Opt-in with rank bonus: Users must explicitly join campaign N+1, but if they had a position in campaign N (and fully vested), they get placed before all new joiners
  • Campaign struct already links via pool_address — query previous campaigns for the same pool
  • UserPos is NOT deleted after claim (weight set to 0) — past positions are queryable

Implementation approach

  1. Add prev_campaign: Option<u32> to Campaign struct
  2. On create_campaign, check for ended campaigns on the same pool and link
  3. On join_campaign, check if user had a position in the previous campaign
  4. If yes, assign rank priority (e.g., rank 1-N for returning users, N+1 onwards for new)

Why deferred

Decided during design phase to ship v1 without this. The contract already preserves the data needed — adding this doesn't require migration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    contractsSmart contract workfeatureNew featurev1.1Deferred to v1.1

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions