All packages
liquidity_party

liquidity_party

timolson
v0.1.0/17 downloads/Repository

Package ref

liquidity-party@v0.1.0

Run package

Start block
24535806, the module's first block

This module reads a store, which starts empty at the module's first block: it runs from there, so its output is from then, not from the chain head. Any later block would first need the store rebuilt up to it.

README

Liquidity Party Substreams

Substreams package that indexes Liquidity Party LMSR-backed multi-asset pools on Ethereum mainnet and outputs per-pool TVL and APY metrics.

Outputs

map_pool_metrics (BlockMetrics)

Emitted on every block that has pool activity. Each PoolMetrics entry contains:

FieldDescription
balances[]Current token balances in raw token units (one per pool token)
fees_24h[]LP fees earned in the last ~24h per token
apy_bps[]Per-token APY in basis points
quote_tvlTVL in token[0] units: balance[0] × num_tokens
quote_fees_24h24h fees converted to token[0] using pool-internal pricing
quote_apr_bpsSimple annualized APR in bps (365.24 days/year)
quote_apy_bpsCompound APY in bps with daily compounding (365.24 days/year)

All quote-adjusted values use the pool's own internal price (balance[0] / balance[n]), since every pool maintains equally-valued inventory and uses a stablecoin as token[0].

Usage

# Build WASM
make build

# Create .spkg bundle
make pack

# Stream against mainnet (requires SUBSTREAMS_API_TOKEN)
make run

# Publish to Substreams.dev registry
make publish

Factory

PartyPlanner deployed at 0x7692e502FB8cE1c13A97DbBE380Be05A545ee0a9 (block 24535806).

Modules

Execution graph

8 modules
store

store_balances

from #24535806

Store value

bigint

Update policy

add

store

store_cumulative_fees

from #24535806

Store value

bigint

Update policy

add

store

store_killed_pools

from #24535806

Store value

int64

Update policy

set