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
- Add
prev_campaign: Option<u32> to Campaign struct
- On
create_campaign, check for ended campaigns on the same pool and link
- On
join_campaign, check if user had a position in the previous campaign
- 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.
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)
pool_address— query previous campaigns for the same poolImplementation approach
prev_campaign: Option<u32>to Campaign structcreate_campaign, check for ended campaigns on the same pool and linkjoin_campaign, check if user had a position in the previous campaignWhy deferred
Decided during design phase to ship v1 without this. The contract already preserves the data needed — adding this doesn't require migration.