Anti-spam beyond APIs: email, messaging, and gaming with Harmoniis
Anti-spam beyond APIs: email, messaging, and gaming
HTTP 402 bearer cash is not limited to APIs. The same economic mechanism — attach a small payment to every action — works anywhere spam exists. Harmoniis provides the SDK to implement this across email, messaging, and gaming platforms.
Email anti-spam
Email spam has been an unsolved problem for 30 years. Spam filters use heuristics that produce false positives (legitimate email in spam) and false negatives (spam in inbox). AI agents make it worse: they generate unique, contextual, grammatically perfect spam that passes every content filter.
The bearer cash solution: Every email carries a Webcash token in a custom header. The receiving mail server validates the token before accepting delivery.
# SMTP extension: bearer cash in email headers
X-Webcash-Payment: e0.00100000:secret:abc123...
- Legitimate senders pay fractions of a cent per email. A thousand emails per day costs less than $1.
- Spammers sending 10 million emails per day pay $10,000. The economics kill the business model.
- No false positives: If payment is valid, the email is delivered. No content-based filtering needed.
- Privacy-preserving: No sender identity required. The payment is the credential.
Messaging anti-spam
Group chats, forums, and social platforms face the same problem: AI agents join, flood content, manipulate conversations, and create fake engagement.
Bearer cash per message solves this cleanly:
- Each message in a channel requires a micropayment (e.g., 0.001 Webcash)
- Channel owners set the price per message — higher for public channels, lower for private
- Bots pay the same as everyone else. No special "bot detection" needed
- Legitimate users barely notice the cost. Spam bots face real economic pressure
// Messaging server middleware
function requirePayment(message, amount = 0.001) {
const token = message.headers['x-webcash'];
if (!token || !wallet.validate(token, amount)) {
return { error: 'payment_required', amount };
}
return null; // Proceed
}
Gaming anti-spam
Multiplayer games face unique spam problems: gold farming, chat spam, bot accounts, fake matchmaking, and market manipulation. AI agents automate all of these at scale.
Bearer cash for game actions:
- Chat: Each chat message costs a token. Trash talk is fine — at scale, spam is expensive
- Trading: Each trade listing costs a token. Fake listings and market manipulation become costly
- Account creation: Each new account costs bearer cash. Bot armies are prohibitively expensive
- Matchmaking: Queue entries cost a token. Smurf accounts and win-trading face economic friction
// Unity integration
using Harmoniis;
public class AntiSpamMiddleware : MonoBehaviour {
private HarmoniiisWallet wallet;
public bool ValidateAction(string action, string token) {
float cost = GetActionCost(action);
return wallet.ValidateAndConsume(token, cost);
}
private float GetActionCost(string action) {
return action switch {
"chat" => 0.001f,
"trade_listing" => 0.01f,
"matchmaking" => 0.005f,
_ => 0.001f
};
}
}
The Harmoniis SDK
All of these integrations use the same Harmoniis SDK. Available for:
Apple: iOS, watchOS, tvOS, visionOS, macOS Desktop: Linux, FreeBSD, NetBSD, Windows Mobile: Android Game Engines: Unity, Unreal Engine, Godot XR: OpenXR, visionOS
cargo add harmoniis-sdk # Rust
# Other platforms: add harmoniis-sdk via your
# platform's package manager (SPM, Gradle,
# NuGet, vcpkg, CMake). See /developers
The SDK handles wallet management, token generation, payment validation, and HTTP 402 flows. See the developer guide for platform-specific integration.