Skip to content
ZJ

Case study /08 · Shipped · maintained

CarbonMarketsHQ

FinTech · Carbon Markets · Blockchain · Full-Stack

Financial and carbon-market tools designed around reliable data, valuations and operational workflows.

CarbonMarketsHQ builds software for a market where the underlying asset — a carbon credit — is priced across registries, vintages and currencies that rarely agree with each other.

  • React
  • Next.js
  • TypeScript
  • Python
  • PostgreSQL
  • REST APIs
  • Hedera Guardian
  • Tokenized credits
CarbonMarketsHQ end-to-end valuation flow: market data is ingested and normalized, a price resolved, FX converted through one audited path, the valuation computed, then moved through transaction workflow into the portfolio view.

Context

Traders, project developers and analysts need one place where portfolio values, market prices and transaction records are consistent. Spreadsheets were the incumbent, with all the silent-error risk that implies.

Problem

Valuations combined market data of varying freshness with foreign-exchange rates and unit conversions. Any inconsistency — a stale rate, a double conversion, an ambiguous vintage — surfaces as a wrong number that someone might trade on.

Constraints

  • Financial data correctness was non-negotiable; silent failure modes had to be designed out.
  • External data sources delivered on their own schedules and formats, not ours.
  • The platform was live: changes shipped into a system with active users and standing data.
  • Multi-currency support had to be exact about when and how conversion happened.

Responsibilities

  • Frontend features in React and Next.js, from data-dense tables to valuation views.
  • Python services for valuation computation and data ingestion.
  • Foreign-exchange conversion layer with explicit rate provenance.
  • API design for portfolio, pricing and transaction resources.
  • Transaction workflow implementation and state modeling.
  • Integration with registry data and tokenized carbon-credit infrastructure in the Hedera Guardian ecosystem.
  • Ongoing production maintenance, debugging and hardening.

Architecture

  • A Next.js frontend consumes typed APIs backed by Python services and PostgreSQL.
  • Valuations are computed server-side from versioned inputs — price, FX rate and quantity each carry their source and timestamp.
  • FX conversion is centralized in one service path; nothing else in the codebase is allowed to multiply by a rate.
  • Transactions move through an explicit state machine so operational workflows are auditable step by step.
  • An integration layer reconciles platform records against registry and tokenized-credit state, so off-chain valuations and on-chain holdings can never silently disagree.

Key decisions

  • Store money as exact decimals with currency codes end-to-end; floats never touch financial values.
  • Record the FX rate used on every valuation row instead of recomputing historically — auditability beat storage cost.
  • Prefer boring, observable batch ingestion over streaming for market data whose sources update daily anyway.
  • Type the API boundary strictly so frontend and backend disagreements fail in CI, not in production.

Implementation

  • Valuation endpoints compose price resolution, FX conversion and quantity math in one audited code path with structured logging.
  • Ingestion jobs validate and normalize external market data before it can enter pricing tables.
  • Data-dense frontend views use server-driven pagination and column-level formatting rules per unit and currency.
  • Workflow transitions emit events consumed by notifications and audit views.

Performance

  • Portfolio views aggregate in SQL close to the data rather than in application memory.
  • Hot pricing lookups are indexed by instrument and date, keeping valuation queries flat as history grows.
  • Frontend tables virtualize long result sets to keep interaction latency low.

Outcomes

  • Valuation and FX logic became a single trusted code path with full provenance.
  • Operational teams run transaction workflows in the platform instead of spreadsheets.
  • The system has remained maintainable through sustained feature development in production.
  • [PLACEHOLDER — add real volume/value figures here if the client approves publication.]

Lessons

  • In financial software, provenance is a feature: every number should be able to explain itself.
  • Centralizing dangerous operations (like FX conversion) is worth more than any code-review checklist.
  • Production maintenance is product work — reliability compounds into user trust.

Software Architecture

Seven-stage flow from fragmented market data to an auditable portfolio number. 1. Market ingestion: registry and price feeds arrive on their own schedule through observable batch jobs, validated before they can enter pricing tables. 2. Normalize and store: units, vintages and registries are reconciled into canonical instruments, held as exact decimals with source and timestamp. 3. Price resolution: the right price for the right date via an instrument-and-date index, with freshness recorded and no silent fallback. 4. FX conversion: exactly one code path is allowed to multiply by a rate, centralized in a service, with rate provenance stored and never recomputed later. 5. Valuation compute: price, rate and quantity combine in one audited path over versioned inputs with structured logging and decimals end to end. 6. Transaction workflow: an explicit state machine from draft to settled, emitting events on transition for auditable operations. 7. Portfolio view: numbers that can explain themselves, aggregated in SQL, shown in virtualized tables with per-unit formatting. A provenance loop keeps price source, FX rate used and timestamp on the valuation row, and a reconciliation band checks registry records and tokenized credit state in the Hedera Guardian ecosystem so off-chain and on-chain can never silently disagree.
Architecture diagram in four columns. Frontend: a Next.js app for valuation and portfolio views, data-dense tables with server paging and virtualization, a typed API client so frontend and backend disagreements fail in CI, and workflow UI for transaction state transitions. Python services: ingestion jobs that validate and normalize feeds, a pricing service resolving by instrument and date, an FX service that is the only conversion path in the codebase, and a valuation engine composing them in one audited path. Data layer: PostgreSQL holding portfolios, prices and transactions, exact decimals carrying a currency code on every value, rate history storing the rate used per row, and audit events recording workflow lineage. External sources: market feeds on a daily cadence in mixed formats, registries supplying credit records and vintages, Hedera Guardian for tokenized credit state, and a reconciliation step comparing off-chain against on-chain. A closing band lists the correctness controls: silent failure designed out, dangerous operations centralized, strict API types and provenance on every number.