Rifero is a referral platform designed for Web3. Using smart contracts to simplify the process of managing and rewarding referrals. Providing users with a single interface to generate and track referral links without multiple accounts.
Your wallet — your referrals
The platform aims to streamline the referral process in Web3 by allowing users to generate unique links, track their referrals and earn rewards. In an all blockchain based solution where users keep control over their data.
- Platform Address:
0xe8806fc0f62174dd3587e7792e624535cafdd3ed
- Token Address:
0x454ba6e6dec3bf200b4b5835c16f0342410ecc1e
# Install dependencies
npm install
# Go to frontend folder
cd frontend
# Install dependencies in frontend
npm install
# Start the development server
npm run dev
- Total Supply: 1,000,000 RFT minted to the deployer’s wallet.
- Purpose: Tokens are used to fund the RiferoPlatform for rewarding referrals.
- Each successful referral awards 10 RFT to the referrer.
- Referral rules:
- Self-referrals are not allowed.
- A wallet can only be referred once.
- Circular referrals (referring your referrer) are prohibited.
- The deployer or any token holder must transfer RFT tokens to the RiferoPlatform.
- Tokens in the platform ensure rewards are distributed to successful referrers.
- The app prompts users to connect their Web3 wallet (e.g., MetaMask).
- Once connected, the user’s wallet address and token balance are displayed.
- Users can generate a personalized referral link based on their wallet address.
- The generated link can be copied to the clipboard for easy sharing.
- Referees can be manually added by entering their wallet address.
- The platform validates the referee address to ensure it meets referral rules.
- Upon a successful referral, 10 RFT tokens are automatically transferred to the referrer’s wallet.
- The referral and rewards are recorded on-chain for transparency.
For testing purposes contract is funded via browser console
const script = document.createElement("script");
script.src = "https://cdnjs.cloudflare.com/ajax/libs/ethers/5.7.2/ethers.umd.min.js";
script.onload = () => console.log("Ethers.js loaded!");
document.head.appendChild(script);
(async () => {
const tokenAddress = "0x454ba6e6dec3bf200b4b5835c16f0342410ecc1e"; // RiferoToken address
const platformAddress = "0xe8806fc0f62174dd3587e7792e624535cafdd3ed"; // RiferoPlatform address
const amount = ethers.utils.parseUnits("100", 18); // Amount to transfer: 100 RFT
const provider = new ethers.providers.Web3Provider(window.ethereum);
await provider.send("eth_requestAccounts", []);
const signer = provider.getSigner();
const RiferoTokenABI = ["function transfer(address recipient, uint256 amount) public returns (bool)"];
const token = new ethers.Contract(tokenAddress, RiferoTokenABI, signer);
try {
console.log(`Sending ${ethers.utils.formatUnits(amount, 18)} RFT to RiferoPlatform...`);
const tx = await token.transfer(platformAddress, amount);
console.log("Transaction sent:", tx.hash);
await tx.wait();
console.log("Funding successful!");
} catch (error) {
console.error("Error funding platform:", error.message);
}
})();
(async () => {
const tokenAddress = "0x454ba6e6dec3bf200b4b5835c16f0342410ecc1e"; // RiferoToken address
const platformAddress = "0xe8806fc0f62174dd3587e7792e624535cafdd3ed"; // RiferoPlatform address
const provider = new ethers.providers.Web3Provider(window.ethereum);
await provider.send("eth_requestAccounts", []);
const signer = provider.getSigner();
const RiferoTokenABI = ["function balanceOf(address owner) view returns (uint256)"];
const token = new ethers.Contract(tokenAddress, RiferoTokenABI, signer);
try {
const balance = await token.balanceOf(platformAddress);
console.log(`RiferoPlatform Balance: ${ethers.utils.formatUnits(balance, 18)} RFT`);
} catch (error) {
console.error("Error checking platform balance:", error.message);
}
})();
- Improve the reliability of referral links to eliminate manual additions of referees.
- Introduce automated mechanisms to ensure the RiferoPlatform always has sufficient tokens for rewards.
- Expand compatibility to multiple blockchain networks, increasing accessibility for a broader user base.
- Add tools for users to track referral performance, token rewards and activity metrics.
- Refine the UI for a seamless experience across both desktop and mobile devices.
- Enhance support for a wider range of wallets to ensure compatibility and accessibility for all users.