LogoLogo
  • Introduction
  • Parallel Protocol
    • PRL (Parallel Governance Token)
      • Issuance
      • Bridging Module
        • Specifications
        • Implementation
      • Tokenomics
        • Epoch Concept
        • Staking Mechanisms
        • ParaBoost
        • Fee Distribution
      • Governance
      • MIMO to PRL Migration
    • PAR (€ stablecoin)
      • How does PAR work?
      • Where can I get PAR ?
    • paUSD ($ stablecoin)
      • How does paUSD work?
      • Where can I get paUSD ?
    • Classic Vaults
      • Depositing
      • Borrowing
      • Fees
        • Fees Generation
      • Withdrawing
      • Repaying
      • Liquidating
    • Bridging Module
      • LayerZero Infrastructure
      • Specifications
      • Implementation
        • PAR
        • paUSD
    • Super Vaults (SV)
      • Leveraging
      • Rebalancing
      • EmptyVault
      • Automated Rebalance
      • Managed Rebalance
    • Inception Vaults (IV)
      • Borrowing
      • Liquidating
  • DAO & Governance
    • sPRL and Voting Power
    • Governance process
    • Proposal Framework
      • Parallel Integration Request (PIR)
      • Parallel Governance Proposal (PGP)
      • Parallel Improvement Protocol (PIP)
    • DAO Multisigs
      • DAO Multisigs Elections
        • Election 1
        • Election 2
        • Election 3
        • Election 4
        • Election 5
        • Election 6
      • Multisigs Transactions History
        • May 2022 Multisig History
        • June 2022 Multisig History
        • July 2022 Multisig History
        • August 2022 Multisig History
        • September 2022 Multisig History
        • October 2022 Multisig History
        • November 2022 Multisig History
        • December 2022 Multisig History
        • January 2023 Multisig History
        • February 2023 Multisig History
        • March 2023 Multisig History
        • April 2023 Multisig History
        • May 2023 Multisig History
        • June 2023 Multisig History
        • July 2023 Multisig History
        • August 2023 Multisig History
        • September 2023 Multisig History
        • October 2023 Multisig History
        • November 2023 Multisig History
        • December 2023 Multisig History
        • January 2024 Multisig History
        • February 2024 Multisig History
        • March 2024 Multisig History
        • April 2024 Multisig History
        • May 2024 Multisig History
    • Parallel Emergency Guardians
    • DAO Treasury
      • DAO Treasury Reports
  • Risk Assessments
    • Parallel's Risk framework
    • Methodology
    • Risk per Assets
      • PAR
        • Ethereum Assets
        • Polygon Assets
        • Fantom Assets
      • paUSD
        • Ethereum Assets
        • Polygon Assets
    • Risk parameters
      • PAR
        • Ethereum Risk parameters
        • Polygon Risk parameters
        • Fantom Risk parameters
      • paUSD
        • Ethereum Risk parameters
        • Polygon Risk parameters
    • Insurance Fund
  • Developers
    • Developer Guide
    • Parallel Governance Token (PRL)
    • Tokenomics
      • Key Operations Flows
      • Contracts
    • Classic Vaults
      • Architecture
      • VaultsCore
      • Opening a vault
      • Borrowing and minting PAR/paUSD
    • Bridging Module
      • Architecture
      • Sample Use Cases
    • Super Vault (SV)
      • Proxy Design
        • MIMOProxy
        • MIMOProxyGuard
        • MIMOProxyFactory
      • Action Contracts
        • MIMOEmptyVault
        • MIMOLeverage
        • MIMORebalance
        • MIMOAutoRebalance
        • MIMOManagedRebalance
        • MIMOProxyActions
        • MIMOVaultActions
      • Leverage Max Amount Derivation
    • Inception Vault (IV)
      • IV Architecture
      • InceptionVaultFactory
      • AdminInceptionVault
      • InceptionVaultCore
      • InceptionVaultsDataProvider
      • InceptionVaultPriceFeed
    • Contract Addresses
      • Parallel V3
        • Core Protocol
        • Parallel Governance Token
      • Parallel V2
        • PAR
          • Ethereum
          • Polygon PoS
          • Fantom
        • paUSD
          • Ethereum
          • Polygon PoS
      • Super Vaults (SV)
        • PAR
          • Ethereum
          • Polygon PoS
        • paUSD
          • Ethereum
          • Polygon PoS
      • Inception Vaults (IV)
        • Kovan
  • Resources
    • User Guides
      • Setting up
      • Managing Transactions on EVM blockchains
      • Troubleshooting
      • Mint PAR
      • Liquidity Providing
        • Provide PAR-USDC liquidity on Uniswap V3 (Ethereum)
        • Provide PAR-jEUR liquidity on Balancer (Polygon PoS)
        • Impermanent loss
      • How to Migrate to PRL?
      • How to Bridge Parallel Tokens?
      • How to Stake PRL?
    • Security & Audits
    • Links
    • Glossary
    • Brand Kit
Powered by GitBook
On this page
  • Process Flow
  • Write Methods
  • View Methods

Was this helpful?

  1. Developers
  2. Super Vault (SV)
  3. Action Contracts

MIMOAutoRebalance

PreviousMIMORebalanceNextMIMOManagedRebalance

Last updated 1 year ago

Was this helpful?

The MIMOAutoRebalance action contract handle the super vault empty vault logic described in .

Process Flow

Write Methods

setAutomation(uint256 vaultId, AutomatedVault calldata autoParams)

Sets a vault automation parameters.

Requirements :

  • Caller must be the MIMOProxy owner the vault or the MIMOProxy owner

Param Name
Type
Description

vaultId

uint256

autoParams

struct

AutomatedVault struct containing all automation parameters

AutomatedVault

Param Name
Type
Description

isAutomated

bool

true if vault is automated false if not

toCollateral

address

Collateral to rebalance to

allowedVariation

uint256

The maximum allowed slippage on rebalancing swaps

targetRatio

uint256

Target ratio that must be reach upon each rebalance operation

triggerRatio

uint256

Minimum vault ratio that must be reached in order to perform a rebalance operation

mcrBuffer

uint256

Rebalancing vault MCR buffer padding

fixedFee

uint256

Fixed fee paid to the keeper

varFee

uint256

Variable fee paid to the keeper

rebalance(uint256 vaultId, IMIMOSwap.SwapData calldata swapData)

Performs a rebalance on a vault on behalf of a vault owner.

Requirements :

  • Contract must be unpaused

  • Vault must have been created through the user's MIMOProxy

  • Vault must be automated

  • Maximum daily operation must have not been reached

  • Rebalanced vault ratio must lower or equal then set triggerRatio

  • The change in vault value due to the rebalance operation must be lower or equal then the allowedVariation set by the owner

  • The final vault ratio must be greater or equal then the minRatio set by the owner

Param Name
Type
Description

vaultId

uint256

Id of the vault to rebalance

swapData

struct

SwapData struct containing aggregator swap parameters

executeOperation(address[] calldata assets, uint256[] calldata amounts, uint256[] calldata premiums, address initiator, bytes calldata params

AAVE Pool contract flash loan callback function.

Requirements :

  • Contract must be unpaused

  • Can only be called by the AAVE Pool contract

  • Flash loan initiator must be the MIMOProxy

Param Name
Type
Description

assets

address[]

Address array with one element corresponding to the address of the target vault asset

amounts

uint256[]

Uint array with one element corresponding to the amount of the target vault asset

premiums

uint256[]

Uint array with one element corresponding to the flashLoan fees

initiator

address

Initiator of the flashloan; can only be MIMOProxy owner

params

bytes

Bytes sent by this contract containing MIMOProxy owner, target vault id, SwapData struct

View Methods

getAmounts(uint256 vaultId, address toCollateral)

Returns the rebalance amounts for specific vault id.

Call Params

Name
Type
Description

vaultId

uint256

Id of the vault to rebalance

toCollateral

address

Collateral to rebalance to

Return Values

Name
Type
Description

rebalanceAmount

uint256

Amount to rebalance

mintAmount

uint256

Amount to mint on vault B

autoFee

uint256

Automation fee

rebalanceAmount calculation :

Where mcrB is the rebalancing vault (e.g. vault with the less volatile collateral) MCR.

The rebalance value is then converted to a rebalance amount using the core protocol PriceFeed contract.

mimoRebalance()

Returns the MIMORebalance action contract address.

rebalanceValue=targetRatio∗(vaultDebt+fixedFee)−collateralValuetargetRatio−(mcrB+mcrBuffer)∗flashLoanfeemcrB+mcrBuffer−targetRatio∗variableFee−1rebalanceValue = \frac{targetRatio * (vaultDebt + fixedFee) - collateralValue}{\frac{targetRatio - (mcrB + mcrBuffer) * flashLoanfee}{mcrB + mcrBuffer} - targetRatio * variableFee - 1}rebalanceValue=mcrB+mcrBuffertargetRatio−(mcrB+mcrBuffer)∗flashLoanfee​−targetRatio∗variableFee−1targetRatio∗(vaultDebt+fixedFee)−collateralValue​
Automated Rebalance