Event Table

Corrected event-to-role mapping for the Fira incentive indexer, with analysis of issues found in the original table.

Fixed Rate Market

Role
Event
Contract
Purpose

BFR

Borrow

LendingMarket

Position increase

BFR

Repay

LendingMarket

Position decrease

BFR

Liquidate

LendingMarket

Forced position closure

BFR

Swap

FiraMarket

BFR qualification check

BT

Transfer

BondToken

All balance changes (mint, burn, transfer)

BT

Borrow

LendingMarket

For "subtract borrowed" rule

BT

Repay

LendingMarket

For "subtract borrowed" adjustment

CT

Transfer

CouponToken (ERC20)

All balance changes (mint, burn, transfer)

CT

RedeemInterest

CouponToken

Interest redemption

LP

Mint

FiraMarket

LP creation

LP

Burn

FiraMarket

LP destruction

LP

Transfer

FiraMarket

LP token transfers

Variable Rate Market

Role
Event
Contract
Purpose

VRB

Borrow

LendingMarket

Position increase

VRB

Repay

LendingMarket

Position decrease

VRB

AccrueInterest

LendingMarket

Shares-to-USDC conversion update

VRB

Liquidate

LendingMarket

Forced position closure

VRL

Deposit

SisuVault

Position increase (ERC4626)

VRL

Withdraw

SisuVault

Position decrease (ERC4626)

VRL

Transfer

SisuVault

Vault share transfers

USL Migrator

Role
Event
Contract
Purpose

USLC

SupplyCollateral

LendingMarket

Position increase

USLC

WithdrawCollateral

LendingMarket

Position decrease

USLC

Liquidate

LendingMarket

Collateral seizure

USLL

Borrow

LendingMarket

Position increase

USLL

Repay

LendingMarket

Position decrease

USLL

Liquidate

LendingMarket

Forced position closure

Issues found and corrected

Change
Detail

Removed

BT / Mint / FiraMarket — wrong contract; FiraMarket.Mint is for LP tokens

Removed

BT / Burn / FiraMarket — wrong contract; same reason

Removed

CT / Mint / CouponToken — redundant with CT Transfer (from=0x0)

Removed

CT / Burn / CouponToken — redundant with CT Transfer (to=0x0)

Added

BFR / Swap / FiraMarket — required for BFR qualification per spec

Added

BFR / Liquidate / LendingMarket

Added

LP / Transfer / FiraMarket

Added

VRB / Liquidate / LendingMarket

Added

VRL / Transfer / SisuVault

Added

USLC / Liquidate / LendingMarket

Added

USLL / Liquidate / LendingMarket

Key corrections explained

BT Mint/Burn: Wrong contract (Critical) — The original table listed BT Mint/Burn on FiraMarket, but BT is created/destroyed by CouponToken.mintBC() / CouponToken.redeemBC(). FiraMarket Mint/Burn events are about LP tokens, not BT. The ERC20 Transfer event on BondToken already captures mints (from = address(0)), burns (to = address(0)), and transfers.

BFR qualification requires Swap — The spec states borrowers must be verified by tracking both the borrow event and a swap event plus USDC transfer. The Swap event from FiraMarket confirms the borrower actually swapped BT for USDC.

Liquidate event missingEventsLib.Liquidate fires on forced position closure and impacts BFR, VRB, USLC, and USLL. Without it, the TWAP will be incorrect for liquidated users.

Event signatures reference

LendingMarket (EventsLib)

BondToken / CouponToken (ERC20)

CouponToken (IBCToken)

FiraMarket (IPMarket)

SisuVault (ERC4626)

Implementation notes

  • Market ID filtering: All LendingMarket events carry Id indexed id. The indexer must filter by the correct market IDs to distinguish BFR vs VRB vs USLL markets.

  • No double counting: BT/CT held inside LP pool addresses or router addresses must be excluded from BT/CT buckets. Maintain a set of excluded addresses.

  • AccrueInterest for BFR/USLL: If position value must reflect accrued interest (not just principal), add AccrueInterest to those roles.

  • CT in LP pools: If external AMM pools exist for CT (not FiraMarket), additional pool-specific events would be needed.

Last updated