The Public Allocator reallocates vault liquidity between Bend markets so borrows can succeed even when a market has insufficient supply. You call it to move liquidity from other markets into the target market in one transaction. You get deep, unified liquidity while keeping Bend’s isolated market risk. For concepts and flow, see Public Allocator.Documentation Index
Fetch the complete documentation index at: https://berachain-422fce37-feat-nodes-section-reno.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
For the contract interface, see the Public Allocator contract.
Core integration: reallocateTo
Call reallocateTo to withdraw from one or more source markets in a vault and supply the total to a single destination market in one atomic transaction.
Function signature
Parameters
- vault: MetaMorpho vault to withdraw from.
- withdrawals: Array of
Withdrawal(source market + amount). Must be sorted by market ID ascending.Withdrawal:marketParams(MarketParams for source market),amount(uint128).
- supplyMarketParams: Destination market (single market) that receives the total withdrawn amount.
Requirements
- Sorted withdrawals:
withdrawalsmust be ordered by market ID ascending. - Fee: Send the required ETH as
msg.value. Query the fee withfee(vaultAddress)on the Public Allocator. - Flow caps: Withdrawals and supply must not exceed the vault curator’s
maxOutandmaxInper market. - Enabled markets: All source and destination markets must be enabled for the vault.
- No self-supply: The destination market must not appear in
withdrawals.