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. Only maintainers with the appropriate capabilities can call these functions.

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

The system emits this event when you update a maintainer capability.

Click to open
PauseCapUpdated

The system emits this event when you update a pause capability.

Click to open
DeepbookPoolRegistered

The system emits this event when you register a DeepBook pool in the margin registry.

Click to open
DeepbookPoolUpdatedRegistry

The system emits this event when you update a DeepBook pool's enabled status in the registry.

Click to open
DeepbookPoolConfigUpdated

The system emits this event when you update a DeepBook pool's configuration in the registry.