Background and Basics
Vault Maxi is a bot, created as a community project by Kügi and Krysh. (Twitter: @mkuegi, @Krysh90, @vaultMaxi)
The main use case for running this bot is to maximize Liquidity Mining rewards with assets minted from vaults. Therefore the name "Vault Maxi". You can configure a target range for the collateralization ratio and the bot will check every time it gets triggered (e.g. every 15 Minutes) if the vault is in that range. If not, it will reduce or increase the exposure. This means that either when the col ratio is to low, LM pool exposure will get reduced and loans in the vault paid back. Therefore, the col ratio will increase again into the configured range. Vault Maxi calculates exactly how much has to be reduced or increased so that after such an action you will be in the exact middle of that range. For example, when you configure the range to be between 157% and 160% it will come out with 158.5%. In the following executions the value will differ, as the prices of the minted assets, as well as the collateral value in the vault, change over time. But only when the new collateralization ratio is above the maximum or below the minimum of the configured range, Vault maxi will do changes.
It is possible to configure the bot to use either the so Called Single- or Double Mint Strategy.
For Single Mint you need DUSD in the collateral and the other asset for the LM pair gets minted by a loan with this vault. DUSD get withdrawn from the collateral and used in a LM pool together with the minted asset. Vault Maxi will calculate the needed amount automatically. For double mint both assets (dStock Token and DUSD) for the liquidity pool pair will be minted as loan from the vault. In this case you need at least 50% DFI in the collateral to be eligible to mint DUSD (collateralization rules).
There are two separate verions of Vault Maxi available. One is a client written in phython to be used with a local full node. The other version is written in TypeScript and can be deployed as a AWS lambda. This cloud version does not require a full node, as it's using the ocean API for calling transactions on the blockchain. Here we will further discuss this AWS version of Vault Maxi.
- Reinvest you can configure a threshold for the amount of rewards that will get reinvested after having accumulated that amount in the address holding the LM pool token. With a sophisticated pattern you can configure what to do with the reinvest (put in collateral of any vault or sent to another address. And This not only in DFI or DUSD, but every desired token or any pool pair of the DEX.
- Donation for the developers Kügi and Krysh do a great job in developing and continuously maintain and further improve this software. They share everything as open source on github. By setting a donation amount as percentage of a reinvest sum you can give something back to them.
- Notifications and Heartbeat messages via Telegram: you can configure 2 separate telegram chat channels - one for a heartbeat that notifies you at every execution(e.g every 15 minutes) You could mute this chat and only use it for a manual check if vault maxi is still running. The other channel is for notifications like increase or decrease of the exposure, reinvest or if any issues occured.
Command Center is an optional add on, that you can configure as a lamda in AWS, just like vault maxi itself. With command center you can use a telegram channel (just like the notification and heartbeat messages from vault maxi). But with this add on you are not only able to receive messages – no, now you can talk to maxi and give commands to alter parameters or steer behavior without needing to logon in AWS.
|/bots||Sends you a list of installed bots with version, compatibility check and last execution block|
|/check||executes check-setup on your vault-maxi (Lambda function name: defichain-vault-maxi)|
|/execute||executes your vault-maxi (Lambda function name: defichain-vault-maxi)|
|/skip||skips one execution of your vault-maxi|
|/resume||resumes execution of your vault-maxi|
|/removeExposure||Executes your vault-maxi with overridden settings max-collateral-ratio = -1, which will remove exposure available to your vault-maxi. Removes all LM tokens and pays back loans. Be cautious of impermanent loss, which will still be left and need to be taken care manually|
|/setRange||sets given range as min-collateral-ratio and max-collateral-ratio. After changing range it will automatically execute|
|/check||to check if configuration is still valid.|
|/setRange||Sets the min and max collateralization ratio, Examples: /setRange 170-175 or /setRange 170 175|
|/setReinvest||sets the given value as treshold for a reinvest, for example /setReinvest 5|
|/setReinvestPattern||sets given reinvest pattern, for Example /setReinvestPattern DFI:20 BTC|
|/setStableArbSize||sets given number as stable arb batch size.
Your set amount should be available in your vault as collateral and should be able to be withdrawn. Otherwise vault-maxi will reduce this size on execution automatically, no changes to your stored parameter will be performed.
For Example /setStableArbSize 100
|/setAutoDonation||sets given percentage as auto-donation percentage. THANKS for using auto-donation feature to support us! (0 deactivates auto-donation functionality) /setAutoDonation 5|
Info about this project online:
- GitHub (source, readme): https://github.com/kuegi/defichain_maxi/
- Extensive User Guide in a google doc: https://docs.google.com/document/d/1sb9VgeVHGYZpyLWQx8VsxsoeHO4JRz3fACj5_JjoVNs/edit#
- Project Website incl statistics of vaults using vault amxi, as well as a tool for creating the reinvest pattern: https://www.vault-maxi.live/
- Community Discord Server: https://discord.com/invite/DBUp4cqzBb
The developers of Vault Maxi published everything as open source and shared thier knowledge openly with the community. In August 2022, for the release of a new major release (version 2 and the add on "command center" Kügi requested a CFP: "CFP-2207-10: Vault-maxi v2 and command center (20 000 DFI)"
CFP on GitHub: https://github.com/DeFiCh/dfips/issues/178
In the voting the CPF got approved with 96% yes (482 yes against 20 no)