Code Monkey home page Code Monkey logo

erc20-streamable-extension's Introduction

ERC20 Streaming extension

Overview

​ Abstract smart contract to extend ERC20s, in order to add streamings capability.

1. Streamings

Each streaming contains an amount per second, a starting date, and ending date, a sender an a receiver. Can only exist one streaming between to addresses.

2. Flows

A flow between to addresses is a directed relationship which summarizes the streamings where sender address is the flow sender, and receiver address is the flow receiver. This concept allows to scale consulting over balances, because the contract doesn't need to loop over strreamings. ​

Addresses of deployed contract on mumbai network

TODO: Add mainnet smart contract addresses

Addresses of deployed contract on mainnet

TODO: Add mainnet smart contract addresses

Deployment

Environment Setup

  1. First clone this repository to your computer.
$ git clone ...
$ cd erc20-streamable-extension/
  1. Then install the node modules.
$ npm install
  1. Create .env in the folder. Fill out all info needed on those files in according to .env.example file.
MNEMONIC=[the 12 mnemonic words]
INFURA_API_KEY=[your API key]
ETHER_SCAN_API_KEY=[your API key]
POLYGONSCAN_API_KEY=[your API key]

Deploy to Local Machine

  1. Run development server using Truffle.
$ truffle develop

​ 2. Deploy contracts.

$ truffle migrate

Deploy to Testnet (Mumbai)

$ truffle migrate --network mumbai

Deploy to Mainnet

$ truffle migrate --network mainnet

References

  1. Truffle Commands: https://www.trufflesuite.com/docs/truffle/reference/truffle-commands
  2. ERC-721: https://eips.ethereum.org/EIPS/eip-721
  3. IPFS https://ipfs.io/
  4. Bonding Curve https://coinmarketcap.com/alexandria/glossary/bonding-curve#:~:text=A%20bonding%20curve%20is%20a%20mathematical%20concept%20used%20to%20describe,pay%20slightly%20more%20for%20it. ​
  5. ChainLink Ethereum Price Feeds. https://docs.chain.link/docs/ethereum-addresses/
  6. Flash loan attack https://coinmarketcap.com/alexandria/article/what-are-flash-loan-attacks

erc20-streamable-extension's People

Contributors

ericnordelo avatar

Watchers

 avatar  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.