Inspiration

Carbon markets only work if a credit means one real tonne removed, once. Today the same forest can be sold twice, evidence gets recycled across projects, and verification is slow and opaque. Buyers can't tell good credits from bad ones. We built CarbonTrust to make double counting structurally impossible and fraud visible before credits exist.

What it does

CarbonTrust is an on-chain carbon credit registry with a built-in risk engine.

  • Double counting reverts on-chain. Each project claims geohash cells. If any cell overlaps an existing project, or an evidence hash is reused, registration fails at the contract level.
  • Credits have a full lifecycle. Issued, transferred, and retired. Retiring burns the credits and emits a public receipt, shown as a printed registry-style certificate.
  • Every project gets a risk score (0-100). Signals include credits-per-hectare vs. methodology benchmarks, z-score anomaly detection, area inflation, protected-area overlap, reused documents, and vintage anomalies. Each score comes with plain-language reasons and a report hash.
  • Public dashboard. A Leaflet map, a credit explorer with lifecycle timeline, red/amber/green risk badges, and a live overlap-alert feed.
  • One-click demo. Register a legitimate project, watch a duplicate get rejected, see a fraudulent project flagged, then retire a credit and get a receipt.

How I built it

  • Contracts: Solidity ERC-1155 registry with Hardhat. Each project claims precision-6 geohash cells, and registration reverts if any cell overlaps an existing project or an evidence hash is reused. Retiring burns credits and emits a public receipt.
  • Testing: 10 on-chain invariants, 100% line coverage, and tests for 8 double-count attacks (same land under a new ID, partial overlap, reused evidence, double issuance, selling after retirement, double retirement, and more).
  • Risk engine: Deterministic TypeScript with no external API calls, so results are reproducible and free to run. Rules plus z-score anomaly detection produce a 0-100 score, plain-language reasons and a report hash.
  • Frontend: Next.js, Tailwind, and Leaflet, designed as a "field ledger" public-record interface.
  • Network: Local Hardhat for the demo, targeting Base Sepolia.

Challenges I ran into

  • Solidity's "stack too deep" error forced me to restructure registration around a struct.
  • Efficient on-chain overlap checks: I used precision-6 geohash cells to keep gas manageable.
  • Making the risk engine deterministic (no clock or network dependence) so the same input always gives the same score.
  • Deciding what belongs on-chain (hard guarantees) versus in explainable scoring (judgment calls).

Accomplishments that I'm proud of

  • Double counting is structurally impossible, not just flagged: the contract reverts it.
  • All 8 double-count attack scenarios are covered by tests, with 100% line coverage.
  • Risk scores come with reasons a non-technical buyer can read, plus a hash so reports can't be quietly changed.
  • A one-click demo walks the full story: legitimate registration, duplicate rejected, fraud flagged, credit retired, receipt printed.
  • The risk engine is free to run and fully reproducible.

What I learned

Transparency needs both layers: hard on-chain guarantees for what can be enforced, and explainable scoring for what can't. I also learned how much smart-contract design comes down to data representation: geohash cells turned a hard geometry problem into cheap set membership.

What's next for CarbonTrust

  • Deploy to Base Sepolia, then move to an L2 for low fees.
  • Add satellite-based evidence verification and IoT data as extra risk signals.
  • Integrate with existing registry APIs so Verra and Gold Standard can mirror issuances as an independent double-count check.
  • Add auditor and buyer tooling to verify any credit's history and risk score without trusting an intermediary.

Track alignment

Carbon Markets & Emissions Transparency. Blockchain-based credit verification, smart contracts that prevent double counting, and a transparent public registry.

Scalability and adoption

  • Geohash cell sets scale to large projects, and the registry can move to an L2 for low fees.
  • Registries like Verra and Gold Standard could mirror their issuances into CarbonTrust as an independent double-count check.
  • The risk engine can later take satellite and IoT data as additional signals.
  • Buyers and auditors can verify any credit's history and risk score without trusting an intermediary.

Built with

Solidity, ERC-1155, Hardhat, TypeScript, Next.js, Tailwind CSS, Leaflet, Base Sepolia

Built With

Share this project:

Updates

Submission history