Allocator and manager handbook
This guide covers the onchain controls used to operate an EulerEarn vault. Allocation policy remains vault-specific: strategy selection, concentration, queue order, liquidity reserves, and return objectives should follow the vault's published mandate.
Roles
- Owner: manages all vault settings and inherits Curator, Allocator, and Guardian powers.
- Curator: enables strategies, manages caps, and inherits Allocator powers.
- Allocator: updates queues and reallocates assets within the configured caps.
- Guardian: can revoke specific pending actions.
Monitor current role holders and pending actions onchain. Use multisignature or other controlled accounts where appropriate to the vault's operating model.
Strategy acceptance and caps
A strategy must be accepted by the selected factory before it can be enabled or receive a cap increase. Acceptance is checked again when a pending cap increase completes.
- Cap decreases, including zero, are immediate.
- Cap increases wait for the current timelock and can be revoked while pending.
- The first accepted positive cap enables the strategy and adds it to the withdrawal queue.
- A zero cap stops new allocation but does not withdraw the existing balance or remove queue entries.
Track both cap headroom and the strategy's current maxDeposit. A strategy may be unable to accept the full remaining cap.
Supply and withdrawal queues
Both queues support up to 30 entries.
Supply queue: deposits try strategies in order, bounded by cap headroom and maxDeposit. Reverting entries are skipped, but the deposit fails if the complete amount cannot be placed. Reject duplicate entries even though the contract permits them.
Withdrawal queue: withdrawals try strategies in order, bounded by tracked assets and maxWithdraw. Limited liquidity reduces maxWithdraw. During execution, a reverting withdrawal is skipped, but the transaction fails if the remaining strategies cannot provide the requested amount.
Set queue order from the vault's strategy and liquidity policy rather than APY alone. Consider utilization, current liquidity, correlated exposure, withdrawal demand, gas, and failure behavior.
Reallocate assets
reallocate moves listed strategies toward specified target balances. Withdrawals earlier in the list fund supplies later in the list, targets must remain within caps, and the total supplied must equal the total withdrawn.
Before execution:
- read current balances, caps, queues, pending actions,
maxDeposit, andmaxWithdraw; - build and simulate the exact ordered allocation;
- check it against allowed-strategy, concentration, liquidity, and transaction policies;
- submit and monitor confirmation; and
- reconcile events with final balances and withdrawal capacity.
Remove a strategy
Normal removal
- Revoke any pending cap increase.
- Set the cap to zero.
- Reallocate recoverable assets to other enabled strategies.
- Remove the strategy from the supply queue.
- Once its tracked balance is zero, omit it from the withdrawal queue.
The empty-balance check uses the vault's tracked strategy balance rather than the strategy token's raw balanceOf value.
Forced removal
Use forced removal only when a strategy persistently reverts and cannot be emptied. With the cap at zero and no pending cap, Owner or Curator submits the removal. Owner, Curator, or Guardian can revoke it. After the timelock, Owner, Curator, or Allocator removes the strategy by omitting it from the withdrawal queue.
Forced removal excludes remaining tracked assets from the active strategy set. It does not transfer or recover them. Quantify the effect on represented assets and withdrawal capacity before proceeding, and communicate the impact to users.
Fees
The Owner configures the fee separately after deployment. For a nonzero fee, set a nonzero recipient before setting the fee. The maximum is 0.5e18 (50%). Set the fee to zero before clearing the recipient.
Fee-setting calls accrue fees under the previous configuration before applying the change. The documented implementation does not have a separate harvest or yield-smearing operation.
Monitoring and incident response
Monitor roles, pending actions, factory acceptance, caps, queues, strategy balances, conversions, maxDeposit, maxWithdraw, transaction failures, fees, and lostAssets.
- Strategy risk signal: revoke pending cap increases, reduce the cap to zero, simulate and reallocate recoverable assets, then update queues when removal checks pass.
- Persistently reverting strategy: stop new allocation, assess normal withdrawal, and use forced removal only if continued operation justifies its accounting impact.
- Role or key compromise: stop affected automation, use available uncompromised roles to revoke pending actions or replace roles, rotate keys, and reconcile every change made by the affected address.
Automate allocation
Reallocation within the controls above can be automated with the Euler Allocator Bot; see Allocator automation for what to automate and the guardrails to keep around it.