How to Use Anti-Spam Relay

Complete guide to setting up destinations and sending messages with micro-bonds

For Destination Owners

1Set Up Your Destination

Create endpoints that require micro-bonds for message delivery

Webhook

HTTP POST to any URL

Email

Send formatted emails

SMS

SMS notifications

Steps:

  1. Go to the Dashboard
  2. Click "Create New Destination"
  3. Choose your destination type (Webhook/Email/SMS)
  4. Configure the endpoint details
  5. Set your bond amount (e.g., $0.005 USDC)
  6. Save and get your destination ID

2Configure Bond Amount

Set the micro-bond amount senders must pay

Recommended Bond Amounts:

Low Volume
$0.001 - $0.005
Medium Volume
$0.005 - $0.01
High Volume
$0.01 - $0.05

Bond Benefits:

  • Deters spam effectively
  • Refunded if not flagged
  • You keep slashed bonds

3Manage Messages

Monitor incoming messages and their status

Pending

Within flagging window

Refunded

Bond returned to sender

Slashed

Bond kept by you

4Flag Spam

Flag messages as spam to slash the bond

How to Flag Spam:

  1. Go to the Messages tab in your dashboard
  2. Find the message you want to flag
  3. Click the "Flag as Spam" button
  4. The bond will be slashed and sent to your wallet
  5. The sender's reputation will be affected

For Message Senders

1Add USDC to Your Wallet

You need USDC (USD Coin) to pay micro-bonds

Important: You Need USDC

Anti-Spam Relay uses USDC (USD Coin) on Base network. You cannot use regular ETH or other tokens.

How to Get USDC:

1
Buy USDC on Exchange

Buy USDC on Coinbase, Binance, or other exchanges

2
Withdraw to Base Network

Withdraw USDC to Base network (not Ethereum mainnet)

3
Bridge from Ethereum

Use Base Bridge to move USDC from Ethereum to Base

Recommended Amounts:

Testing
$1-5 USDC
Light Usage
$10-20 USDC
Heavy Usage
$50+ USDC

2Send Message

Send messages to destinations using the x402 protocol

Step-by-Step Process:

  1. Connect your wallet with USDC on Base network
  2. Enter your message in the dashboard
  3. Click "Send Message" - you'll see a payment modal
  4. Approve USDC spending in your wallet
  5. Pay the micro-bond transaction
  6. Your message will be delivered automatically!

💡 Easy Wallet Integration

The dashboard automatically handles the wallet transaction flow. Just connect your wallet, enter your message, and the system will guide you through the payment process with clear step-by-step instructions.

API Integration:

curl -X POST https://relay.app/api/relay/send \
  -H "Content-Type: application/json" \
  -d '{"destinationId":"<ID>","body":{"msg":"hello"}}'

Dashboard Usage:

1. Connect wallet with USDC
2. Select destination
3. Enter message
4. Click "Send Message"
5. Approve & pay in wallet
6. Message delivered!

3Payment Flow

Understanding the x402 payment protocol

1

Initial Request

Send message without payment

2

402 Response

Receive bond amount and payment details

3

Pay Bond

Send USDC to the specified address

4

Retry with Receipt

Include transaction hash in headers

5

Message Delivered

Your message is forwarded to the destination

4Get Refund

Your bond is automatically refunded if not flagged as spam

Automatic Refund:

  • Refunded after flagging window expires
  • No action required from you
  • Full bond amount returned

If Flagged as Spam:

  • Bond is slashed (you lose it)
  • Destination owner keeps the bond
  • Your reputation is affected

Frequently Asked Questions

Why do I need USDC instead of ETH?

USDC provides price stability for micro-bonds. ETH's price volatility would make bond amounts unpredictable. USDC on Base network has low fees and fast transactions, making it perfect for micro-payments.

What if I don't have enough USDC?

You'll need to add USDC to your wallet before sending messages. The system will reject your request if you don't have enough USDC to cover the bond amount. Check the 402 response headers for the exact amount needed.

How long does the flagging window last?

The flagging window is configurable by the destination owner, typically 1-168 hours (1 week). Your bond will be automatically refunded after this window expires if not flagged as spam.

Can I send messages without paying bonds?

No, all messages require a micro-bond payment. This is the core anti-spam mechanism. However, legitimate senders get their bonds refunded, so the effective cost is zero for non-spam messages.