Giter Site home page Giter Site logo

mampudi / blockchain-developer-bootcamp-final-project Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 399 KB

This is a decentralized loyalty program that allows customers to earn loyalty tokens when they purchase from partners.

Shell 0.70% Solidity 47.09% JavaScript 52.21%

blockchain-developer-bootcamp-final-project's Introduction

Nebula Loyalty Program

This is a decentralized loyalty program that allows customers to earn ETH when they purchase from partners.

About

The purpose of this project is to develop a platform where customers can earn ETH when they purchase from partners. When making a purchase the partner will reward the customer with ETH based on the total value that the customer spent. The customer can then sawp the ETH for DAI or other ERC20 tokens allowing customers to be in total control of how they move and preserve their value. This is in contrast to how most loyalty programs function as the points are help by the loyalty program owner and customers can not move around in a permissionless way with the points they have earned.

The customers that have made a purchase from any of the partners within the last 7 days will be eligible for a weekly lottery. The lottery winner gets a percentage of the total pool amount.

Example Workflows

  • As a partner I want to register on Nebula so that my customers can be rewarded with loyalty ETH.
  • As a customer I want to earn ETH based on my purchases with partners so that I can be financially rewarded for my loyalty.
  • As a customer I want to swap the lotalty value I have earned for DAI so that I can use it to fit my needs when the time comes.
  • As a customer I want to take part in weekly lottery so that I can get more value for shopping at partner stores or websites.

Live Deployed Site

https://mampudi.github.io/blockchain-developer-bootcamp-final-project/#

Screencast Link

https://youtu.be/z1lUeKnW6Pk

Requirements

  • Node.js >= v14.0
  • Metamask Wallet installed in the browser

Installation

  1. Install truffle
npm install truffle -g
  1. Clone this repository and cd into the folder:
git clone https://github.com/mampudi/blockchain-developer-bootcamp-final-project.git
cd blockchain-developer-bootcamp-final-project
npm install

Test

The local testnet should be running on 8545

truffle test

Deploy

⚠️ When pushing your code to Github, make sure that your MNEMONIC, RPC_URL and MUMBAI_RPC_URL are stored in a .env file and it is also in your .gitignore

For deploying to the kovan network, Truffle will use truffle-hdwallet-provider for your mnemonic and an RPC URL. Set your environment variables $RPC_URL, $MUMBAI_RPC_URL and $MNEMONIC before running:

truffle migrate --network kovan --reset

Local Blockchain

⚠️ Without a Chainlink node deployed locally, requests from smart contracts will not be responded to. We recommend you deploy to the Kovan network

If needed, edit the truffle-config.js config file to set the desired network to a different port. It assumes any network is running the RPC port on 8545.

In vsCode use open with live server to run /docs/index.html

truffle migrate --network local

Public Wallet Address for Certification

0xE816d7fB61c03997157a916DC0B0a9a8101958Ce

blockchain-developer-bootcamp-final-project's People

Contributors

mampudi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

blockchain-developer-bootcamp-final-project's Issues

Grading Feedback...Great Job!

Hey @mampudi ! Great job on your Final Project, you passed. We'll be approving it on the course itself in a week or two, but here's your feedback in the meanwhile:

Frontend

  • Frontend is straightforward, really appreciate you getting all the basics in there!

  • One error-handling issue is when someone does not enter a value on the registration form, you should throw an exception on the client level, not let it get to the wallet! Not a dealbreaking, but a better UX I think.

  • Love how you had the ""processing..."" for the user, this kind of visual feedback really helps users

  • I also appreciate how you have the ability to Disconnect and the different roles

  • TVL is a nice touch as well!

  • The Kovan deployment, does that allow you to also port it to Polygon? I noticed you the .env variable name for MUMBAI_RPC_URL -- cool option if so!

  • Loved that you used Github pages, hope the deployment process was good -- no need to reinvent the wheel if you already have a Github repo!

Testing

  • Really like your testing setup, the decomposition of the accounts into the different users is really great
  • Appreciated your clear instructions on the README for your repo, helped with running tests
  • Comments on the Solidity code look great, really helpful for understanding the flow

Design and Security

  • Appreciated your clear instructions on the README for your repo, helped with running tests
  • Comments on the Solidity code look great, really helpful for understanding the flow
  • Very interesting you used the Chainlink VRF oracle and Keepers, was that challenging to implement? How about for testing?
  • Very standard attack vectors protected against, reentrancy protection really great and glad to see you're swapping in .call for .transfer
  • Again, very cool you're using the Chainlink contracts.
  • Is the raffle / lottery functionality going to be implemented later in the interface? I don't think I saw that mentioned in the README but the Solidity implementation looks good!

Final Comments

  • Third time I'm mentioning it, but great job incorporating Chainlink, very curious to hear how Keepers goes!
  • Love the idea of disconnecting the loyalty points from the platform and allowing folks to spend them wherever.

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.