Giter Club home page Giter Club logo

flashloan-nft's Introduction

Flashloan NFT

Protocol for Non Fungible Token flash loans.

This protocol enables a secure deposit of an ERC-721 tokens and create a flash loans.

STATUS: Work in progress.

Why flash loans?

We all heard about the amazing featurs of flash loans. Before, if you spot an arbitrage opportunity you need to have a big capital to use it. The process can be cumbersome as it may involve: taking a normal loan (if you non liquid which is a subject for a collateral), exchange the liquidity, close a trade, pay back the loan. It's costly and more risky. Moreover if you don't have enough capital, you can't take an advantage of arbitrage.

Flash loans solve that issues. With flash loan, everything is happening atomically in the same transaction. Hence you don't even need a collateral - it's enough if there is enough liquidity in a flash loan pool. It's even more secure (assuming no bugs in code). Flash loan requires that by the end of the transaction it is fully payed off. With that we we don't risk loosing funds - if something goes wrong (we loose money, loan can't be payed off), the transaction will not finish - it will be rolled back.

It's worth to note that this exposes new ways of moving and managing funds and more risks to other smart-contracts - as this exposes more sophisticated transactions between smart-contracts. In February 2020 this lead to sophisticated transactions exposing holes in pricing mechanism in decentralized exchanges. This is well documented in a Coindesk article: Everything You Ever Wanted to Know About the DeFi ‘Flash Loan’ Attack.

What about NFTs?

NFTs are more complex. They are not fungible, hence the standard flashloan protocol won't work with NFTs like badges, collectibles, certificates etc... Yet there is lot of opportunity to explore here.

More about it in an upcoming blog post on my blog.

Specing

This are the decisions to be thought around and spec:

  • Fee mechanism: fixed or dynamic or per-user.

  • amount of pools vs dynamic pools

  • Consider adding ERC721x Pool

  • add support for ERC-165

Efficiency

For efficient loan browsing we need an off-chain solution. Smart-contracts are too limited and too expensive for that.

License

Copyright (C) 2020 Robert Zaremba

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

flashloan-nft's People

Contributors

robert-zaremba avatar dalekatwork 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.