Welcome
Welcome to Redio
Section titled “Welcome to Redio”Instant affiliate commission payments on Solana.
Redio is a smart contract system that automates affiliate commission payouts using USDC on Solana. When a sale happens, commissions are paid in seconds - no payment delays, no intermediaries, no geographic restrictions.
What is Redio?
Section titled “What is Redio?”Redio is a Solana program (smart contract) that enables:
- Merchants to create commission pools and manage affiliate programs on-chain
- Affiliates to receive instant USDC payments when they drive sales
- Developers to integrate automated affiliate payments into any platform
Think of it as programmable affiliate infrastructure - you deposit USDC into escrow, sales trigger automatic commission transfers, and affiliates get paid instantly.
How It Works
Section titled “How It Works”┌─────────────┐
│ Merchant │ Creates pool with 10% commission rate
│ Deposits │ Adds USDC to escrow
└──────┬──────┘
│
▼
┌─────────────┐
│ Escrow │ Smart contract holds USDC
│ (PDA-owned) │ No one has private key
└──────┬──────┘
│
▼
┌─────────────┐
│ Sale │ Customer buys through affiliate link
│ $100 USDC │ Backend calls process_sale()
└──────┬──────┘
│
▼
┌─────────────┐
│ Commission │ $10 USDC transferred instantly
│ Paid │ Affiliate receives payment in ~400ms
└─────────────┘Key features:
- Instant settlement: Payments execute in the same transaction as sale recording
- Transparent: All commission rates and payments are on-chain
- Programmable: Set custom commission rates per merchant pool
- Cost-efficient: ~$0.0001 per transaction vs 2-5% payment processor fees
- Global: Works anywhere with internet access, no banking required
Quick Start for Developers
Section titled “Quick Start for Developers”1. Download the IDL
Section titled “1. Download the IDL”curl -O https://redio.app/idl/redio_contract.json2. Install dependencies and generate from IDL
Section titled “2. Install dependencies and generate from IDL”npm install @coral-xyz/anchor @solana/web3.js @solana/spl-token
npx anchor idl type redio_contract.json --output types/redio_contract.ts(or just download https://redio.app/idl/redio_contract.ts)
3. Initialize a merchant pool
Section titled “3. Initialize a merchant pool”import * as anchor from "@coral-xyz/anchor";
import { Program } from "@coral-xyz/anchor";
import { PublicKey } from "@solana/web3.js";
import { RedioContract } from "types/redio_contract";
// Load your program
const program = anchor.workspace.RedioContract as Program<RedioContract>;
// Derive merchant pool PDA
const [merchantPoolPda] = PublicKey.findProgramAddressSync(
[Buffer.from("pool"), merchant.publicKey.toBuffer()],
program.programId
);
// Initialize with 10% commission rate, 100 USDC deposit
await program.methods
.initializePool(
1000, // 1000 basis points = 10%
new anchor.BN(100_000_000) // 100 USDC (6 decimals)
)
.accounts({
merchantPool: merchantPoolPda,
merchant: merchant.publicKey,
// ... other accounts
})
.signers([merchant])
.rpc();4. Add an affiliate
Section titled “4. Add an affiliate”await program.methods
.addAffiliate("ALICE_REF_001")
.accounts({
merchantPool: merchantPoolPda,
affiliateWallet: affiliate.publicKey,
merchant: merchant.publicKey,
// ... other accounts
})
.signers([merchant])
.rpc();5. Process a sale and pay commission
Section titled “5. Process a sale and pay commission”await program.methods
.processSale(new anchor.BN(50_000_000)) // 50 USDC sale
.accounts({
merchantPool: merchantPoolPda,
affiliateAccount: affiliatePda,
// ... other accounts
})
.signers([backend])
.rpc();
// Affiliate receives 5 USDC commission instantlyContract Functions
Section titled “Contract Functions”| Function | Purpose | Who Can Call |
|---|---|---|
initialize_pool | Create merchant affiliate program | Merchant |
add_affiliate | Register new affiliate | Merchant |
process_sale | Record sale & pay commission | Backend/Authority |
remove_affiliate | Deactivate affiliate | Merchant |
deposit_escrow | Add USDC to escrow | Merchant |
withdraw_escrow | Remove USDC from escrow | Merchant |
Why Build on Solana?
Section titled “Why Build on Solana?”- 400ms block times: Affiliates see payments in seconds
- $0.0001 transaction costs: 50,000x cheaper than Ethereum
- Parallel execution: Handles thousands of concurrent sales
- USDC native: $5B+ USDC on Solana, integrated with Circle
- Growing ecosystem: Circle, Shopify, Visa, Stripe all building on Solana
Resources
Section titled “Resources”- Contract Address:
CFQoHeX28aKhpgsLCSGM2zpou6RkRrwRoHVToWS2B6tQ - Twitter: @useredio
- Telegram: @redio_daw
Ready to eliminate payment delays? Start with our technical documentation.