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.
Create a margin pool
Creates and registers a new margin pool for a specific asset. Only one margin pool can exist per asset type.
packages/deepbook_margin/sources/margin_pool.move. You probably need to run `pnpm prebuild` and restart the site.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.
packages/deepbook_margin/sources/margin_pool.move. You probably need to run `pnpm prebuild` and restart the site.Update pool parameters
Update interest rate parameters and margin pool configuration settings.
packages/deepbook_margin/sources/margin_pool.move. You probably need to run `pnpm prebuild` and restart the site.Withdraw fees
Withdraw accumulated maintainer and protocol fees from the margin pool.
packages/deepbook_margin/sources/margin_pool.move. You probably need to run `pnpm prebuild` and restart the site.Events
MaintainerCapUpdated
Emitted when a maintainer capability is updated.
packages/deepbook_margin/sources/margin_registry.move. You probably need to run `pnpm prebuild` and restart the site.PauseCapUpdated
Emitted when a pause capability is updated.
packages/deepbook_margin/sources/margin_registry.move. You probably need to run `pnpm prebuild` and restart the site.DeepbookPoolRegistered
Emitted when a DeepBook pool is registered in the margin registry.
packages/deepbook_margin/sources/margin_registry.move. You probably need to run `pnpm prebuild` and restart the site.DeepbookPoolUpdatedRegistry
Emitted when a DeepBook pool's enabled status is updated in the registry.
packages/deepbook_margin/sources/margin_registry.move. You probably need to run `pnpm prebuild` and restart the site.DeepbookPoolConfigUpdated
Emitted when a DeepBook pool's configuration is updated in the registry.
packages/deepbook_margin/sources/margin_registry.move. You probably need to run `pnpm prebuild` and restart the site.Related links
The DeepBook Margin package on GitHub.