This document describes operational requirements for deploying and managing integrations with the Spark ALM Controller.
Certain protocols require initialization before the ALM Controller can safely interact with them.
Requirement: All ERC-4626 vaults MUST have initial burned shares.
| Aspect | Details |
|---|---|
| Purpose | Prevents rounding-based frontrunning attacks |
| Implementation | Initial shares must be minted and burned (sent to zero/dead address) |
| Permanence | Burned shares must be unrecoverable |
Additional Protection: Donation attacks are protected against with the maxExchangeRate mechanism.
Attack Prevented: Without burned shares, an attacker could:
- Deposit minimal amount to get shares
- Donate assets directly to vault to inflate share price
- Exploit rounding when victim deposits to steal funds
Requirement: Curve pools must be seeded with initial liquidity before use. Seeding must be done to an unrecoverable address (e.g, address(1)). This will prevent any unintended behaviours.
Requirement: Uniswap V4 pools must be seeded with initial liquidity before use. Seeding must be done to an unrecoverable address (e.g, address(1)). This will prevent any unintended behaviours.
All ERC-20 tokens used with the ALM Controller must be:
| Requirement | Rationale |
|---|---|
| Non-rebasing | Rebasing tokens cause accounting inconsistencies |
| ≥6 decimals | Prevents precision loss in rate limit calculations |
| Standard ERC-20 | Non-standard implementations may cause unexpected behavior |
- Rate limits must be configured for each specific integration
- Unconfigured integrations will revert on interaction
- Rate limit keys act as a whitelist (see Rate Limits)
| Withdrawal Function | Required |
|---|---|
withdrawERC4626 |
Non-zero deposit rate limit for same vault |
redeemERC4626 |
Non-zero deposit rate limit for same vault |
withdrawAave |
Non-zero deposit rate limit for same aToken |
When deploying a new OTC buffer:
- Deploy the
OTCBuffercontract - Critical:
initializethe contract to set up the access controls and set infinite allowance (type(uint256).max) to theALMProxy - Configure the OTC buffer address in the controller
- Set appropriate rate limits and slippage parameters
Failure to set infinite allowance will cause OTC swap completions to fail.
Only pools with 1:1 assets can be onboarded:
- USDC/USDT ✓
- USDC/DAI ✓
- USDC/USDS ✓
- USDC/ETH ✗ (different underlying)
- USDC/WBTC ✗ (different underlying)
- Verify pool contains only whitelisted 1:1 stablecoins
- Verify pool does not have dangerous hooks
- Configure rate limits for the specific pool
- Configure tick limits for the specific pool
- Set appropriate slippage parameters
- Verify protocol compatibility with ALM Controller requirements
- Configure rate limit keys via governance
- Set safety parameters if applicable
- Test on fork before mainnet deployment
- Monitor initial operations closely after deployment
| Integration | Monitor |
|---|---|
| All | Rate limit utilization, transaction failures |
| UniswapV4 | Pool price |
| ERC-4626 | Exchange rate changes, share price manipulation |
| OTC | Outstanding swap amounts, recharge progress |
| weETH | Pending withdrawal NFTs, finalization delays |
| CCTP/LayerZero | Bridge confirmation times, stuck transfers |
| Ethena | Pending mint/burn operations, delegated signer status |