LV / LUCA VALENTEON-CHAIN AND MACRO RESEARCH

Code & data

What it is

Eight plain questions about a protocol

How to use it

git clone https://github.com/lucavalente-research/defi-observatory.git
cd defi-observatory
python -m venv .venv && . .venv/bin/activate
pip install -e ".[test]"
pytest
python examples/quick_tour.py

Python 3.9 or later. No dependencies besides the standard library. The tests run on small made-up data and on real cases saved with the code.

from defi_observatory import decomposition

start = {"ETH": (10, 20_000.0), "USDC": (5_000, 5_000.0)}   # token: (quantity, value in USD)
end = {"ETH": (12, 36_000.0), "USDC": (4_000, 4_000.0)}
out = decomposition.decompose(start, end)
out["price_effect_usd"], out["flow_effect_usd"]             # (10000.0, 5000.0)

A real example

8 Oct 2026

SOL deposited in Marinade Liquid Staking fell 2.4% in 30 days; value locked +9.6%

SOL deposited in Marinade Liquid Staking fell 2.4% in 30 days; value locked +9.6%
Marinade Liquid Staking's value locked went from $242.7M to $266.0M in the 30 days to 8 Oct 2026 (+9.6%). Token prices account for +12% of the change and net deposits for −2.7%. Source: DefiLlama.

Links

Open data · Backtests v5