MoltsPay Now Supports Solana and BNB: Gasless Payments Across 5 Blockchains
TL;DR: MoltsPay v1.3.0 adds Solana and BNB chain support with gasless payments. AI agents can now pay for services on Base, Polygon, Solana, BNB, and Tempo - all without paying gas fees.
The Problem We're Solving
As AI agents become more autonomous, they need to pay for external services - APIs, compute, data, and other AI agents' services. But blockchain payments have a major UX problem: gas fees.
Every transaction requires:
- The right native token (ETH, SOL, BNB) for gas
- Enough balance to cover unpredictable fees
- Complex wallet management across chains
For AI agents operating autonomously, this is a nightmare. An agent shouldn't need to worry about having 0.001 BNB for gas when it just wants to pay $0.99 for a video generation service.
Our Solution: Self-Hosted Facilitators
With MoltsPay v1.3.0, we've introduced self-hosted facilitators for Solana and BNB chains. Here's what that means:
How It Works
┌─────────┐ ┌─────────┐ ┌──────────┐
│ Client │ │ Server │ │ Blockchain│
│ (Agent) │ │(Service)│ │ │
└────┬────┘ └────┬────┘ └────┬─────┘
│ │ │
│ Request service │ │
│──────────────────>│ │
│ │ │
│ 402 + pay details │ │
│<──────────────────│ │
│ │ │
│ Sign payment │ │
│ (NO GAS!) │ │
│──────────────────>│ │
│ │ │
│ │ Execute payment │
│ │ (server pays gas) │
│ │──────────────────>│
│ │ │
│ Service result │ │
│<──────────────────│ │
The key insight: Clients only sign payment authorizations - they never pay gas. The server (acting as a facilitator) handles on-chain execution and absorbs the minimal gas cost (~$0.001 per transaction).
Two Types of Facilitators
MoltsPay now supports two facilitator architectures:
| Type | Example | Who Pays Gas | Trust Model |
|---|---|---|---|
| External | Coinbase CDP | Third party | Trust Coinbase |
| Self-hosted | SOL, BNB, Tempo | Your server | Fully self-sovereign |
Why Self-Hosted Matters
No Single Point of Failure - Unlike CDP where everyone depends on Coinbase, each service provider runs their own facilitator.
Censorship Resistant - No third party can block your payments.
Chain Agnostic - We can add any blockchain by implementing a facilitator. No need to wait for third-party support.
Cost Control - You only pay actual on-chain gas (~$0.001), not third-party fees.
Supported Chains
| Chain | Facilitator | Gas Model |
|---|---|---|
| Base | CDP (External) | Gasless (CDP pays) |
| Polygon | CDP (External) | Gasless (CDP pays) |
| Solana | Self-hosted | Gasless (server pays ~$0.001) |
| BNB | Self-hosted | Gasless (server pays ~$0.0001) |
| Tempo | Self-hosted | Native gas-free |
Quick Start
For AI Agents (Paying for Services)
# Install
npm install moltspay
# Initialize wallet (creates both EVM and Solana wallets)
npx moltspay init
# Get testnet tokens
npx moltspay faucet --chain bnb_testnet # BNB testnet
npx moltspay faucet --chain solana_devnet # Solana devnet
# Pay for a service on BNB
npx moltspay pay https://moltspay.com/a/zen7 text-to-video \
--chain bnb_testnet \
--prompt "a cat dancing"
# Pay on Solana
npx moltspay pay https://moltspay.com/a/zen7 text-to-video \
--chain solana_devnet \
--prompt "a robot painting"
For Service Providers (Accepting Payments)
Add one JSON file to your existing skill:
{
"provider": {
"name": "My AI Service",
"wallet": "0xYourEVMAddress",
"solana_wallet": "YourSolanaAddress",
"chains": ["base", "solana", "bnb"]
},
"services": [{
"id": "my-service",
"function": "myFunction",
"price": 0.99,
"currency": "USDC"
}]
}
Start your server:
npx moltspay start ./my-skill --port 3000
That's it! Your service now accepts gasless payments on 5 chains.
The Technical Details
Solana Implementation
Solana required a completely different approach since it's not an EVM chain:
- Separate wallet - Ed25519 keys (different from EVM's secp256k1)
- SPL Token transfers - Official Circle USDC
- Server as fee payer - Client signs, server executes
// Client signs SPL transfer authorization
const signature = await wallet.signTransaction(transferTx);
// Server adds itself as fee payer and submits
transaction.feePayer = serverPublicKey;
await connection.sendTransaction(transaction);
BNB Implementation
BNB uses an EIP-712 intent-based flow:
// Client signs EIP-712 payment intent (gasless)
const signature = await wallet.signTypedData(domain, types, intent);
// Server executes transferFrom (pays ~$0.0001 gas)
await usdc.transferFrom(client, server, amount);
The key innovation: pay-for-success. Payment only settles if the service succeeds. If the service fails, the client keeps their money.
What's Next
We're working on:
- More chains - Arbitrum, Optimism, Sui, Aptos
- Cross-chain payments - Pay on Chain A, receive on Chain B
- Decentralized facilitator network - On-chain facilitator contracts with staking
Try It Now
-
npm:
npm install moltspay - GitHub: github.com/Yaqing2023/moltspay
- Docs: moltspay.com
- Discord: Join our community
About MoltsPay
MoltsPay is open-source payment infrastructure for AI agents. We implement the x402 protocol - HTTP-native payments where AI agents can pay each other for services without human intervention.
Star us on GitHub if you find this useful! ⭐
Have questions? Drop by our Discord or open an issue on GitHub.
Tags: #ai #blockchain #solana #bnb #payments #web3 #opensource #cryptocurrency
Top comments (0)