Skip to content

feat(api): public /v1/referral/info endpoint - #19

Merged
mertcicekci0 merged 1 commit into
mainfrom
feat/referral-info-endpoint
May 18, 2026
Merged

feat(api): public /v1/referral/info endpoint#19
mertcicekci0 merged 1 commit into
mainfrom
feat/referral-info-endpoint

Conversation

@mertcicekci0

Copy link
Copy Markdown
Collaborator

Missing piece from PR #18.

Was meant to ship in #18 but got dropped from the staging set.
Returns { self, binding } looked up by address (same shape as the
authed /v1/referral/me, just keyed by query param). Lets the web
referrals page render an existing code without going through the
closed-beta API key handshake.
@vercel

vercel Bot commented May 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
noether Ready Ready Preview, Comment May 18, 2026 2:29pm

Request Review

@mertcicekci0
mertcicekci0 merged commit 153a3b4 into main May 18, 2026
8 checks passed
@mertcicekci0
mertcicekci0 deleted the feat/referral-info-endpoint branch May 18, 2026 14:29
y4hyya added a commit that referenced this pull request Jul 23, 2026
…l (audit #12, #19)

- market (#12): position/order DATA entries extended TTL only to the shared
  30-day window on write, and funding is lazy (no writes refresh them), so an
  idle position or a long-resting limit order archived at ~30 days and blocked
  its own close/liquidate/execute. They now get a dedicated ~150-day window
  (extend_ttl caps at the network max, so an over-large target never traps);
  the per-trader/global INDEX lists keep the 30-day window since market
  activity refreshes them.
- referral (#19): the identity getters (lookup_code, referrer_of, is_revoked,
  load_info) read without extending, so a code, a referee link, a revocation or
  a referrer's accrued stats archived ~30 days after the last write even while
  in active use (a lapsed revocation would let a revoked referrer earn again).
  They now re-extend TTL on read, guarded by presence, keeping a live
  relationship alive.

2 new regression tests using get_ttl (a fresh position's window exceeds the
30-day one; a resolved code's TTL is refreshed after decaying near expiry).
market 177, referral 20 pass. The complete cure for a truly-idle entry that
does archive is the off-chain restorePreamble handling (#7/#10); this reduces
the on-chain frequency.
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.

1 participant