Rehypothecation
The Rehypothecation Module controls how FW tokens balance between idle reserves and yield-generating vault deployments.
Overview
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.
How it works
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
Triggering rebalance
triggerRehypothecation()— Callable by anyone. Deposits excess to vault ifidleRatio > phiMax, or withdraws from vault ifidleRatio < phiMin. No-ops if the ratio is within bounds.forceRehypothecation()— Owner-only. Always rebalances tophiTargetregardless of current ratio.
Example
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 upAfter rebalance: ~20 USDC idle, ~80 USDC in vault
Key features
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 boundsOwner-controlled force rebalance — Protocol can rebalance to target at any time
Related contracts
RehypothecationModule.sol— Contract detailsFWBase.sol— FW base contract that uses the module
Last updated