Setting up Allocators
Full allocator setup (single action example):
SetAllocatorMemory memory config = SetAllocatorMemory({
allocator: zeroXAllocatorAddress,
allowed: true,
line: LineOfCredit({
ceiling: 5000e18,
dailyCap: 500e18,
mintedToday: 0,
lastMintDay: 0
}),
borrowFeeBps: 50
});
address[] memory assets = new address[](2);
assets[0] = address(WBTC);
assets[1] = address(cbBTC);
address[] memory pockets = new address[](2);
pockets[0] = zeroXAllocatorWBTCVault;
pockets[1] = zeroXAllocatorCbBTCVault;
// Execute via governance:
bytes memory payload = abi.encode(AllocatorOperations.SET_ALLOCATOR, config, assets, pockets);Partial updates (granular control):
Update allowed status only:
AllocatorOperations.UPDATE_ALLOWEDUpdate credit line only:
AllocatorOperations.UPDATE_LINEUpdate borrow fee only:
AllocatorOperations.UPDATE_BORROW_FEEUpdate pockets (via governance):
payload: (allocator, asset, newPocket)forSET_ALLOCATOR_POCKETS
Admin quick actions (non-governance):
Last updated