Technical Explanation of the ETHDenver 2019 Applications Platform

In this article, we will explain how the ETHDenver 2019 applications system works and technical details around the ETH staking mechanism.

This application platform was built by Taiga Market, a project I started last February during ETHDenver 2018 and continued working on it since then, adding Andrew Golightly and Dibesh Shrestha to the team along the way.

I’d like to offer a special thanks to Coury Ditch and John Paller from the ETHDenver organization for their support and collaboration. It’s a wonderful thing to have such an opportunity to continue to #buidl our project with their support. Of course, that’s what ETHDenver is all about :)

We were given the task to make the application “experiential” and integrate blockchain projects from the ecosystem. We also wanted to make the application a fun and futuristic experience. We hope that your experience with the application process is seamless and easy. We also understand that we’re using an emerging technology. We appreciate your help letting us know if you experience any bugs or trouble. Reach out to applications@ethdenver.com if you do.

What are the different components of your application for ETHDenver 2019?

  1. Use the uPort decentralized identity system to apply for ETHDenver.
  2. Stake your application on the ETHDenver Staking Smart Contract.
  3. If you are selected, you will receive your acceptance/ticket via your uPort app.
  4. Check-in at ETHDenver 2019, #BUIDL and connect with the community.
  5. Retrieve your stake back.

Application Submission, Staking and Team Formation

Applications for ETHDenver are now open! After several months of working on a ticketing system, we are happy to have launched this system for ETHDenver!

You can apply directly on our platform.

In this article we will focus on the following steps that are now live:

  • Application Submission
  • Staking (optional)
  • Team Formation (only applies to Hackers)

Here’s a full breakdown of the process you’ll go through in order to apply and participate in ETHDenver 2019. It may seem long when spelled out like this, but we think you’ll find it’s actually a very easy and intuitive process:

Application Submission

For the application process, the first step is to install the uPort app on your phone and create your decentralized identity. We feel decentralized identity will become an increasingly important feature in the blockchain space, giving control of identity to the user as well as allowing him/her to have a single identity to more safely connect with many different applications and platforms. This is why I believe that uPort may become a standard and we decided to make this the only way to apply and check-in for ETHDenver 2019!

uPort is an easy decentralized identity platform to onboard new users to the blockchain space, where the user completely controls their own personal information, and with whom one wants to share it. We are showcasing one of many use cases for decentralized identity. If you are interested in learning more, you can follow the uPort team on Medium or Twitter. I would love to see more projects using uPort — if you need any help integrating it just let me know!

After having installed and configured your uPort app, there are two ways you can log into our platform. If you’re viewing the platform from a desktop browser, the login flow will present you with a QR code to scan with the uPort app from your mobile device. If you’re already on a mobile device, the uPort app will be automatically opened when login is required. In both cases, you will be able to approve the login and share your information.

Please note that uPort is a new technology, so we appreciate your patience while any issues are ironed out. A current issue a few users are facing is that when uPort is activated during a login flow, it takes a few seconds before it displays your account on its user interface as a login option. So when uPort is activated after attempting to login to the platform, please wait 5–10 seconds so that the “Create New Account” button disappears, and your previously created identity is displayed as a login option instead.

Next, to share your identity with ETHDenver, simply approve the login action on your phone by tapping “Login With This Account”, review your information, and tap “Share Your Information”. Your personal details will be automatically populated in the application form. You may edit any pre-populated fields if you need to.

We want to thank you in advance for working with us and sharing your experience to applications@ethdenver.com.

Staking

ETHDenver 2019 has introduced the option to stake an amount to add credence to your application. You will have the option to stake $20 in ETH that will be returned to you if you attend the event or if you cancel your application no later than 4 weeks before the start date of ETHDenver, enabling a better estimate of attendance and acceptance of additional applications.

Although staking is optional, we strongly encourage you try it. Applications where the participants have staked an amount will receive priority review of their application(s), and will received a limited edition gift upon check-in!

Again, if you have any questions or issues with the application process, please reach out to us at applications@ethdenver.com.

Hacker Team Formation

For hackers, after submitting your application, you will have the option of creating a team or joining an existing one.

The ETHDenver #BUIDLATHON is all about community and #buidling! We wanted to simplify the process of team formation by building it directly into the platform. You are encouraged to create your own team and start inviting your friends!

Teams can have between 2 and 4 people. Each participant will need to fill out their own Hacker application so that the ETHDenver team can better understand each individual’s suitability for the event. You can invite your friends directly through the platform and they will receive an email they can click to accept your invitation. If they haven’t created an application yet, the application platform will detect that, and allow them to create one through your invitation email before giving them the option to join your team.

Note: Currently, only a team creator can manage members of a team, so if you no longer want to be on your current team, please ask your team creator to remove you.

Over the following weeks, we will add functionality to allow existing teams to more easily find teammates. We want team formation to be as easy as possible for everyone. There will still of course be icebreaker events in the days leading up to and on the first day of the event, but we hope this feature helps more teams form ahead of time this year to ensure a good fit.

Remember, ETHDenver is all about community, so don’t miss this opportunity to be part of a team. Prizes are only available to those with 2 or more on their team!

Technical Details of our Implementation

In order to handle all the private information exchanged between you and our platform, we need to use a mix of Web2 and Web3 technologies.

As mentioned above, we use uPort as our decentralized identity system, allowing us to authenticate you. For our backend system, we use a Firebase database and Firebase serverless functions.

The authentication mechanism starts on your uPort application, generating a credential signed by you. This credential, or claim, is shared with the front-end client which then initiates a request to a Firebase function to authenticate the user. This function validates the credential of the user and creates a custom Firebase authentication token. More details on Firebase custom authentication can be found here. The Firebase custom authentication token is used to query the DB and other Firebase functions.

In the diagram below, you’ll see all the interactions between you, uPort, the Taiga Market client application, Firebase DB, Firebase functions and the staking contract.

Please do not hesitate to contact us if you have questions or simply want to know more.

The submission of a new ETHDenver application is handled entirely by the Taiga Market platform, with data persisted in a Firebase database. All staking related functionality includes interactions between not only the Taiga Market platform and Firebase, but also with the Ethereum network.

Getting Approval to Stake

Before a user can stake, they need to get approval to do so by our backend system.

First a Firebase function is called with the logged in user’s uPort address. This function calculates the ETH equivalent of $20, and combines this value, with the user’s uPort address, and the expiry date (24 hours from the moment it is called). A hash is created from these 3 values. Then the private key of a trusted address is used to sign that hash and generate a signature. This signature is then sent back to the browser and used in the staking process.

The approval to stake is done by our backend system, to allow for dynamic logic in deciding who to approve. This is far more powerful and cheaper than simply having a whitelist of addresses allowed to interact with the smart contract stored on-chain.

Staking Process

The staking for ETHDenver is managed by its own Smart Contract. Each participant can stake and recoup the stake associated with his/her application.

You can find the mainnet Smart Contract code here and the Github repo here.

Stake and Recoup Stake methods

Once you have been approved by the server to stake, the smart contract staking method can be called with the uPort address, the expiry date, the amount to stake, and the signature. The smart contract will pack together the uPort address, the amount to stake and the expiry date, and hash that object. Then given the hashed message, it’ll use the signature passed in to derive who signed the hashed message. We are using the ECRecovery library from Zeppelin to derive the signer of a given message. Our friend Austin Griffith did a very good live screencast for Dapp University explaining the usage of this library.

If the hashed message has been signed by the authorised signer (as defined in smart contract), then the staked amount is associated to the uPort user address. We also keep track of the address that sent the transaction (typically MetaMask), and associate it with the user’s uPort address. This latter record is saved so we know where to recoup the staked amount.

Stake Recouping Process

The stake recouping process is very similar to the stake function. Again, we receive the same parameters: the uPort user address, the expiry date of the grant and the signature of the grant. As you may have noticed, in this method we don’t need to know what the amount staked for the given user was. This is retrieved from the staked amount map, which was updated in the staking process. We’ll take a similar approach to validate the signature using ECRecovery, but this time with one fewer argument in the message. Then the $20 in ETH you initially staked will be instantly transferred back to the account you staked from, completing the process.

In both methods, we emit an event saying that the user has Staked or Recouped the Stake, so that we can listen to these events and update our Firebase database with this information.

Conclusion

I hope this explanation helped you understand the full process of the application and staking mechanisms implemented for ETHDenver 2019.

If you have any questions or suggestions, please don’t hesitate to contact me or the team. If you want to know more about what I’m #buidling, follow me on Twitter.

I would like to thank Andrew Golightly, Hannah Oreskovich, John Paller, Justin Moskowitz, Alice Nawfal and Austin Griffith for having reviewed this article. Also, I would like to recognize William Sterling and Jean-Meyer for having shared part of this road with me.