Coder Social home page Coder Social logo

georgerobescu / erc3156 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alcueca/erc3156

0.0 1.0 0.0 268 KB

Reference implementations for ERC20 Flash Loans and Flash Mints

License: GNU General Public License v3.0

JavaScript 23.62% Solidity 76.16% Shell 0.22%

erc3156's Introduction

ERC20 Flash

This project is the reference implementation the ERC 3156 Flash Loan standard.

This project also implements ERC-3156 wrappers for the flash loan functionality of dYdX, Aave, Uniswap and Yield.

Contracts deployed

Kovan

Use FlashBorrower to kick the tires. You can give to the flashBorrow function the address of an ERC3156 compliant lender (such as any of the wrappers in this repo), the address of a supported ERC20 token (which for wrappers depends on the underlying lender such as Aave) and a loan value. Upon execution a flash loan will happen, which you can examine in etherscan.io or tenderly.co. You will need to have transferred to FlashBorrower enough of the ERC20 being borrowed beforehand to pay for the fees.

FlashBorrower: 0xeeb0c120bF35fB0793b1c7d0D93230e552020398 ERC20FlashMinter : 0x1e198e90c7166f7f9fD24b9D7A0451D7AeE78a3F FlashLender: 0xC79bF13a7199867E6349287e90Ed76D645399705 AaveERC3156: 0x14df3b76309c91f3e8FA8Bc11bbc558f631E2594 DYDXERC3156: 0xC65151C0777614da245393b4481e29c885Da7C4D UniswapERC3156: 0xeBe2432d4b8C59F33674F6076ddeE8643B8039d1 YieldDaiERC3156: 0xDcD8a5C2cD166f90196205b2f76f273fd31684B4 YieldFYDaiERC3156: 0x9a8b26c62E05e6a8b472e1f01f2d09042Dd2093E

Tested currencies

The flash loans have been tested with the ERC20 tokens below, but should work for any tokens that the underlying lenders make available.

ERC20FlashMinter (ERC20FlashMinter): 0x1e198e90c7166f7f9fD24b9D7A0451D7AeE78a3F WETH9 (FlashLender, AaveERC3156, DYDXERC3156, UniswapERC3156): 0xd0A1E359811322d97991E03f863a0C30C2cF029C DAI (FlashLender, YieldDaiERC3156, UniswapERC3156): 0x4F96Fe3b7A6Cf9725f59d353F723c1bDb64CA6Aa DAI (DYDXERC3156): 0xC4375B7De8af5a38a93548eb8453a498222C4fF2 DAI (AaveERC3156): 0xFf795577d9AC8bD7D90Ee22b6C1703490b6512FD FYDAI (YieldFYDaiERC3156): [0x6B166d6325586c86B44f01509Fc64e649DCfE7C4, 0x42AA68930d4430E2416036966983E6c9Fe8Ff2f8, 0x2b67866649AFcEFC63870E02EdefC318fd8760D3, 0x02B06417A3e3CB391970C6074AbcF2745a60b880, 0x6Abb65246346b2A52Faed338cB18880e70A57Cf8]

erc3156's People

Contributors

alcueca avatar

Watchers

James Cloos 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.