YieldContractFactory
YieldContractFactory creates BT/CT pairs for a given FW and expiry, using split-code deployment for CT.
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
expiryDivisorDuplicate FW+expiry pairs revert
Storage
After deployment, the factory stores lookup mappings:
getBT[FW][expiry]/getCT[FW][expiry]— Address discoveryisBT[addr]/isCT[addr]— Validation
Fee configuration
interestFeeRateandrewardFeeRate(max 20% each)treasuryaddress for fee collectionliquidityInjectoraddress, propagated to BT on creation
Initialization
After deployment, BT is initialized with the CT address, establishing the one-to-one pairing.
Last updated