Skip to content

[T2.5d] /projection endpoint (canonical v5 contribution API) #1245

Description

@realproject7

Epic: #1229 · Spec: §6.3 · Type: CODE · Estimate: 0.5 day · Depends on: T2.4b

Scope

GET /api/airdrop/projection?address=X
Auth: none (public read)
Response shape:
```json
{
"address": "0x...",
"buy_volume": 1234.5,
"qualified_refs": 3,
"has_fc_bonus": true,
"multiplier": 1.8,
"weighted_spend": 2222.1,
"community_total": 100000.0,
"projected_share": {
"bronze": 12.3,
"silver": 123.4,
"gold": 617.0,
"diamond": 1234.0
}
}
```

Implementation:

  1. Select base columns for address from shared v_weighted_spend helper (T2.4b)
  2. Read current FDV from pl_daily_prices to determine current milestone tier
  3. Apply share = released_pool × (weighted_spend / community_total) for EACH milestone tier (Bronze/Silver/Gold/Diamond)
  4. Return all 4 projected shares so UI can render the climb chart

Cache: 30s.

Canonical: This is the single v5 contribution API. /api/airdrop/points (T2.5f) becomes a deprecated thin shim.

Acceptance

  • Returns 4 projected_share values for activated wallet
  • Returns zeros for activated wallet with no buys
  • Returns 404 / empty for non-activated wallet (per T2.4b filter — wallet excluded from v_weighted_spend)
  • Cache 30s verified
  • Output matches §4 worked example for the test fixture

Dependencies

T2.4b (shared SQL helper)

Metadata

Metadata

Assignees

No one assigned

    Labels

    airdropPLOT 10x Airdrop Campaign

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions