Skip to main content

Protocol financial statements from chain data

What are protocol financial statements?

Protocol financial statements are income statements for a blockchain or onchain app: the fees users paid, the share the protocol kept as revenue and what it paid out as costs such as rewards and incentives, period by period.

Research firms and asset managers build them to compare protocols the way they compare companies, from a source anyone can check.

Goldsky decodes the fee, reward and payout events from the protocol’s contracts and lands every flow in your warehouse with its block time; pricing each flow, classifying it and totaling the statement follow your method.

Who publishes protocol financial statements?

Crypto research and data firms, digital asset managers, and analysts who value protocols on their fees and revenue.

How a protocol financial statement gets built from chain data

The diagram follows one fee from the moment a user pays it into the protocol’s contracts to the statement analysts use to compare protocols. Your setup may differ.

Goldsky, step 2: TurboDecode fee eventsFees, rewards and payouts by contract
Blockchains, step 1: Fees are paidUsers pay into the protocol’s contracts
Your business, step 4: Price each flowYour price data, joined in the warehouse
Goldsky, step 3: TurboLand them in your warehouseEvery flow, with its block time
Your business, step 5: Classify and totalRevenue and costs per period, by your method
Your business, step 6: Publish the statementAnalysts compare protocols period by period
  • Goldsky

How to build protocol financial statements

A pipeline decodes the fee, reward and payout events from a protocol’s contracts, including their full history, and lands each flow in your warehouse with its block time. You value, classify and total the flows there by your own method.

What you’ll need

  • Goldsky Turbo
  • The contract addresses and ABIs of the protocols you cover
  • A data warehouse or object storage your query engine reads
  • Historical token price data
  • A written method for classifying fees, revenue and costs
  1. Collect fees from users

    A protocol earns when users pay fees into its contracts, the way a company earns from sales.

    Fees are paid in many tokens and split between parties such as liquidity providers, the treasury and token holders. Those splits decide what counts as the protocol’s revenue, so you need the events that record each one.

  2. Decode fee, reward and payout events

    Handled by Goldsky Turbo

    Each flow has to be read from the contract events that record it before it can be counted.

    Every fee, reward and payout event is decoded with the contract’s interface (ABI) into an amount, token and recipient. A contract you leave out, such as a new version of the protocol, quietly understates its income.

    With Goldsky, a Turbo Pipelines SQL transform decodes each contract’s logs with _gs_log_decode and its ABI, which it can fetch from a block explorer with _gs_fetch_abi.

    Decode contract events (opens in a new tab)
  3. Land every flow in your warehouse

    Handled by Goldsky Turbo

    Statements cover past periods too, so you need the full history and every new flow in one place.

    Each flow lands with its block time and transaction, so any period can be rebuilt to the block. Flows have to cover the protocol’s whole history, or the first periods of a statement compare against nothing.

    Turbo Pipelines can write each flow as Parquet files to S3-compatible storage, partitioned by columns such as date for engines like Athena or DuckDB, and a one-time job mode pipeline can backfill history over a fixed block range.

    Write Parquet files to S3 (opens in a new tab)
  4. Value each flow in dollars

    Fees arrive in many tokens, so each one needs a dollar value from the time it was paid.

    Your warehouse joins each flow to your price data at its block time. Using today’s price for an old fee changes past periods every time the market moves.

  5. Classify and total by period

    An income statement sorts flows into fees, revenue and costs and adds them up for each period.

    Your method decides, for example, whether liquidity provider fees count as revenue or pass through, and whether token incentives are a cost. Write the method down and apply it the same way to every protocol, or comparisons across them mean nothing.

  6. Publish the statement

    Analysts compare protocols period by period, so statements go out in a consistent format.

    Each figure should trace back to the transactions behind it, so a reader can check any line. When you restate a period, after a method change or a missed contract, say what changed.

What you control

Your team
  • Value each flow in dollars
  • Classify and total by period
  • Publish the statement

Security and deployment

  • SOC 2 Type IIIndependently audited security controls.
  • Dedicated infrastructureSingle-tenant options for production workloads.
  • Data residencyCloud, on-premises or co-located.

Build protocol financial statements with Goldsky

We’ll map it to your systems and show you what Goldsky runs, so your team builds the product, not the pipelines underneath it.

© Endless Sky Inc. All rights reserved.

PrivacyTermsSecurity

System status