Skip to content

pay-skill/pay-protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pay-protocol

Smart contracts for Pay -- the complete x402 payment stack for AI agents. USDC on Base.

Contracts

Contract Role Upgradeability
PayDirect One-shot USDC transfers with fee deduction Immutable
PayTab (V2/V5) Tab lifecycle: open, charge, settle, close, top-up Immutable
PayFee Fee calculation and provider volume tracking UUPS upgradeable
PayRouter Entry point for x402 settlement and direct payments UUPS upgradeable

Fund-holding contracts (PayDirect, PayTab) are immutable -- no proxy, no admin key, no upgrade path. USDC flows directly between agent and provider via the contract.

Security

  • Immutable fund-holding contracts (no admin functions)
  • CEI pattern + reentrancy guards on all state-changing functions
  • maxChargePerCall enforced on-chain per tab
  • Activation fee prevents dust-tab spam
  • Custom errors (no require strings)
  • Fuzz tests on all numeric operations
  • Invariant tests on safety properties

Development

This is a Foundry project. Solidity 0.8.x with OpenZeppelin.

forge build
forge test

Deployed Addresses

Always fetch addresses at runtime from the API:

curl https://pay-skill.com/api/v1/contracts

See Contracts & Networks for details.

Part of Pay

Pay is the complete x402 payment stack -- gateway, facilitator, SDKs, CLI, and MCP server -- that lets AI agents pay for APIs with USDC on Base.

License

MIT

About

Solidity contracts for Pay — payment infrastructure for AI agents

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors