Open stravid87 opened 3 months ago
@huzaifamk can you help me to review and provide feedback?
Great work on V1. Let's try a simple v2 that involves a contract being used as a Payment Gateway. You only need to accept one curency (i.e., Matic) but the price in USD should be stable. The contract you deploy simply routes payment to another contract of your choice (what would be the "bank") and emits an event that is accepted by the backend certifying payment and updating the client bill.
Consider implementing this as a microchannel? https://docs.soliditylang.org/en/latest/solidity-by-example.html#micropayment-channel
Overview
The clients of Layer8 will be using crypto to pay for our services. When a client logs in, they will see their usage statistics displayed for them to see. This usage is convertible to a fee that must be paid in crypto.
Notes
1) I do NOT want to integrate "Sign In With Ethereum." Instead we will keep the web2.0 sign in flow. 2) For now Metamask will be assumed the wallet of choice. 3) The amount of $$$ charged will be set low and does not need to be thought through from a business perspective.
User Stories
1)
As a client of Layer8 I want to pay my bill with money from my crypto wallet. When I click the connect wallet button I see that my wallet is connected and get the necessary prompts from Metamask to make this possible.
2)
As a client of Layer8 I want to pay my bill with money from my crypto wallet. When I click a "Pay Now" button I see the correct amount of crypto get bundled into a transaction and sent to my wallet where I can click accept. My "total owing" is decreased by the amount paid once the transaction is accepted.