Skip to content

feat: add BasePay action provider — gasless USDC, batch pay, escrow, subscriptions on Base Mainnet#1333

Open
osr21 wants to merge 4 commits into
coinbase:mainfrom
osr21:feat/basepay-action-provider
Open

feat: add BasePay action provider — gasless USDC, batch pay, escrow, subscriptions on Base Mainnet#1333
osr21 wants to merge 4 commits into
coinbase:mainfrom
osr21:feat/basepay-action-provider

Conversation

@osr21

@osr21 osr21 commented Jun 20, 2026

Copy link
Copy Markdown

Summary

This PR adds BasePay as a community action provider for AgentKit, giving AI agents five USDC payment primitives on Base Mainnet with no additional dependencies.

Actions added

Action Description
basepay_send_usdc Direct USDC transfer (agent pays ETH gas)
basepay_send_usdc_gasless EIP-3009 relay — no ETH needed by the agent
basepay_batch_pay_usdc Pay up to 200 recipients atomically
basepay_create_escrow Time-lock USDC for a beneficiary
basepay_subscribe On-chain recurring USDC payment

How gasless works

The agent signs an EIP-3009 TransferWithAuthorization typed message (no on-chain tx). The BasePay relay submits it to USDC.transferWithAuthorization(), paying the ETH gas. This means agents can send USDC with zero ETH balance — a critical unlock for autonomous agent wallets.

Verified contracts (Base Mainnet)

Contract Address
BatchPayV2 0xe40d…c68
EscrowV2 0x1eb2…499
SubscriptionManagerV2 0x1019…421

Usage

import { AgentKit } from "@coinbase/agentkit";
import { basePayActionProvider } from "./action-providers/basepay";

const agentKit = await AgentKit.from({
  walletProvider,
  actionProviders: [basePayActionProvider()],
});

Or via the standalone npm package:

npm install basepay-agentkit @coinbase/agentkit viem zod
import { basePayActionProvider } from "basepay-agentkit";

Self-hosting the relay

The relay is open-source (github.com/osr21/basepay) and requires only a funded EOA (ETH on Base) to operate. Configurable via basePayActionProvider({ relayUrl: "https://your-relay.example.com" }).

No new dependencies

The provider uses only packages already in the AgentKit dependency graph (viem, zod). The relay call uses native fetch.


Live dApp: https://base-pay.replit.app
npm package: https://www.npmjs.com/package/basepay-agentkit
Contracts + source: https://github.com/osr21/basepay

@osr21 osr21 requested a review from murrlincoln as a code owner June 20, 2026 17:53
@cb-heimdall

cb-heimdall commented Jun 20, 2026

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants