From Idea to Finalist

How the idea of a new crypto payment protocol turned into reality within a 3 week Hackathon.

Nov 02, 2020


Previously we wrote about how we would like to raise the payment experience in the decentralized web to a new level and how we will develop the first version of DePay as part of the ETHOnline hackathon.

This article will share our experiences and the results from participating in the ETHOnline hackathon.

With the start of the Hackathon, 2nd of October 2020, we got access to the ETHOnline "hacker dashboard" and a very important question was raised.

"How are we gonna manage to deliver a working solution within 3 weeks of time."

So we broke a potential solution of the DePay widget into 3 main parts. Every part being deliverable within one week of the hackathon. Every week being a sprint on its own:

  1. Payment configuration

  2. Payment widget user interface

  3. Payment protocol smart contract


1. Payment Configuration

In the first week of the hackathon, we've built an easy way for sellers and merchants to configure what payment they want to receive. We enabled them not only to select existing tokens from a list but they can also import custom ERC20 tokens as payment for their products and services.


2. Payment Widget

In the second week, we focused on the User Interface of things. We built a state-of-the-art payment dialog which allows users to see what they are going to pay at a glance.

The payment widget also scans the user's wallet to identify assets of value, by checking which of those assets are exchangeable on decentralized exchanges, what the current exchange rates and network fees are, and finally, it selects the most cost-efficient route to perform the payment and enables all ERC20 tokens to potentially be used at any point of payment.

There are generally 3 different ways of settling payments between buyers and sellers when using DePay Payment.

  1. Direct Transfers. In cases where the buyer has enough of the requested token in his/her wallet like ETH to ETH or DAI to DAI payment.

  2. Token to ETH or ETH to token payments like ETH to DAI or DAI to ETH. Those payments require to be settled by receiving the incoming token from the buyer, swapping it via decentralized exchanges, and sending the requested token to the seller.

  3. Token to Token payments like DAI to UNI which also needs to be swapped on decentralized exchanges while performing the payment.


3. Payment Protocol Smart Contract

The goal of designing the DePay payment protocol smart contract was to execute all previously mentioned payment scenarios in a single transaction. Recieving the token used from the buyer to perform the payment, swapping it if required, and finally sending the token requested from the buyer to conclude the payment, reverting the transaction in case anything goes bad, to ensure not only buyer funds are safe, but also that the seller receives the payment.


Judging Round One

All things came together, perfectly in time. Even though it was stressful we were super happy to have been able to finish the entire DePay payment widget and even managed to deploy it to mainet and execute payments.

We've submitted our pitch video to the ETHOnline judges and couldn't wait to present it.

In the first judging round, we've presented in front of Min Teo (ConsensSys Labs Investor), Joyce Yang (Global Coin Research & Global Coin VC) and Spencer Noon (Head of Investments at DTCCapital).

Followed by 3 minutes of Q&A in which we received great feedback for the product and talked about potential ideas and future features. Mainly:

  • Personal payment configuration. So that DePay Payment remembers personal preferences about what tokens a user prefers to use for payments and to suggest it next time a particular user performs a payment.

  • Allow users to configure their personal payment to send swap slippage automatically to the charity of their choice when performing payments.


The Finals

Two days after we finished the first judging round, we had been informed that we've made it to the ETHOnline finals. Only after the finals, we've realized what that meant.

At Ethereums biggest yearly online event, we've been selected from 710 hackers and 175 projects worldwide to be one of 12 projects presenting in front of the biggest Ethereum audience.

The judges at the ETHOnline finals have been: Camilia Russo (Chiefess at DefiantNews), Stani Kulechov (Founder and CEO of Aave), Ashleigh Schap (Growth Lead at Uniswap) and Kartik Talwar (ETHGlobal).

Gladly our entire presentation went smoothly, even though everything was live and the payments were executed directly on mainnet.

The ETHOnline finals are not supposed to pick a winner, so we mainly received feedback and questions from the judges. In the finals, Ashleigh took the lead and asked about:

  • How the token swap routing works when paying, and if it considers multiple decentralized exchanges.

  • If sellers can select any "currency" when configuring DePay Payments.


Sponsor Prize

The ETHOnline event is backed and supported by various sponsors. Every sponsor also writes out extra sponsor prizes often required to use their technology.

Because we managed to integrate Mooniswap exchange when routing payments, 1inch.exchange handed us one of their sponsor prizes, gave us a shout out on Twitter and published us in their feature Medium article.


Our ETHOnline Hackathon showcase page: https://hack.ethglobal.co/showcase/depay-recNEUpmNxurdbAFB