Skip to main content

Maintainer

The maintainer module provides functions for managing margin pools, configuring interest rates, and controlling which DeepBook pools can access margin lending. These functions are restricted to maintainers with the appropriate capabilities.

API

Following are the different maintainer functions that the MarginPool exposes.

Click to open
Create a margin pool

Creates and registers a new margin pool for a specific asset. Only one margin pool can exist per asset type.

Click to open
Enable or disable DeepBook pools

Control which DeepBook pools can borrow from this margin pool. Only margin managers associated with enabled pools can take loans.

Click to open
Update pool parameters

Update interest rate parameters and margin pool configuration settings.

Click to open
Withdraw fees

Withdraw accumulated maintainer and protocol fees from the margin pool.

Events

Click to open
MaintainerCapUpdated

Emitted when a maintainer capability is updated.

Click to open
PauseCapUpdated

Emitted when a pause capability is updated.

Click to open
DeepbookPoolRegistered

Emitted when a DeepBook pool is registered in the margin registry.

Click to open
DeepbookPoolUpdatedRegistry

Emitted when a DeepBook pool's enabled status is updated in the registry.

Click to open
DeepbookPoolConfigUpdated

Emitted when a DeepBook pool's configuration is updated in the registry.

DeepBook Margin package

The DeepBook Margin package on GitHub.