๐Vault Router
The vault router contract is a convenient way to take flash loans from White Whale vaults. Instead of interacting with individual vaults, bots can request the vault router the desired asset to do the flash loan operation with and the router will take care of communicating and requesting the funds to the appropriate vault.
An interesting feature that the White Whale Vault Router is pioneering is the possibility to take multiple flash loans at once.
The code for the vault router can be found here.
The following are the messages that can be executed on the vault router:
Instantiate
Instantiates the vault router.
Migrate
Migrates the vault router.
ExecuteMsg
Flashloan
Retrieves the desired assets
and runs the msgs
, paying the required amount back the vaults after running the messages, and returning the profit to the sender.
Next loan
Performs the next loan in case multiple flash loans are taken. This message is called internally by the vault where the flash loan is being taken from. Cannot be called manually.
Complete loan
Completes the flash-loan by paying back all outstanding loans, and returning profits to the sender. This message is called internally by the vault router, cannot be called manually.
Update config
Updates the configuration of the vault router.
Queries
Retrieves the configuration of the vault router. Returns a Config
struct.
Config
Last updated