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
  • Write Methods
  • View Methods

Was this helpful?

  1. Developers
  2. Super Vault (SV)
  3. Proxy Design

MIMOProxy

PreviousProxy DesignNextMIMOProxyGuard

Last updated 1 year ago

Was this helpful?

Super Vault utilizes a proxy pattern to enable users to make proxy calls on behalf of other users and interact with various contracts (e.g., Parallel core protocol, DEX aggregators, flash loan protocols) within a single transaction. This pattern also allows for the integration with external contracts (e.g., lending pools and DEX aggregators) to carry out complex on-chain vault operations while still preserving proper access control to access VaultsCore.

While the design was largely inspired by the , there are some differences :

  • The MIMOProxy is completely stateless and only holds an immutable proxyFactory state variable. In contrast, the PRBProxy retains three non-immutable state variables (owner, minGasReserve, and permissions). As the MIMOProxy relies on delegate calls to execute actions through action contracts, retaining state variables within it increases the risk of storage collisions with target calls. As a result, the owner and minGas variables are maintained by the MIMOProxyFactory's _proxyStates mapping.

  • The management of MIMOProxy's permissions has been outsourced to the MIMOProxyGuard, which is deployed through the Openzeppelin Clones library in the MIMOProxyFactory for each MIMOProxy. This helps save gas on deployment and enables easy permission clearing in the event of a MIMOProxy ownership transfer.

  • The PRBProxyFactory uses the CREATE2 opcode to deploy proxies at deterministic addresses, whereas the MIMOProxyFactory does not. This decision was made to save gas and because there is no need to deploy proxies at deterministic addresses.

  • The MIMOProxy uses the BoringBatchable to carry out batch delegate calls to address(this). This is useful for linking calls to owner-protected functions such as setPermission() and execute() to minimize user transactions.

Users can create a proxy by calling deploy() on the MimoProxyFactory contract, which deploys both a new MIMOProxy and clones a MIMOProxyGuard.

Write Methods

execute(address target, bytes calldata data)

Delegate calls to the target contract by forwarding the call data. Returns the data it gets back, including when the contract call reverts with a reason or custom error.

Requirements :

  • The caller must be either an owner or an envoy

  • target must be a deployed contract

  • The owner cannot be changed during the DELEGATECALL

Call Params

Name
Type
Description

target

address

The address of the target contract

data

bytes

Function selector plus ABI encoded data

Return Values

Name
Type
Description

response

bytes

The response received from the target contract

View Methods

proxyFactory()

Returns the proxyFactory address.

PRB Proxy pattern