GithubHelp home page GithubHelp logo

subscrypto's Introduction

Subscrypto

Subscrypto is a dApp for payment over time on the Ethereum blockchain.

Note to COS 495 Staff: We have continued working on this project post Dean's Date due to our grant agreement with the Ethereum Foundation. We are currently upgrading our web app and preparing for deployment to the Ethereum mainnet. Feel free to use our last commit before Dean's Date for grading purposes. To run the testnet Subscrypto on your device, follow the Run locally instructions below.

Here's a brief overview of how the smart contract works:

Each wallet has a corresponding Subscrypto Account which contains a map of their subscriptions.

Subscriptions contain information about the sender (subscriber), receiver (seller), subscription balance, amount currently available to collect, agreed amount to be paid, and interval at which that amount is paid.

For example, if we had a SubscriptionInfo struct which looked like this:

SubscriptionInfo {
    sender = aaronskepasts.eth
    receiver = philliptaylor.eth
    balance = 100 ETH
    payment_amount = 10 ETH
    payment_available = 20 ETH
    total_paid = 0 ETH
    next_payment_time = now + 26 days
    last_payment_time = now - 4 days
    time_between_payments = 1 month
    time_activated = now - 2 months - 4 days 
    time_balance_last_updated = 2 months - 4 days
}

We could deduce that Aaron was making a payment over time to Phillip. Aaron agreed to pay Phillip 10 ETH per month for the next year. Aaron paid 120 ETH upfront and two months have passed already. However, Phillip has not collected the 20 ETH available to him yet. Instead, the smart contract is holding it in escrow.

Run locally

Dependencies: For simple, zero-configuration command-line static HTTP server:

npm install http-server

Run:

git clone https://github.com/archie-mckenzie/subscrypto.git

cd Web

http-server

Navigate to localhost:8080 on a browser to access the Subscrypto web app.

subscrypto's People

Contributors

archie-mckenzie avatar aaronskepasts avatar philliptay avatar

Stargazers

Will Kantaros avatar  avatar

Watchers

 avatar

Forkers

philliptay

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.