CLP
Canonic Liquidity Provider (CLP) Vault
Vault that pools and deploys liquidity to MAOB rungs via an operator.
Source: contracts/contracts/CLP.sol
Route: /reference/clp
Public state (getters)
BPS()MAX_ACTIVE_ORDERS()MAX_WITHDRAWAL_COOLDOWN()MAX_WITHDRAWAL_FEE_BPS()MINIMUM_LIQUIDITY()OPERATOR_ROLE()baseToken()depositsOpen()maob()quoteToken()withdrawalCooldown()withdrawalFeeBps()
Maker actions
cancelOrders(uint256[] calldata orderIds, bool withdrawAfter) external nonReentrant onlyRole(OPERATOR_ROLE) returns (uint256 baseRefunded, uint256 quoteRefunded)claimActiveOrders(uint256 startIndex, uint256 batchSize) external nonReentrant onlyRole(OPERATOR_ROLE) returns (uint256 baseClaimed, uint256 quoteClaimed)claimOrders(uint256[] calldata orderIds) external nonReentrant onlyRole(OPERATOR_ROLE) returns (uint256 baseClaimed, uint256 quoteClaimed)
Admin actions
setDepositsOpen(bool open) external onlyRole(DEFAULT_ADMIN_ROLE)setWithdrawalCooldown(uint32 newCooldown) external onlyRole(DEFAULT_ADMIN_ROLE)setWithdrawalFeeBps(uint16 newFee) external onlyRole(DEFAULT_ADMIN_ROLE)
Views
activeOrderCount() external view returns (uint256)getActiveOrderIds() external view returns (uint256[] memory ids)getRealtimeBalances() external view returns ( uint256 totalBase, uint256 totalQuote, uint256 freeBase, uint256 freeQuote, uint256 withdrawableBase, uint256 withdrawableQuote, uint256 unfilledBase, uint256 unfilledQuote, uint256 unclaimedBase, uint256 unclaimedQuote )
Other
depositDual(uint256 baseAmountDesired, uint256 quoteAmountDesired, uint256 baseMin, uint256 quoteMin) external nonReentrant returns (uint256 shares)exitAndWithdrawAll() external nonReentrantplaceOrders(MAOB.LiquidityOrder[] calldata withdrawOrders, MAOB.LiquidityOrder[] calldata balanceOrders) external nonReentrant onlyRole(OPERATOR_ROLE) returns (uint256[] memory orderIds)withdrawDual(uint256 shares, uint256 baseMin, uint256 quoteMin) external nonReentrant returns (uint256 baseOut, uint256 quoteOut)
Events
DepositDual(address indexed user, uint256 shares, uint256 baseAmount, uint256 quoteAmount)DepositsOpenUpdated(bool oldValue, bool newValue)ExitInitiated(address indexed caller)TopUp(uint256 baseUsed, uint256 quoteUsed, uint256 orderCount)WithdrawalCooldownUpdated(uint256 oldValue, uint256 newValue)WithdrawalFeeSharesBurned(address indexed user, uint256 feeShares)WithdrawalFeeUpdated(uint256 oldFee, uint256 newFee)WithdrawDual(address indexed user, uint256 shares, uint256 baseAmount, uint256 quoteAmount)
Errors
CLP__DepositsClosed()CLP__InitialDepositRestricted()CLP__InsufficientShares()CLP__InvalidAddress()CLP__InvalidConfig()CLP__InvalidCooldown()CLP__InvalidFee()CLP__LiquidityCrunch()CLP__NotAuthorized()CLP__Slippage()CLP__TooManyOrders()CLP__WithdrawalCooldown()CLP__ZeroAmount()