Events & Indexing
Event tracking and position measurement across Fira markets, covering the 8 role buckets and their on-chain event sources.
Last updated
Event tracking and position measurement across Fira markets, covering the 8 role buckets and their on-chain event sources.
Fira tracks user positions across 8 role buckets using weekly time-weighted average (TWAP) exposures. Positions are piecewise-constant, updated on relevant on-chain events. This section documents the event-to-role mapping and position share formulas for analytics and integrations.
Positions are piecewise-constant between events. The indexer must track each event to maintain an accurate TWAP of user exposure per role bucket over each epoch.
BFR
Borrow Fixed Rate
Fixed Rate
BT
Held BT
Fixed Rate
CT
Coupon Token holders
Fixed Rate
LP
Liquidity Providers
Fixed Rate
VRB
Variable Rate Borrow
Variable Rate
VRL
Variable Rate Lend
Variable Rate
USLC
USL Collateral
USL Migrator
USLL
USL Loan
USL Migrator
LendingMarket
lib/fira-lending-market/src/libraries/EventsLib.sol
LendingMarket.sol
BondToken
ERC20 events via FiraERC20
BondToken.sol
CouponToken
Custom + ERC20 events
CouponToken.sol
FiraMarket
src/interfaces/IPMarket.sol
FiraMarket.sol
SisuVault
ERC4626 Deposit/Withdraw
SisuVault.sol
Event Table — Corrected event-to-role mapping with issue analysis
Position Measurement — Per-role position share formulas and function calls
Last updated