Rehypothecation
The Rehypothecation Module controls how FW tokens balance between idle reserves and yield-generating vault deployments.
Last updated
The Rehypothecation Module controls how FW tokens balance between idle reserves and yield-generating vault deployments.
FW tokens hold their underlying assets in two places: idle reserves (for instant redemptions) and an ERC-4626 vault (for yield generation). The RehypothecationModule defines the parameters that govern this balance.
Rehypothecation ensures FW always has enough idle liquidity for redemptions while maximizing yield by deploying the rest into the underlying vault.
The RehypothecationModule defines three parameters (in basis points):
phiMin
Minimum idle ratio — if idle drops below this, assets are withdrawn from vault
phiMax
Maximum idle ratio — if idle exceeds this, excess is deposited into vault
phiTarget
Target idle ratio — used by forceRehypothecation() to rebalance
triggerRehypothecation() — Callable by anyone. Deposits excess to vault if idleRatio > phiMax, or withdraws from vault if idleRatio < phiMin. No-ops if the ratio is within bounds.
forceRehypothecation() — Owner-only. Always rebalances to phiTarget regardless of current ratio.
If phiMin = 10%, phiMax = 30%, phiTarget = 20%:
FW holds 100 USDC total, 5 USDC idle (5% idle ratio → below phiMin)
Anyone calls triggerRehypothecation() → vault withdraws USDC to bring idle up
After rebalance: ~20 USDC idle, ~80 USDC in vault
Automatic yield optimization — Excess idle funds are deployed for yield
Redemption guarantees — Minimum idle ratio ensures users can always redeem
Permissionless triggers — Anyone can call triggerRehypothecation() when out of bounds
Owner-controlled force rebalance — Protocol can rebalance to target at any time
RehypothecationModule.sol — Contract details
FWBase.sol — FW base contract that uses the module
Last updated