Peer Stream utilizes payment streams to link TIME with MONEY, giving freelancers and clients more freedom and flexibility to engage with each other than ever before. Instead of paying lump-sum for services, payment streams give individuals the flexibility to stream funds to people for their time. They can agree on any ERC-20 currency and start/stop the payment stream at any time. Service providers can withdraw from the stream instantaneously.
See the live demo at https://peerstream.netlify.app. At the moment, payment streams only work with Testnet DAI. Find out how you can mint yourself some Testnet DAI in the development section. There is also a project pitch deck made for a hackathon but its contents are pretty much identical to this readme.
The Peer Discovery Platform allows individuals to connect with with mentors, consultants, beta testers, domain specialists, and all kinds of experts that can help them achieve their goals.
- Connect 3Box account
- Add a note about your expertise
- Get contacted by potential clients
- Start a 1-1 video chat
- Continuous payroll. Withdraw from the stream any time
- Browse for peers that might be able to lend a hand
- Start a direct messaging channel with peers
- Get on a 1-1 video chat
- Start a payment stream for their services
- Pay-as-you-go, cancel the stream any time
As the payer, you can set the total amount, start time and stop time of the payment stream. Every minute between the start and stop time, your deposit will incrementally be allocated to the recipient. The recipient can withdraw from the payment stream whenever they want, and the sender can cancel the stream whenever they want. If the stream is cancelled before the stated stop time, the "streamed" funds are sent automatically to the recipient and the sender gets back the remaining funds.
- Flexible in when you pay and what you pay with. Streams work with any ERC-20 token
- No lump sum payments. Clients can minimize loss by cancelling early if the engagement is not working out
- Recipients can withdraw from the payment stream whenever they want
- Instead of having to wait for biweekly or monthly paychecks, payment streams turn every day into payday
- User profile information and private chat history secure and decentralized data storage system
- Use your existing social identity instead of creating yet another account that is siloed on one platform
- Freelancers can earn reputation as a peer and take this reputation with them across applications
- 1-1 chat history is managed via encrypted threads stored on IPFS, only readable by the peers involved
- Payment streams are handled by Sablier - The protocol for real-time finance on the Ethereum blockchain.
- Peer profiles and P2P chat is handled by 3box - A next-generation framework for managing user data on the internet.
- Video chats utilze WebRTC technology via PeerJS
Sablier is a protocol for real-time finance. It is this protocol that makes payment streams to be possible. A payer's deposit is sent to the Sablier smart contract, which handles the "streaming", or incremental allocation of deposited funds over the time period specified by the creator of the payment stream. The recipient can withdraw from the payment stream at any time.
3Box is a secure and decentralized user data storage system. It allows for the development of fully-featured applications without needing to run a backend for handling user data. In exploring the possibilities of this, this project was built without a database. Instead, users' profile information, as well as private chat history, are stored on IPFS via 3Box.
- Clone this repository
git clone https://github.com/nichanank/peerstream.git
- Install parent directory dependancies
npm i
- Install app dependancies
cd packages/react-app && npm i
- Bring up the app with
yarn start
and it should be running onlocalhost:3000
Testnet DAI is an ERC-20 token that was made for the purposes of testing decentralized applications. It is available on all the Ethereum networks (Rinkeby, Kovan, Ropsten etc.). Here is the token's source code
- You can mint yourself some Testnet DAI by going to the contract on their respective Etherscan-s, navigating to
Contract
and thenWrite Contract
.
- Kovan: https://kovan.etherscan.io/token/0x7d669a64deb8a4a51eea755bb0e19fd39ce25ae9#writeContract
- Rinkeby: https://rinkeby.etherscan.io/address/0xc3dbf84abb494ce5199d5d4d815b10ec29529ff8#writeContract
- Ropsten: https://ropsten.etherscan.io/address/0x2d69ad895797c880abce92437788047ba0eb7ff6#writeContract
- Goerli: https://goerli.etherscan.io/address/0xf2d1f94310823fe26cfa9c9b6fd152834b8e7849#writeContract
-
Click
Connect to Web3
to sign in with your wallet and get your tokens by calling themint
function. -
Because Testnet DAI adheres to the ERC-20 standard, whose token decimals is 18, remember to add 18 zeros to the amount you want to mint. For example if you wanted to mint 9999 TestnetDAI you would put
9999000000000000000000
. Double check that the testnet Etherscan that you're on matches the one on your Web3 wallet.
Once you have your TestnetDAI you're good to go to test the payment streams feature in the demo! Sign in with your Web3 wallet on the same test network and click Start Stream
on a Peer Card. Unlike with Etherscan, the app takes care of the 18 token decimals, so if you want to stream 100 tokens to the Peer just put 100.
- Virtual world architects are streamed MANA for their time designing in-world estates for clients
- Beta testers are streamed DAI for interacting with and giving live feedback on new applications
- Experienced engineers and security experts are streamed cDAI for giving private workshops and webinars
- Pay-per-minute-stream for your attendance in online classes instead of paying lump sum for access at the beginning
- Micro-consulting. Get paid even for 10 minutes of your time to answer quick questions from one-time clients
- ... and much more. The world is our oyster guys and gals
This project was built for the DragonQuest virtual hackathon which took place from the 1st to 30th April 2020. I had been excited about the prospect of money streaming and user-owned data for a while and saw that this hackathon came at a great time for me to experiment with both. The project was bootstrapped with Create Eth App and the Sablier Template. The boilerplate comes with a basic example for how to connect and pull data from the Sablier subgraph.
This template contains two packages: