Prototype · Solana devnet Context: built for Encode Club's Solana Hackathon 2026. Winners are announced on .

Stint

Pay for time on a live connection. Get back what you don't use.

Stint lets an AI agent rent time on a live connection, such as a data stream, and get back the time it doesn't use. The agent pays once over x402 to open a session. A Solana program pays the seller as the seconds pass, and when the agent closes early, it refunds the rest on-chain. Stint works end to end on Solana devnet, and you can run a session from Claude Desktop against the live demo.

The problem

x402 is built for one payment per request: the client asks, the server answers "402 Payment Required", the client pays, and the resource comes back. Many things an agent needs are not single requests. A market data feed or a stream of on-chain events is a connection that stays open, and what it is worth depends on how long the agent stays connected.

Paying for a fixed block up front means paying for time the agent may not use. Paying for every message turns every message into a payment. Neither suits an agent that doesn't know in advance how long it will need the connection.

What we built

An open-source payment layer for long-lived connections. On the seller's side there are four parts:

  • A Solana program that holds each session's deposit in a vault of its own and settles it by the chain's clock.
  • A new x402 scheme, elapsed, where the offer is a price per second with a minimum and a maximum.
  • A facilitator that checks each payment against its offer before anything is signed, then settles it through Kora, which pays the transaction fees.
  • A gate: middleware that sits in front of the connection and ends it when the paid time runs out.

On the buyer's side there is a client library that enforces spending limits in code, and an MCP server that gives any MCP host, such as Claude Desktop, the tools to open, top up and close sessions.

The live demo sells a WebSocket stream of Solana account changes at 0.001 USDC a second, on devnet. An owner can also fund an agent from an allowance of the Solana Foundation's Subscriptions & Allowances program: a budget per period, enforced on-chain, which the agent cannot raise.

How it works

  1. The agent asks the seller for a session. The seller answers "402 Payment Required" with an offer: a price per second, the time on offer, and a minimum and a maximum.
  2. The agent signs one transaction that moves its USDC into the session's vault and opens the session. Kora pays the fee, so the agent's wallet holds only USDC.
  3. The facilitator checks the payment against the offer and settles it, and the gate opens the connection.
  4. Data flows through the gate until the paid time runs out, and then the gate closes the connection. The agent can top up before that to keep going.
  5. If the agent closes early, one transaction pays the seller for the time used (at least the minimum the seller set) and refunds the rest to the account the deposit came from.

Engineering highlights

Payment and refund in one transaction

The close pays the seller and refunds the buyer together, by the chain's clock. Nobody has to remember to send a refund later.

The agent needs no SOL

Kora pays the fees through the facilitator, so an agent can open, top up and close a session holding only USDC.

Limits in code, not in the prompt

The client enforces its spending limits whatever a seller offers or a model asks for.

A budget the agent cannot raise

With allowance funding, each payment is pulled from the owner's budget in the same transaction, and the program refuses any pull past the period's cap.

Closes that don't depend on us

If the gate or the facilitator is down, the client can still close the session and get its refund. End-to-end scenarios cover each case.

Verifiable build

The program deployed on devnet matches what anchor build --verifiable produces from the repository, byte for byte.

How it was built

One senior engineer directed AI coding agents against a written system specification. The build was cut into stages, and each stage got its own plan, written once the stage before it was done. A stage counted as finished only when its end-to-end scenarios passed, every earlier scenario still passed, and CI was green. All 35 scenarios were written down on the first day as "pending", so the report always showed how far the build had come.

CI runs 1,311 tests on every change: the program's Rust tests, the unit and integration tests of every package, and an end-to-end package that starts a local Solana network for each test file. A separate job runs the end-to-end scenarios on a local network. The work went through 33 reviewed pull requests.

Status, stated plainly

Prototype · Solana devnet

Stint works end to end on Solana devnet with test USDC, and was released as v0.1.0 on . Payments and their refusals, early closes and refunds, expiry, top-ups, fallback closes, session tokens and allowance funding all pass. That is 25 of the specification's 35 end-to-end scenarios, on a local network and on devnet.

The other 10 scenarios, and what a mainnet release still needs, are open issues in a public milestone. The mainnet items include a settlement store that survives restarts, rate limits on the facilitator, moving the program's upgrade authority to a multisig, and an independent security review.

The program is upgradeable on devnet. Stint has not handled real money.

As of .

Verify it yourself

  1. The program is on devnet Open program 5iCYPq…3qESvr on Solana Explorer (devnet).
  2. What runs is what's published Follow "Deploying to devnet" in the README. The deployed program and the verifiable build both hash to 0412176d9fae34018d7284995aced3c1e502780a22f026ebd1dcbae7b6d38c0a
  3. Run a session yourself The live demo guide runs a session in Claude Desktop against the seller on devnet, with the extension from the v0.1.0 release. Nothing to build.
  4. An early close refunds the rest The demo video shows a run on devnet: 44 seconds used out of 200 paid, and 0.156 USDC refunded at the close.
  5. The tests pass The latest CI run on main passed 28 program, 1,145 package and 138 end-to-end tests, and 25 end-to-end scenarios.
  6. What's missing is public The Production release milestone lists every missing piece, with a checklist in issue #44.

Skills demonstrated

Need this level of rigour on your idea?

Tell us about your idea. We'll tell you honestly how we would build it, and whether we're the right fit.