Action Contracts

Super vault specific action contracts

Just like with the PRBProxy you need a "target" contract to do anything meaningful with MIMOProxy. This is basically a collection of stateless scripts executing specific logic. In the case of super vaults there are 5 different action contracts (one for each functionality) :

All actions on the SuperVault contracts require flash loans and DEX aggregator swaps, and to perform these actions, the contracts must have permission to call back the delegate call through the MIMOProxy execute function. This is because the action contracts interact with other contracts, such as the Mimo core protocol or DEX aggregators, within the same transaction and are executed within the context of the MIMOProxy.

However, when the AAVE Pool contract performs a callback through the executeOperation function, the logic switches from the MIMOProxy context to the action contract's context, preventing any access-controlled actions on VaultsCore. To reenter the MIMOProxy context, the action contract must perform a callback by calling the MIMOProxy execute with itself as the target. For this to happen, the action contract must be granted the correct permission by the MIMOProxy owner.

All of the above action contracts share 2 common struct passed in as arguments for flash loan and swaps :

FlashLoanData

SwapData

Non super vault specific action contracts

The MIMOProxy also comes with non super vault specific action contracts :

Last updated