Git Product home page Git Product logo

medici-contracts-demo's Introduction

Medici Contracts

The Medici Safe is a gnosis-safe wallet used by Dialectic. This repository contains modules to provide functionality required by the Dialectic team.

For further details check out the following articles:

The backend infrastructure can be found here.

Overview

The Medici system is designed to allow bots to harvest yield on behalf of a Gnosis Safe, this provides the ability to maintain a secure smart contract wallet without having to collect signatures for harvesting of yield.

As it is designed, every Medici strategy is a Safe Module, these need to be approved by the owner. Withdrawing and depositing can be done by special user roles, this means we also don't need to collect signatures from all owners for this. Funds never leave the custody of the Safe, and therefore this will never result in a loss, except if a malicious or broken strategy is approved.

Upon harvesting, the yield is directly swapped into stablecoins and deposited into the safe. The swapping occurs through 1inch, ensuring best price settlement. The off-chain system finds the best prices and passes this data on-chain during execution. The harvest test should provide a little more clarity on how this works.

Development

Dependencies

Before running any command, you need to create a .env file. You can use the .example.env as a starting point.

Then, proceed with installing dependencies:

npm install

Compile and generate artifacts

Compile contracts and generate Typechain bindings with Hardhat:

npm run build

Format and lint

Format contracts with prettier:

npm run fmt

Lint contracts with solhint:

npm run lint

Run tests

Run the testing suite:

npm run test

Run tests with coverage:

npm run coverage

medici-contracts-demo's People

Contributors

decanus avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.