YieldContractFactory
YieldContractFactory creates BT/CT pairs for a given FW and expiry, using split-code deployment for CT.
Last updated
YieldContractFactory creates BT/CT pairs for a given FW and expiry, using split-code deployment for CT.
Source: src/fira_bonding/core/YieldContracts/YieldContractFactory.sol
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).
Expiry must be in the future and divisible by expiryDivisor
Duplicate FW+expiry pairs revert
After deployment, the factory stores lookup mappings:
getBT[FW][expiry] / getCT[FW][expiry] — Address discovery
isBT[addr] / isCT[addr] — Validation
interestFeeRate and rewardFeeRate (max 20% each)
treasury address for fee collection
liquidityInjector address, propagated to BT on creation
After deployment, BT is initialized with the CT address, establishing the one-to-one pairing.
Last updated