Risk Exposure Management

Set the Supply Queueโ€‹

Let's consider that we applied all steps from the previous section such that the supply Queue is thus composed of 3 Id:

  • 0x3098a46de09dd8d9a8c6fa1ab7b3f943b6f13e5ea72a4e475d9e48f222bfd5a0

  • 0x23f355fc1b8221349892985d6cebff02f9fd9d5e96c35f6f0e8a23a7a617ef23

  • 0xd9d856a68713c76e5cfa4cdd11777d77522506f09970d59ba54663872e009a84 (idle market)

We can verify it here:

Supply Queue

To change, one can call the setSupplyQueue with a new set of Id, by moving market 1 and 2 for instance:

  • 0x23f355fc1b8221349892985d6cebff02f9fd9d5e96c35f6f0e8a23a7a617ef23

  • 0x3098a46de09dd8d9a8c6fa1ab7b3f943b6f13e5ea72a4e475d9e48f222bfd5a0

  • 0xd9d856a68713c76e5cfa4cdd11777d77522506f09970d59ba54663872e009a84

And call setSupplyQueue with the object:

setSupplyQueue([0x30...5a0,0x23...f23,0xd9...a84])

Then we can verify that this worked as expected:

New Supply Queue

Update the Withdraw Queueโ€‹

Similarly to what we have done in the "Set Supply Queue" section, one has to give a set of IDs.

Please keep in mind that it could be relevant to put the "idle" market on the top of the withdraw queue.

Remove a marketโ€‹

To force remove a market, one can call submitMarketRemoval.

WARNING

Submits a forced market removal from the vault, eventually losing all funds supplied to the market.

Reallocation examplesโ€‹

Any address that has the onlyAllocatorRole will be able to execute the reallocate function which thus reallocates the vault's liquidity so as to reach a given allocation of assets on each given market. The allocator can withdraw from any market, even if it's not in the withdraw queue, as long as the loan token of the market is the same as the vault's asset.

NOTE

Be sure to have read the technical reference definition of the reallocate function before proceeding.

The function takes into input the MarketAllocation[], with MarketAllocation implemented like this:

and MarketParams implemented like this:

A basic Etherscan exemple that would use the reallocate function would be to replace the following input with the right addresses and values: Don't forget to delete the lines that are commented.

Last updated