Skip to content

Welcome

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.


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.


┌─────────────┐
│  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

curl -O https://redio.app/idl/redio_contract.json

2. 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)

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();
await program.methods
  .addAffiliate("ALICE_REF_001")
  .accounts({
    merchantPool: merchantPoolPda,
    affiliateWallet: affiliate.publicKey,
    merchant: merchant.publicKey,
    // ... other accounts
  })
  .signers([merchant])
  .rpc();
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 instantly

FunctionPurposeWho Can Call
initialize_poolCreate merchant affiliate programMerchant
add_affiliateRegister new affiliateMerchant
process_saleRecord sale & pay commissionBackend/Authority
remove_affiliateDeactivate affiliateMerchant
deposit_escrowAdd USDC to escrowMerchant
withdraw_escrowRemove USDC from escrowMerchant

  • 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

  • Contract Address: CFQoHeX28aKhpgsLCSGM2zpou6RkRrwRoHVToWS2B6tQ
  • Twitter: @useredio
  • Telegram: @redio_daw

Ready to eliminate payment delays? Start with our technical documentation.