feat: implement Jupiter referral system with SSE compatibility#7
Open
rxdha1 wants to merge 1 commit into
Open
Conversation
- Add 2.51% referral fee collection using platformFeeBps approach - Resolve Jupiter v6 API conflict between platform fees and referral parameters - Maintain full SSE token infrastructure compatibility - Add enhanced error handling for insufficient SOL balance - Include comprehensive documentation and setup guide Fixes the issue identified in commit 81f3f24 by @rxdha1 and Bonk Computer team
|
@rxdha1 is attempting to deploy a commit to the Primitives Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
🎯 Jupiter Referral System Implementation
This PR implements a robust Jupiter referral system that allows developers to earn 2.51% fees from swaps while maintaining full compatibility with the existing SSE token infrastructure.
🐛 Problem Solved
Resolves the Jupiter v6 API conflict identified in commit 81f3f24 where using both
platformFeeBpsandreferralAccount/referralFeeBpssimultaneously caused fees to be ignored.✨ Solution
platformFeeBpsapproach in quote API🚀 Features
📁 Files Changed
src/components/trade/hooks/jupiter/use-jupiter-swap.tssrc/services/jupiter.ts,src/services/swap.tssrc/types/jupiter-service.tssrc/app/api/jupiter/swap/route.tsREADME.md,JUPITER_REFERRAL_SETUP.md.env.example🧪 Testing
npm run build)💡 Technical Details
Dual Fee System Architecture:
platformFeeBpsin Jupiter quote APIJUPITER_CONFIG.FEE_WALLETBoth systems operate independently without conflicts, ensuring reliable fee collection while maintaining full SSE token support.
📚 Documentation
Complete setup instructions and technical details available in
JUPITER_REFERRAL_SETUP.md🙏 Attribution
This implementation resolves the issue identified by @rxdha1 and the Bonk Computer team, refined for the official Solana Starter Kit.
Ready for review! 🚀