Submission: status-im/hackathon#20
{
"whisper-identity": "20-coinpanion",
"name": "#20 CoinPanion",
"dapp-url": "http://coinpanion.surge.sh/"
}
CoinPanion is the ultimate blockchain subscription solution. The idea is that any user can go to CoinPanion, then they can choose to subscribe to any other CoinPanion user's Ethereum Address with a payment of X ETH per Y days/weeks/months.
CoinPanion users will have rich profiles which will tell potential coiners about themselves and what they create, work on, or are interested in. Coiners can "coin" friends, family members, or content creators whose work they want to support. With category-based discovery features, search, and a user dashboard CoinPanion is the best and easiest to use blockchain subscription service.
This project was started as a submission to the Status.IM Hackathon. status-im/hackathon#20
Simple put: Any CoinPanion
can subscribe to any other CoinPanion
.
Rahul is a program. He creates Open Source DApps for free for a better blockchain tomorrow. Rahul however has a family to feed and a home to pay for. He needs a monthly income to be able to continue writing great DApps. He goes to CoinPanion, for the first time, and is presented with his dashboard. His Ethereum Address is already filled in as Rahul is using Status to browse the DApp. He decides to personalize his profile by uploading a profile picture and setting his name, email and profile description. He writes a meaningful description and mentions some of his current projects. This will later be used when his supporters go to visit his profile.
Alon loves DApps and the whole crypto community. He recently started using one of the Open Source DApps that Rahul made. He decides that he wants to support Rahul with 1 ETH a month.
Alon visits CoinVault . His CoinVault is currently empty. He clicks on Add to CoinVault and sends 2.1 ETH to the CoinVault, a smart contract which handles subscriptions for Alon. The reason for the extra .1 ETH is for Gas fees. This funding will allow Alon to support Rahul for two months.
The he clicks on the button Coin Someone. A modal pops up where Alon enters the ETH address of Rahul. He enters 1 ETH per month and clicks Send. 1 ETH is instantly sent from the CoinVault to Rahul. The CoinVault also schedules to send another 1 ETH in a month. Every time the CoinVault sends a subscription payment, it also schedules the next one.
When the CoinVault starts to get low on currency, will be empty before next payment, it sends an email notification to Alon.
When a CoinVault is empty it stops sending out coins until it is replenished.
Rahul gets an email that he has a new CoinPanion! He visits his CoinPanion Dashboard and sees his new subscriber Alon.
For more Use Cases look at USECASES.md
- Clone this repo
- Run TestRPC local node or similar.
- Download and install truffle and its dependencies
- Compile CoinPanion with
truffle compile
- Install CoinPanion on the blockchain with
truffle migrate
- Run
Yarn start
ornpm run start
- Visit:
http://localhost:3000
to checkout the Dapp
- Visit CoinPanion in Status.IM or similar
- Search for the person you want to Coin
- Visit their Profile Page
- Click
Coin User
- Select an amount and a time interval
- Press Send
- Visit CoinPanion in Status.IM or similar
- Visit your dashboard to view your available payments
- If the time interval has passed for a specific payment an Accept Payment button will appear.
- Accept Payments by pressing Accept
- Alon visits his Dashboard
- Firebase returns that Alon doesn't have a Vault Contract Saved in DB
- Alon has a button:
Initialize Vault
- This fires off
vault..deployed(userAddress, userAddress, 0, 0, userAddress, 0)
- The vaultAddress is saved into the DB so that next time that Alon visits his Dashboard his vault is loaded again.
- Now Alon can Load his Vault, Coin Someone etc
- Alon visits the Profile Page of Tim
- Alon Clicks Coin Tim
- Alon inputs 5 ETH per Month
- Alons VaultInstance is called using
vaultInstance.authorizePayment
vaultInstance.authorizePayment( 'alon', coinSomeoneAddress, Number(coinSomeoneValue), Number(subscriptionDelay), { from: userAddress,gas: 500000 })
- This function returns a
paymentId
. This needs to be saved into the DB of Tim along with the vaultAddress of Alon, payoutTimestamp (Timestamp when Tim can get Payment)
- Tim enters his dashboard
- He sees that he has a payment with paymentId
xyz
. - If the payoutTimestamp has passed. Tim can click on Accept to receive his Ether.
- If the payoutTimestamp hasn't passed. Tim can see how long until he can receive his Ether.
Receiving Ether is done with: alonVaultInstance.collectAuthorizedPayment(xyz, {from: timAddress})
- Truffle
- React
- WebPack
- Blockchain - TestRPC or Ropsten
- Src - contains the front-end's source code
- Config - configuration and install scripts
- The rest of the folders connect us to the Ethereum universe via
- Web3 with Truffle through the Status.Im platform
Join us on the Status.IM Slack channel to chat with us!
- Github Handle: @Alonski
- Slack Username: @alon
- Github Handle: @rhlsthrm
- Slack Username: @rahul
- Github Handle: @imbaniac
- Slack Username: @treznich
- Github Handle: @Josephrp
- Slack Username: @JosephP