Hedgehog Q1 Hackathon: tackling settlement risk, ERC-4337 smart contracts, and more

Django Shelton
The Hedgehog Blog
Published in
6 min readApr 6, 2023

As we move from Q1 to Q2 at Hedgehog, we’ve had a chance to reflect on what we’ve learnt so far, and generate new ideas for the future. We thought this was an ideal time to host a “hackathon” — an event where we spend a set period of time focusing on new ideas and projects, either as individuals or as teams. The goal is to create a functional prototype or solution, and present the results back to the rest of the company at the end of the event. Here’s what we learnt from it, and some of the projects we’re taking forward into the next quarter.

Simultaneous settlement of contracts, assets, and money

One of the key risks when it comes to financial transactions is settlement risk i.e. the risk that one side of the transaction will fail to deliver on the terms of the contract. This risk is amplified when it comes to individual investors, who are likely to lack the same liquidity as larger investors, or simply be less reliable.

We spent time looking into how blockchain could solve this problem. We’ve brainstormed a solution where a contract, assets (in our case, digital tokens) and money could all change hands simultaneously. This is enabled by blockchain technology, where a smart contract can handle the transaction, and ensure both sides have the necessary funds or assets to fulfil the deal up front. By doing this, settlement risk is removed at the point of the transaction taking place, and the transaction speed is only limited by the blockchain protocol being used.

A potential (rough) architecture to solve this problem without money involved

We see a huge benefit to this for both individuals (near instant buying and selling of previously illiquid assets) and asset owners (zero settlement risk while still accessing individual investors).

There are still significant hurdles to make this a reality, including how we make it user friendly for investors and how it can be integrated with KYC / AML requirements, but this is something we will be exploring further in the coming quarter and hopefully piloting soon.

App to app integration

In order to reach as many investors as possible, we need to be able to take advantage of many different distribution channels. For individuals wanting to access Hedgehog investments directly, they can use our web or iOS applications. For distribution partners, we have a web app, API integration, and file transfer options. On top of these, we investigated an “app to app” integration where a small part of Hedgehog can be directly embedded into a partners application.

This would allow a seamless transition between the two applications, with investors being directed to download the Hedgehog app from a referral widget in the partners app. Once an investor signs up to Hedgehog, that signup will be attributed back to the partner, who would then receive rewards based on investor activity with Hedgehog.

How the integration might look in a partners application

We wanted to make this as simple as possible for potential partners to add to their applications as well, so we built a library which can be easily added with just a few lines of code. Developers won’t have to be aware of any specific referral links, or the underlying implementation of how the referrals are made.

All the code a developer would need to add!

We see this as a piece of work which could have a high impact, so we’ll be taking it into our next quarter plans and hopefully launching it with our first partners soon!

ERC-4337 smart contract accounts

One of the key challenges we face at Hedgehog is how to take complex, unfamiliar concepts such as blockchain and present them to our users in an easy to understand way. There’s an important balance to be struck between the user understanding what’s happening “under the hood”, and the user simply taking advantage of the benefits the technology provides.

This challenge particularly rears its head when it comes to custody of tokenized assets. We firmly believe that self custody of tokens is the best way to give users control and peace of mind when it comes to ensuring ownership of their assets. However, the process of creating, securing, and operating a crypto wallet is not something the vast majority of people have done, and even those who have will admit it’s complex and fraught with errors and gotchas. It’s a real challenge for mass adoption of crypto / blockchain technology, and not unique to Hedgehog.

This is where ERC-4337 comes in. While the technical details are not crucial here, what does matter are the outcomes for users:

  • Easier set up: no need to write down seed phrases or private keys. Setting up a new wallet can be done with just a few clicks
  • Better security: account recovery is now possible without a private key as is multi-factor authentication. This can be done with technologies that users are familiar with, such as social sign in.
  • Flexibility on how to pay gas fees: developers can built wallets which removes this burden from the user

Ultimately, ERC-4337 could mean a much simpler user experience for engaging with crypto wallets, which should in turn increase adoption.

We spent this hackathon implementing our own ERC-4337 wallets, and showed how creating a new account can be done in just a few clicks. We then also explored how to transfer tokens between accounts, and how we can make this as close as possible to a traditional banking experience which users would be familiar with.

It may not look user friendly yet…but the capability to make it user friendly is there

Going forward, we’re excited about the possibilities this opens up for us. ERC-4337 will likely form a key part of the other project we’ve already mentioned here, the simultaneous transfer of contracts, money, and assets. It will hopefully mean we can build an experience which feels as simple as a banking app today, but with all the power that blockchain technology has promised.

The other ideas we focused on

Of course not everything in a hackathon leads to some grand idea which makes its way into a companies roadmap. Over the course of the hackathon we also:

  • Spent time getting to grips with generative AI, and how we can make use of it day to day to get better at our jobs
  • Exploring how we can integrate 3D elements made by designers into our application
  • Diving into the web of dependencies we have and understanding how we would begin to approach upgrading these over time

While none of these have led directly to a new project or piece of work, they’ll all be useful reference points for us as a team, and will start to influence how we work day to day.

Wrapping up

Coming away from the hackathon, we’ve now got some really exciting ideas to take forward into our product. We think new ways of utilising blockchain technology could enable much faster transaction speed and remove settlement risk. We also think we have a way to make the whole process of engaging with blockchain and crypto much more user friendly. Finally, we have more ways to integrate with Hedgehog for more potential partners.

It can sometimes seem hard to justify taking a break from delivering on what we know about today, but these ideas show why it can be so valuable, considering we only invested a single working day into it. We think the whole event was an awesome success, and we will be running hackathons every 6 weeks from now on. Stay tuned to get updates on how these projects evolve, as well as future ideas which come out of our hackathons!

--

--