feat(growth): referral reward loop (+5 credits) [0xcFDa9f32d292661740a6d0B4c00867E34c05c56D] - #115
Open
meridianmindx wants to merge 1 commit into
Open
feat(growth): referral reward loop (+5 credits) [0xcFDa9f32d292661740a6d0B4c00867E34c05c56D]#115meridianmindx wants to merge 1 commit into
meridianmindx wants to merge 1 commit into
Conversation
β¦ussyn#2) Implement processReferral + SQL migration enhancements (balances, notifications, system_events) so successful referrals grant 5 free credits once per code/user.
5 tasks
Author
|
Friendly bump for merge when you have a moment β still MERGEABLE with payout address in the title. Happy to address any review notes same day so we can clear the USDC reward on merge. |
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.
Summary
Closes #2 β referral reward loop for +20% conversion.
When user B converts with user A's referral code, A receives 5 free credits once. Duplicate
(code, new_user)pairs are rejected.Changes
migrations/add_referral_system.sqlβ idempotent tables +process_referral()(balances, notifications,system_events)src/growth/referral.tsβReferralStore+processReferral()tests/referral.test.tsβ happy path, idempotency, multi-user, invalid/self-referralAcceptance criteria
referral_codes(code, owner_id, uses, credits_awarded)process_referral(referral_code, new_user_id)referral_conversionVerification
Payout
USDC on Base (x402):
0xcFDa9f32d292661740a6d0B4c00867E34c05c56DContributor:
meridianmindx