Coder Social home page Coder Social logo

0xgeorgemathew / contracts-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from babylon-finance/strategy-api-contracts

0.0 0.0 0.0 300 KB

Public contracts and interfaces of Babylon Finance

License: GNU Affero General Public License v3.0

JavaScript 37.03% Solidity 62.97%

contracts-1's Introduction

Babylon Finance On-chain SDK

This repository provides all the interfaces and helper contracts needed to start building on top of Babylon Finance Gardens.

Building on Babylon

Babylon provides a new DeFi lego building block. Babylon Gardens are the first DeFi Investment DAO primitive (ERC-20).

Gardens are tokenized investment clubs/DAOs where users can deposit digital assets and receive a tokenized share (ERC-20) representing their ownership.

Developers can build on top of Babylon Gardens and benefit from all the following built-in features.

Built-in Features

  • Garden ERC-20 tokens are fully composable and transferrable.
  • Gardens are non-custodial and trust minimized. Only users have access to their funds. Capital can only be allocated to approved strategies.
  • Gardens also provide an NFT Membership token (ERC-721). Members of a garden can mint their NFT.
  • Built-in light governance system with signature based voting. Gas-free.
  • No-hassle and No code UI to create strategies and deploy capital to +15 DeFi protocols including Aave, Compound, Uniswap, Curve and Convex.
  • DeFi execution costs are automatically shared between all members of a Garden, increasing the capital efficiency.
  • Garden UI where users & managers can deposit/withdraw and monitor the performance of their investment club.

You can read more in our managers page.

Architecture

image

Babylon uses several layers of abstraction. Every investment club aka Garden is its own smart contract. Every DeFi strategy within a garden is its own smart contract as well.

These layers of abstraction provide a high-level of isolation and composability. This ensures that potential bugs or hacks get isolated to specific strategies and clubs.

You have all the information in our Litepaper.

Custom Integrations

Integrations are adapters that Babylon uses to connect with other DeFi & Web3 protocols.

So far, Babylon has developed all these adapters in-house. You can see the whole list here.

Starting today, anyone can develop an adapter, test it on a private garden and then submit it to be verified and audited by Babylon governance.

In the integrations folder, you'll find the base classes, a template, and an example of a custom integration developed to integrate with yearn.

You can find more documentation about custom integrations in our docs.

Smart Contracts API

You can see all the functions of our main contracts, their functions and paramaters documented here.

API Docs

Deployed contracts

You can see all the deployed open-sourced contracts here.

Tests and Samples

You can find a test with sample code to create gardens and strategies in the test folder.

To run them, follow these steps

  1. Install dependencies with yarn yarn
  2. Set ALCHEMY_KEY as an environment variable. You can grab a free key from Alchemy.
  3. Execute the following command yarn run test

image

If you want to test with a live garden, you can use the Test WETH garden 0x2c4Beb32f0c80309876F028694B4633509e942D4

contracts-1's People

Contributors

rrecuero avatar ylv-io avatar rriescog 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.