A queueing system on the blockchain for meetups
- Admin rights, create a meetup event
- Create a user
- Register a user to a meetup event if there is capacity
- Join the waiting list if there is no capacity
- Check in at the gate before the start of the meetup event - check if the user can attend
- Remove a user
- Remove a a meetup event
- Allow people on the waiting list to bid for open spots from cancellations
- Cancel from the registered list
- Add and remove food options, vote for food, find winning food option
This is an MVP of the meetup-queue repo.
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?
- /: list of meetups
- /meetups/new: form to create a new meetup
- /meetups/0x1234: meetup details for meetup at address 0x1234
- /meetups/0x1234/events: event details for meetup at address 0x1234
- /meetups/0x1234/events/new: form to create a new event for meetup at address 0x1234
- 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)
- 100,000,000 total supply
- 50% issued to new users
- 30% community reward pool
- 10% venture capital investors
- 10% development team incentive
For the 50% issued to new users, reward early adopters using these multipliers
- User 1 - 100: 10
- User 101 - 1,000: 8
- User 1,001 - 10,000: 5
- User 10,001 - 100,000: 3
- User 100,001 - 1,000,000: 2
- User 1,000,001 -10,000,000: 1
Assuming there are 10m verified unique users 10100 + 8900 + 59000 + 390000+2900000 + 19000000 = 11,123,200 units Total tokens for new users: 50%1000000 = 50000000 50000000 / 11123200 = 4.4951 tokens per unit Round down to 4 tokens per unit (so keeping 10% as reserve) So for user 1 - 100, each is issued 410 = 40 tokens For user 101-1000, each is issued 4*8 = 32 tokens etc.
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 unique account starts with 100 tokens
- Work on group projects (discretionary, awarded by the meetup owners, maximum 1000 tokens per month)
- Telegram contribution (sharing resources etc.) (discretionary, awarded by the meetup owners, maximum 1000 tokens per month)
- Organise/assist: +30
- Presenter: +100
- Show up: +10
- To participate in events, need to put in a deposit of 50 tokens
- 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 tokens
- 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 tokens 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
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
*It's recommended that you install React Native Debugger.
# Install dependencies
npm i
# Start the React Native packager
npm start
Instructions are shown in the terminal. You can select to open it in:
- An emulator (either iOS or Android)
- Your mobile device with the Expo app. It will reload if you save edits to your files and you will see build errors and logs in the terminal.
# Starts are local live-reload server at:
# http://localhost:3001
npm run web-start
Via webpack, starts a localhost server on port 3001 http://localhost:3001.