YieldContractFactory

YieldContractFactory creates BT/CT pairs for a given FW and expiry, using split-code deployment for CT.

circle-info

Source: src/fira_bonding/core/YieldContracts/YieldContractFactory.sol

Contract summary

Creates BT/CT pairs for a given FW and expiry. BT is deployed with Create2, CT with the split-code factory pattern (because CT bytecode exceeds 24KB).

Validations

  • Expiry must be in the future and divisible by expiryDivisor

  • Duplicate FW+expiry pairs revert

Storage

After deployment, the factory stores lookup mappings:

  • getBT[FW][expiry] / getCT[FW][expiry] — Address discovery

  • isBT[addr] / isCT[addr] — Validation

Fee configuration

  • interestFeeRate and rewardFeeRate (max 20% each)

  • treasury address for fee collection

  • liquidityInjector address, propagated to BT on creation

Initialization

After deployment, BT is initialized with the CT address, establishing the one-to-one pairing.

Last updated