feat(api): public /v1/referral/info endpoint - #19
Merged
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Missing piece from PR #18.