Trading Dev AcademyFree quant education

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

  1. Raw token amounts and economic event types
  2. Transaction gas in a reporting currency
  3. Minimum output and ordering risk
  4. Time-weighted reference prices
  5. Stale oracle health versus executable collateral value
  6. Bridge fragmentation and capital lock-up
  7. Inclusion, finality and conditional loss scenarios
  8. A reproducible on-chain economics study

Open the interactive module

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