Rebalancing
Last updated
Last updated
Before rebalancing, the chosen contract to interact with must be whitelisted.
This of course can be reverted here:
In order to rebalance, you should build the calldata in order to swap, and pass the target. Slippage protection can be enforced. To put trust towards user, a slippage protection relative to the current oracle price can be set.
The rebalancing can then be done via this function:
or be accompanied by a position change like this: