This post describes an earlier SPL token design. $ALOD launches on Solana. No mint is published, and this adapter is not part of that launch.
Background
$ALOD cannot be used directly as a payment asset in x402. We sought to embed payment processes into API calls for on-chain operations, particularly for AI agents that cannot use traditional payment methods.
$ALOD is an SPL token on Solana. A contributor signs the transfer, and a relayer submits it and pays the SOL fee. No mint is published.
Design Options
Four approaches were evaluated:
- Option A: Issue a New Token - Creates ecosystem fragmentation and high migration costs.
- Option B: Upgrade/Proxy - Impossible since
$ALODis not upgradeable. - Option C: Wrapper Token - Introduces a dual-asset system with liquidity splitting.
- Option D: Fee payer - Exposes an SPL token interface. A relayer submits the signed transfer and pays the SOL fee.
Comparison Matrix
| Approach | Contract Changes | Asset Migration | UX | Integration Cost |
|---|---|---|---|---|
| New Token | None to original | Required | Poor | High |
| Upgrade/Proxy | Impossible | None | Good | N/A |
| Wrapper Token | None to original | Optional | Medium | Medium |
| Fee payer | None to original | None | Good | Low |
Core Design Architecture
The fee payer operates as a capability layer with two aspects:
External Interface: Implements the SPL token interface, plus a signed transfer a relayer can submit
Internal Proxy: Maintains minimal state while forwarding operations to the underlying token. It does not mint or burn any assets and does not hold user funds.
Interaction Flows
Three scenarios demonstrate the adapter:
- Regular Transfers - Transparent proxy behavior for standard SPL token operations
- Relayed transfers - Users sign authorizations that relayers submit, paying the SOL fee on their behalf
- x402 Integration - Complete payment flow showing adapter integration with the x402 protocol
sequenceDiagram
participant User
participant Adapter
participant Relayer
participant ALOD
User->>Adapter: signAuthorization(to, value, deadline)
User->>Relayer: submit(signedAuth)
Relayer->>Adapter: transferWithAuthorization(...)
Adapter->>ALOD: transferFrom(user, to, value)
ALOD-->>Adapter: success
Adapter-->>Relayer: success
Advantages
- No modification to original token contracts
- No new token asset created
- Compatible with any SPL token
- Reusable infrastructure across projects
- A relayer can batch transfers and pay the SOL fee
Limitations and Trade-Offs
Technical Constraints
- Requires additional approval transaction
- Adds 5-10% fee overhead
- Maintains separate allowance state from underlying token
Security Considerations
- Adapter becomes critical infrastructure requiring audits
- New attack surface from signature verification
- Non-upgradeable deployment recommended
Deployment Requirements
- Separate adapter needed per token
- Strict security audits essential
- One-click deployment scripts provided
Reference Implementation
Key components include:
// Simplified adapter interface
interface IFeePayer {
// SPL token standard
function transfer(address to, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
// signed transfer permit
function permit(address owner, address spender, uint256 value,
uint256 deadline, uint8 v, bytes32 r, bytes32 s) external;
// a relayer submits the signed transfer and pays the SOL fee
function transferWithAuthorization(
address from, address to, uint256 value,
uint256 validAfter, uint256 validBefore,
bytes32 nonce, uint8 v, bytes32 r, bytes32 s
) external;
}
Conclusion
This is a general pattern: use a capability layer to adapt legacy systems instead of forcing upgrades to the systems themselves. Rather than requiring asset migration or protocol degradation, adapters enable legacy tokens to support new standards while maintaining contract immutability. The pattern can be reused in many contexts.