Infrastructure for your agent to transact on instant programmable credit, earn yield, and settle at once.
The real cost
1M API calls, 10k USDC volume, 1 year.
x402
per-transaction settlement
Capital locked in wallet
earns 0%, just sitting there
Yield earned
no yield mechanism
Gas fees paid (1M on-chain txs)
~$0.001 × 1,000,000 settlements
Time waiting for finality
1M txs × ~1 s avg block time
With 4Mica
credit layer + batch settlement
Capital deployed in Aave vault
non-custodial · withdraw anytime
Yield earned over 1 year
~5% Aave USDC APY
Gas fees
batch + netting · sponsored · $0 for payer
Time waiting for finality
10ms BLS signature + verification per request
Same 1M calls. Same starting capital.
$1,500 saved·275.3 hours reclaimed
How it works
Pay with programmable cryptographic credit. Settle thousands of payments in one on-chain transaction.
Funds go into Aave and earn yield. One collateral covers all credit.
await client.user.approveErc20(usdc.address, AMOUNT);await client.user.deposit(AMOUNT, usdc.address);
Agent authorizes an EIP-712 guarantee claim, gets a BLS signature credit. No gas, no chain transaction. Verified in milliseconds.
const payment = await signGuarantee({cycleId: "0xabc",reqId: "0x0",amount: "0x64",recipient: "0x72e1…ResourceHub",});// GET /resource// X-PAYMENT: <base64(payment)>// HTTP 200 OK
Every 7 days the cycle closes. Bilateral flows collapse into one net position per participant.
// Cycle closes every 7 days, netting begins// Bilateral edges this cycle:Alice → Bob: 800 USDC (40 guarantees)Bob → Alice: 300 USDC (15 guarantees)// net_debit[Alice] = max(800 - 300, 0) = 500 USDC// net_credit[Bob] = 500 USDC// 55 guarantees turns into 1 net position per participant
Net debtors pay once. Creditors claim once. Defaults are covered by vault collateral.
// Debtor pays net position to ClearingHouseawait clearingHouse.payNetDebit(cycleId,netDebit, // 500 USDC — not 800merkleProof,);// Creditor claims once debtor has paidawait clearingHouse.claimNetCredit(cycleId,netCredit,merkleProof,);// 55 off-chain payments → 1 on-chain settlement
Replace thousands of transactions with one net settlement per cycle
Same x402 protocol. Same HTTP clients. Add 4Mica to scale.
Use cases
From autonomous agents to financial infrastructure — 4Mica handles the payment layer so you don't have to.
An AI agent calls dozens of APIs per task — data feeds, inference endpoints, storage. 4Mica lets it pay on credit from one pool and settle net exposure once per epoch.
When agents transact with each other at high frequency, on-chain settlement per call is unworkable. 4Mica natively nets bilateral flows and collapses them into one settlement.
Charge per API call using standard x402 headers — no SDK required on the client side. Works with existing HTTP clients. Add 4Mica middleware to enable credit and batch settlement.
Build a payment rail that aggregates millions of micro-transfers, earns yield on float, and settles net positions on-chain. The same primitive banks use — but permissionless.
Ecosystem
4Mica is not a new protocol stack. It is a credit layer on top of production infrastructure.
The HTTP payment standard 4Mica extends with a credit layer. Any x402-compatible client works out of the box.
All collateral routes directly to Aave. Deposits earn APY continuously — your payment infrastructure generates return.
Net positions settle on-chain via EVM-compatible contracts. One transaction per settlement window, cryptographically enforced.
Non-custodial
You own your collateral. 4Mica never holds funds.
Open-source core
Contracts and SDKs are public on GitHub.
Testnet live
Deposit, spend, and earn on Sepolia today.
Integration
Works with your existing HTTP client. No contract changes. No new wallet. Fully x402-compatible.
Security
The protocol is designed so that trust is enforced by math and contracts — not by 4Mica.
Non-custodial by design
Your collateral is in Aave. Your guarantees are on-chain. 4Mica is the coordination layer — it cannot move your funds.
Collateral stays in Aave
Deposits go directly to Aave — not to 4Mica. Users can withdraw at any time. 4Mica never holds funds.
BLS-signed guarantees
Every payment is backed by an EIP-712 signed guarantee with domain separation. Cryptographic proof exists for every spend.
On-chain enforcement
If a payer defaults, recipients claim collateral directly from the contract. No trusted intermediary. No custodian risk.
AccessManaged + Pausable
Role-based access control, emergency pause, and reentrancy guards on all critical contract flows.
FAQ
Standard x402 settles every payment on-chain, one transaction per request. 4Mica adds a credit layer: agents sign off-chain guarantees and spend against pooled collateral. Settlements are batched and happen once per window — orders of magnitude fewer transactions.
A tab is a credit session opened by the recipient (POST /tabs). It has a tabId, TTL, and version. Individual spends within the tab are identified by a reqId that increments with each signed guarantee.
An EIP-712 signed claim the payer attaches as an X-PAYMENT header. It commits to tabId, reqId, amounts, addresses, and timestamp. The facilitator verifies the signature and issues a BLS-signed certificate for on-chain settlement.
Stablecoin deposits route through Aave via depositStablecoin(). The protocol holds aTokens on your behalf. APY accrues continuously and offsets the cost of payments.
Users call payTabInERC20Token() after 7 days. If they don't, the recipient's on-chain claim window opens at day 14 (remunerationGracePeriod) and closes at day 21 (tabExpirationTime).
V2 guarantees use ERC-8004's ValidationRegistry. The payer signs a guarantee committing to a specific validator, agent, score threshold, and job hash. If the validation fails on-chain, remunerate() reverts and collateral stays locked. Validators post a 0–100 score on-chain.
Call requestWithdrawal() to start the timelock, then finalizeWithdrawal() after the withdrawalGracePeriod (default 22 days). A 6-hour synchronizationDelay prevents race conditions with open tabs.
ETH and stablecoins. USDC and USDT are enabled by default. Other ERC-20s can be configured by the operator.
Yes. 4Mica is x402-compatible. Wrap your existing fetch or requests client with the 4Mica scheme adapter — one line of code. No changes to your server or HTTP logic.
Start building
Add a credit layer. Batch thousands of payments. Settle once. Your collateral earns yield while your agents scale.
1 tx
settlement
~0
gas per call
APY
on collateral