Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

litvm-x402 — the first x402 payment on Litecoin

On July 17, 2026, an x402 payment settled on LitVM LiteForge (eip155:4441), Litecoin's EVM testnet — as far as we can tell, the first x402 payment in the Litecoin ecosystem (a search of coinbase/x402 issues, PRs, and code for litecoin/LTC/LitVM returned zero results that day, and a web sweep found no prior x402 work on any Litecoin chain).

One part is verifiable on-chain rather than a search claim: the canonical x402 proxy contracts did not exist on LiteForge before this deployment, and the exact proxy's transaction history begins with this settlement — so this is provably the first payment through the canonical x402 contracts on a Litecoin chain.

Settlement transaction: 0x50a0a16d3d6cea1acac757a2e13e01eeab00c8d08aecf16659875c51843a5a9f Block 30,502,631 · x402ExactPermit2Proxy.settle() · exact scheme, Permit2 asset-transfer method

x402 is the HTTP-402 machine-payments standard: a client hits a paid endpoint, gets 402 with payment requirements, signs a payment authorization, retries with an X-PAYMENT header, and the server settles on-chain and serves the resource. The payer spends zero gas at payment time — settlement gas is paid by the facilitator in zkLTC.

What's deployed on LiteForge (canonical CREATE2 addresses)

Contract Address
Permit2 (Uniswap canonical, pre-deployed by Caldera) 0x000000000022D473030F116dDEE9F6B43aC78BA3
x402ExactPermit2Proxy 0x402085c248EeA27D92E8b30b2C58ed07f9E20001
x402UptoPermit2Proxy 0x402015c795ecb48A360bDC6e35a2EaEb313a0002
MockGenericERC20 (test asset) 0x5366AFc92e84747132E88F2f88e9DfcD364117C0

The proxies were deployed unmodified from the x402 repo's contracts via its deterministic CREATE2 script, so they sit at the same addresses they occupy on other EVM chains. The Permit2 path works for any ERC-20 — no EIP-3009 stablecoin required — which is what makes x402 viable on a chain that doesn't have native USDC yet.

Reproduce

npm install --prefix demo
# create a faucet-funded facilitator wallet first:
#   cast wallet new --json > .dev-wallet.json && chmod 600 .dev-wallet.json
#   fund it at https://liteforge.hub.caldera.xyz
node demo/setup.mjs    # payer + merchant wallets, gas dust, token mint, one-time Permit2 approval
node demo/server.mjs   # x402-gated endpoint + facilitator on :4021
node demo/client.mjs   # 402 → sign → X-PAYMENT → 200 + on-chain settlement tx

Full transaction-level detail in PROOF.md.

Honest scope

  • The demo/ harness (~250 lines, viem) speaks the x402 v2 wire shapes but is not the full x402 SDK/facilitator stack. The production path is registering LitVM's mainnet chain id in a standard EVM x402 facilitator — a configuration change, not a protocol change.
  • Testnet only; LitVM mainnet is not live. The payment asset is a mock ERC-20 (LiteForge has no stablecoins today).
  • This repo makes no claims about LitVM traction or security — it demonstrates protocol compatibility, nothing more.

Author

Tony Jagodka (@DrVelvetFog) — also maintainer of sui-x402, a non-EVM x402 facilitator on Sui mainnet (non-custodial, zero-fee: sui-facilitator.onrender.com).

MIT licensed.

About

First x402 payment on Litecoin (LitVM LiteForge testnet) — proof + reproducible demo

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages