PAYPERPROOF

LIVE ON EVM

A smart contract holds the ETH. Every storage proof written on-chain releases one chunk to the provider, and whatever stays unproven at the deadline goes back to the client.

BLOCK #18,402,113TX 0x0000…0000

How it works

Four calls.
One contract.

The escrow reads the proof count straight from the verifier on the same chain, so payment lands in the same step as the proof.

  1. 01

    SP opens a proof set

    The storage provider registers a proof set on the PDP verifier and shares its ID with the client.

    verifier.createProofSet()
  2. 02

    Client locks ETH

    The deal is rejected unless the SP owns that proof set. The ETH is split evenly across chunks.

    escrow.createDeal(sp, proofSetId, chunks, duration, { value })
  3. 03

    Prove, then claim

    Every proof made after the deal starts unlocks one chunk. Anyone can call claim; the ETH only ever goes to the SP.

    verifier.submitProof(proofSetId)
    escrow.claim(dealId)
  4. 04

    Refund after the deadline

    Once the deadline passes, claim stops working and refund sends every unpaid chunk back to the client.

    escrow.refund(dealId)

Fewer moving parts,
fewer ways to break.

The first version bridged Filecoin to Starknet through a relay and a Lit signature. Most bugs found in review lived in that bridge. Putting both on one chain deleted it.

Before

Filecoin proofRelayLit signatureStarknet escrow

Three chains, a server and a signing network between a proof and a payment.

After

One EVM chain
PDP verifierSLAEscrowSP wallet

The escrow calls proofCount() itself. Nothing to relay, nothing to sign.

Permissionless

Anyone can trigger a payout

The money can only go to the deal's SP, so it does not matter who calls.

Deadline

Unpaid chunks go home

3 paid to SP5 back to client

Contract

Small enough
to read in one sitting.

Four functions, no owner, no pause switch, no upgrade proxy. State changes before ETH moves, and each proof can be claimed once.

  • Proofs made before a deal starts never count toward it.
  • Payout is capped at the number of chunks you paid for.
  • The bundled verifier is a mock. Swap in Filecoin's PDP verifier on FEVM.
SLAEscrow.solsolidity 0.8.24
1function createDeal(address sp, uint256 proofSetId,
2 uint64 numChunks, uint64 slaDuration)
3 external payable returns (uint256 dealId);
4
5function claim(uint256 dealId) external; // anyone
6function refund(uint256 dealId) external; // after deadline
7
8function getDeal(uint256 dealId)
9 external view returns (Deal memory);

Lock ETH.
Pay only for what gets proven.

Create a deal

Runs on a local Hardhat chain or any EVM network