Free module · Crypto & decentralized finance
On-Chain Markets: Data, Oracles and Execution
Separate transactions from economic activity and inclusion from final settlement.
event logs · gas · ordering · oracles · bridges · finality · audit
The building blocks
A chain records ordered state transitions. Turning those records into a trading dataset requires identities, units, availability times and an economic interpretation.
- Normalize events and reconstruct balances.
- Model ordering, fees and oracle availability.
- Verify settlement and compare net outcomes with a benchmark.
Lessons in this module
- Raw token amounts and economic event types
- Transaction gas in a reporting currency
- Minimum output and ordering risk
- Time-weighted reference prices
- Stale oracle health versus executable collateral value
- Bridge fragmentation and capital lock-up
- Inclusion, finality and conditional loss scenarios
- A reproducible on-chain economics study
Practice and apply
- Raw token amounts and economic event types — Raw amount 1250000; token decimals 6. Find displayed tokens.
- Transaction gas in a reporting currency — 150000 gas used, 20 gwei/gas, native token $2000. Find execution gas dollars.
- Minimum output and ordering risk — Quoted output 1000 tokens; permitted reduction .005. Find minimum output.
- Time-weighted reference prices — Price 100 for 30 seconds and 110 for 10 seconds. Find arithmetic TWAP.
- Stale oracle health versus executable collateral value — 100 collateral tokens at stress price $75, threshold .8, debt $7000. Find stress health.
- Bridge fragmentation and capital lock-up — $50000 capital, annual cost .12, delay 3 days, 365-day convention. Find lock-up cost.
- Inclusion, finality and conditional loss scenarios — Assumed reversal probability .001 and conditional unmatched-leg loss $5000. Find modeled expected loss.
- A reproducible on-chain economics study — Gross $120, gas $25, trade fees $10, capital lock cost $15, failed-leg loss $30. Find net dollars.
Work through the practice exercises · Quant development tools