A queueing system on the blockchain for meetups
MVP: just build the meetup mechanism to start with
To allocate meetup spots in a fully transparent manner using smart contracts the ethereum blockchain
Reward people for regular attendance and contribution
Penalise people for late cancellation and no show's
Most importantly, use this project as an opportunity to learn to write a diverse range of smart contracts
BokkyPooBahs-Ethereum-Workshop has become so popular that the available spots often get fully booked out within a few minutes. Since the meetup is about blockchain, why not solving this problem using blockchain?
- Admin rights, create a meetup event
- Register and deregister user
- Join and leave an event
- Last minute auction - allow people to bid for freed up spots
- Authenticate users before each event
- Reward/ deduct points
- Insurance pool for points penalty
- Borrowing/lending points
- Reward points for projects - allow users to submit a github repo
- Monthly community voting - to decide which gitub repo to award points to
- Distribute award points based on number of commits
- Replace points with an ERC20 token (which can only be earned, but not bought)
- Web frontend
- App
- No transaction cost (ETH can be obtained for free)
- Low latency if putting a high enough gas price (low latency is important for event entrance and time dependent late cancellations)
We need to move the meetup account database or a form of identity based on it onto the blockchain.
Steps
- Create a master list of meetup account ID's based on the meetup website
- Users need to set up a new Ethereum account and get free Ropsten ETH (details to be followed)
- Users go to the website and register using their meetup account name
- Users can also deregister them selves in case of mistakes
- Contract owners can deregister users (e.g. when someone accidentally registers another user's account)
Accounts are checked against the masterlist
- There'll be a smart phone app that users can store their Ethereum public address and present it as QR codes
- Before each meetup, the organisers will need to use an app to scan users QR codes
- Only registered people are allowed to enter
- Every account starts with 100 points
- Work on group projects (discretionary, awarded by the meetup owners, maximum 1000 points per month)
- Telegram contribution (sharing resources etc.) (discretionary, awarded by the meetup owners, maximum 1000 points per month)
- Organise/assistantst: +30
- Presenter: +100
- Show up: +10
- To participate in events, need to put in a deposit of 50 points
- no show, no cancellation (or cancellation after event start time): -50
- late penalty:
- more than 24 hours before the event: 0
- 12 - 24 hours before the event: -2
- 6 – 12 hours: -5
- 3 – 6 hours: -10
- 0 - 3 hours: -15
- Based on order of registration
- If everyone who initially register comes to the event there'll be no auction
- Spots freed up in the last 24 hours are available for auctions
- Auction the spots with your points
- Auction starts as spots open up
- Auction ends 1 hour before the meetup
- Might make it easier to transfer tokens, borrow/lend tokens etc.
- Issue ERC721 tokens for each meetup event and each spot
- Receive these tokens when entering the venue
- Use ERC721 to deomstrate skill level
- Later on: set up blockchain questions, answer them by submitting a transaction, if the answer is correct, receive an ERC721 token
Vote for
- Food choice
- Projects to reward points to
- Proposals
- Meetup owner – multip owners, allow transfers
- Meetup acconts - Array of addresses, mapped to meetup names
- Array of meetup events (contract addresses)
Meetup event (struct)
- Organiser
- Assistants
- Presnenters
- Date and time
- Maximum capacity
- Late cancellation period
- Register user
- Deregister user
- Create a new meetup event – ownly organiser and assistants can do this
- Cancel a meetup event – ownly organiser and assistants can do this
- Register for a meetup event
- Deregister from a meetup event
- Enter into last minute auction
http://truffleframework.com/boxes/react-uport
- Install Node.js 9.x.x with NVM
- Install Truffle, Ganache CLI ethereum client for local development, and Yarn
npm install -g truffle ganache-cli;
brew install yarn
- Change into the project directory
cd react-uport/
- Install the node dependencies.
yarn install
- Run Ganache CLI.
ganache-cli \
--port="7545" \
--mnemonic "obey flight jump bean salt female logic inside sugar case venture media" \
--verbose \
--networkId=1000 \
--gasLimit=7984452 \
--gasPrice=2000000000;
- Compile and migrate the contracts.
truffle compile;
truffle migrate --network development
- Run Webpack server for front-end hot reloading
- Note: Smart contract changes must be manually recompiled and migrated.
yarn start
- Debug (use Truffle Console after starting Ganache CLI in a separate tab)
truffle console
truffle(development)> for (var i in web3.eth.accounts) { console.log(web3.eth.getBalance(web3.eth.accounts[i])) }
Go to ganache github and install v1.1.0-beta.1 - Candy Apple
Note: the latest stable release crashes frequently and does not give consistent results
- Jest used to test React components using Truffle
truffle compile;
truffle migrate --network development;
yarn test
Truffle used to test Smart Contracts
truffle compile;
truffle migrate --network development;
truffle test
yarn build