Events & Indexing

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.

circle-info

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.

Role buckets

Bucket
Full name
Market

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

Source contracts

Contract
Events defined in
Emitted by

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

Pages

Last updated