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.
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
The system emits this event when you update a maintainer capability.
packages/deepbook_margin/sources/margin_registry.move. You probably need to run `pnpm prebuild` and restart the site.PauseCapUpdated
The system emits this event when you update a pause capability.
packages/deepbook_margin/sources/margin_registry.move. You probably need to run `pnpm prebuild` and restart the site.DeepbookPoolRegistered
The system emits this event when you register a DeepBook pool in the margin registry.
packages/deepbook_margin/sources/margin_registry.move. You probably need to run `pnpm prebuild` and restart the site.DeepbookPoolUpdatedRegistry
The system emits this event when you update a DeepBook pool's enabled status in the registry.
packages/deepbook_margin/sources/margin_registry.move. You probably need to run `pnpm prebuild` and restart the site.DeepbookPoolConfigUpdated
The system emits this event when you update a DeepBook pool's configuration in the registry.
packages/deepbook_margin/sources/margin_registry.move. You probably need to run `pnpm prebuild` and restart the site.