Inspiration

Carbon credits are supposed to pay people to protect forests. In practice, nobody can easily check them. The same hectare can back credits in several programmes, claims are verified by a consultant once every few years, and a forest that is cleared after issuance keeps its credits. Meanwhile, the people best placed to restore land, smallholder farmers in West Africa, are priced out by certification costs. I'm building from Benin, where agroforestry is growing fast and this gap is very visible. I wanted to see whether a ledger plus free satellite data could make a credit something you can check, not just trust.

What it does

TerraProof is a carbon registry with three rules enforced by code:

  1. One cell, one owner. A parcel is cut into geohash cells of about 38 × 19 m and written to the ledger. A smart contract rejects any overlapping claim, so double counting is impossible by construction.
  2. Satellite evidence. An oracle reads live Sentinel-2 imagery over the polygon, computes NDVI, and proposes the credits the vegetation supports. The hash of the report is anchored on-chain next to the credits.
  3. Living credits. Monitoring never stops. If vegetation collapses, the parcel is frozen (no transfer, no retirement) and the credits can be revoked. Buyers retire credits on-chain and get a public proof page with a QR code.

How I built it

  • Smart contract: Solidity (OpenZeppelin ERC-1155 + AccessControl) deployed on Base Sepolia, with an on-chain per-cell issuance ceiling that bounds what a compromised oracle could ever mint. 17 Hardhat tests cover double counting, ceilings, freezing, revocation and retirement.
  • MRV oracle: Next.js route handlers query Microsoft Planetary Computer (Sentinel-2 L2A), compute the median NDVI over the polygon, and hash the report.
  • Web app: Next.js, React, Tailwind and Leaflet on satellite imagery. One Registry interface has two back-ends: a browser simulation that applies the exact same rules as the contract (so anyone can try it without a wallet, still on live satellite data), and an on-chain adapter for the deployed contract.
  • Verified end to end: a script drives the whole lifecycle against a local chain, the real oracle route and live data, and I re-ran the full flow on the deployed site.

Challenges I ran into

  • Turning a hand-drawn polygon into a deterministic set of cells, so two different drawings of the same land collide.
  • Keeping evidence checkable from the chain alone: the full satellite report travels in the issuance event.
  • Real-world friction: the public RPC I first used capped eth_getLogs to 200 blocks and silently broke the on-chain view, and sequential RPC calls made the first load take over 30 seconds. Switching RPC and reading in parallel brought it to under 2 seconds.
  • Being honest about the science. NDVI measures vegetation vigour, not carbon stock, so the app says clearly that this is a proof of concept.

Accomplishments that I'm proud of

  • Double counting is blocked by the contract, not by policy.
  • Credits that can be switched off when the forest disappears.
  • The full lifecycle runs on real satellite data, and anyone can click through it in minutes, with or without a wallet.

What I learned

Trust in carbon markets is a data-integrity problem as much as a financial one. A ledger alone doesn't fix it: it needs independent physical evidence tied to every unit.

What's next

  • A registry of registries to catch double counting across Verra, Gold Standard and national registries.
  • Peer-reviewed MRV methodologies (SAR for cloudy regions, allometry, ground truth, permanence buffers).
  • A multi-verifier oracle with staking and slashing instead of a single trusted one.
  • Low-cost onboarding for smallholders in West Africa, and transparent units for Article 6 and COP31.

Built With

Share this project:

Updates

Submission history