Skip to main content
The liquid keeper reserve automatically keeps the protocol’s liquid USDC reserve near its target reserve factor. It works alongside the rebalancer and farm keeper.

Why it exists

The rebalancer allocates capital between liquid and illiquid farms based on votes and lock durations. User redemptions can cause the liquid share to fall below the target reserve factor. The liquid keeper reserve:
  1. Unwinds eligible illiquid farms when the reserve is too low.
  2. Pauses new wrapping on those farms until the reserve reaches the target.
  3. Lets the rebalancer move the released USDC to the liquid side.

Key concepts

For example, with a 25% target and 20% lower bound: The hysteresis band prevents repeated withdrawals and reallocations when the reserve is slightly below the target.

Rebalancer integration

At the start of each rebalancer run, before the main allocation algorithm:
  1. The rebalancer calculates the current liquid reserve ratio.
  2. If the ratio is below the lower bound, the rebalancer:
    • Selects the eligible illiquid farm with the lowest 48-hour APY.
    • Calls automaticWithdraw to release USDC on that farm.
    • Withdraws the amount needed to reach the target, subject to the per-run cap.
  3. The standard rebalancer movements transfer the released USDC from the farm to liquid destinations, such as the mint controller or liquid farms.
automaticWithdraw runs before the standard movements so the released USDC is available to the allocation algorithm.

Farm keeper integration

When the liquid reserve ratio is in the hysteresis band:
  • The farm keeper does not wrap incoming USDC into the farm’s target asset. For example, Morpho Prime does not swap USDC for PYUSD or deposit PYUSD into the Morpho vault.
  • USDC remains idle on the farm until the ratio recovers or a rebalancer run moves it.
Wrapping resumes when the ratio reaches or exceeds the target.

Farm eligibility

Automatic withdrawals apply only to farms that opt in through configuration: The rebalancer ignores farms without this flag. It also skips paused farms and farms with withdrawals disabled.

automaticWithdraw farm integration

Each eligible farm type implements automaticWithdraw on its farm manager. The rebalancer calls it before standard movements. The method converts deployed positions back to USDC on the farm without sending funds to the mint controller. The rebalancer handles the subsequent transfer. For example, Morpho Prime:
  1. Unwraps vault shares to PYUSD.
  2. Swaps PYUSD for USDC.
  3. Leaves USDC on the farm.
The rebalancer then pulls that USDC through its standard liquid-side movements. Only farm integrations that can safely unwind to USDC onchain implement automaticWithdraw.

Configuration

Set the lower bound below the target to create the hysteresis band. Both values are configurable.

Execution flow

Safety

  • The per-run cap limits how much the system can unwind in one cycle.
  • The hysteresis band prevents oscillation between wrapping and unwrapping near the target.
  • Per-farm opt-in limits participation to configured farms.
  • Existing rebalancer guards still apply, including cooldowns, minimum and maximum movements, paused farms, and fake mode.