Referral Fees
Overview
Referral fees are rewards provided to third parties for facilitating user activities such as buying, selling, or auctioning a Fan Token on the Moxie protocol.
The Moxie protocol offers three types of referral fees:
- Auction Referral Fees
- Buy/Sell Referral Fees
- Signup Referral Fees (Launching mid-December 2024)
Each type has a unique fee split structure. For detailed information about referral fees and their respective split structures, visit here.
The first two referral fee types—Auction and Buy/Sell—are available starting December 4, 2024, following the deployment of the new ProtocolRewards.sol
contract.
This release also includes upgrades to several existing contracts, including:
For more details on the contract upgrades, refer to the December 4, 2024 contract changelog.
Contract Architecture
Referral fees are primarily managed by the ProtocolRewards.sol
contract. This singleton contract is deployed once and handles the deposit and withdrawal of all referral fees.
Currently, only referrals on buy/sell transactions can included independently on-chain by calling the relevant smart contract functions.
Auction referrals, however, can only be made through moxie.xyz.
Buy/Sell Referral Fees
For every buy and sell Fan Token transactions that occurs on your platform, you can include your address as a referrer to receive the referral fees from each transaction.
This can be done easily by calling "v2" functions added from the December 4, 2024 contract upgrade in both the MoxieBondingCurveV2.sol
and StakingV2.sol
contracts. Those functions are:
When a user is calling one of the above functions on your platform, you can include your address in the _orderReferrer
parameter to assign yourself as a parameter.
From there, the MoxieBondingCurveV2.sol
and StakingV2.sol
contracts will automatically calculate and deposit the referral fees into the ProtocolRewards.sol
contract.
Once the referral fees are deposited into the ProtocolRewards.sol
contract, they can be withdrawn anytime.
For buy/sell referral fees withdrawal from the ProtocolRewards.sol
contract, simply call the withdraw
function.
To learn more on how to buy/sell Fan Tokens with referral fees, you can continue following the tutorial below:
- Buy Fan Tokens
- Buy Fan Tokens On Behalf Of Others
- Sell Fan Tokens
- Sell Fan Tokens On Behalf Of Others
Developer Support
If you have any questions or need help with other use cases, feel free to join the /airstack Warpcast channel and ask your questions there.
Our team is always ready to help you with any questions you may have.