Mimic Docs
Search
⌃K

Smart contracts

In order to implement this version of the Mimic protocol, we open source for the community the following repositories you can find in our GitHub:

Core

This repository includes the core concepts that were described in the architecture section. These components are used by all Smart Vaults to achieve their custom operations:
  • Helpers: Library of Solidity and Typescript helpers used among all Mimic repositories.
  • Price Oracle: Implementation of the on-chain Price Oracle used by the Mimic platform.
  • Registry: Mimic implementations on-chain Registry.
  • Smart Vault: Smart Vault contract grouping all the required core components.
  • Strategies: Strategy contracts are in charge of handling DeFi protocol integrations.
  • Swap Connector: On-chain DEX aggregator to be used by Smart Vaults to swap tokens.
The only missing piece here is the bots. This part of the protocol remains private and is one of the value concepts that Mimic offers. Note that bots don't need to be trusted, these should never be granted high-level security permissions, only to execute actions that can be automated.

Smart Vaults

This repository includes some base implementations users can follow to set up their own Smart Vaults. Additionally, you can find the official implementations that Mimic help build for other projects in the ecosystem. However, this list may not be the complete one as this is a public and open-source protocol and many other users out there may have deployed some Smart Vaults on their own.
The base implementations you will find in this repository are:
  • Deployer: This smart contract library provides a lot of handy methods to simplify your Smart Vault setup. It provides some methods to make sure you're setting up your dependencies, actions, and permissions correctly.
  • Actions: Mimic provides some basic and re-usable concepts for actions that are really helpful
    • Base: Action using the permissions mixin provided by Mimic.
    • Relayed: This mixin allows to define actions that will refund relayers for their execution. It is mandatory in case you want to develop an action that can be automated by Mimic bots.
    • Time-lock: This is extremely useful to denote actions that can only be executed once in a specific period of time. For example, actions that need to be executed once a week.
    • Token threshold: A token threshold can be used to limit different types of actions. For example, actions that can only be executed if a Smart Vault's token balance is higher than a certain amount, or if the amount to be swapped is at least some amount, etc.