The great story of how someone with no skills built a multibillion dollar protocol. Just kidding, H2M explained. Keep reading if you like Hegic.

Hegic 2ndary Market: Motivation & Design

jmonteer
7 min readFeb 1, 2021

TL;DR version

I am presenting my third and a half project¹ ² ³ based on Hegic: Hegic 2ndary Market

H2M is a secondary market where option holders can sell their options without the need to wait for a counterpart willing to buy their option. To build it, I decided to use an AMM approach to provide instant liquidity for users selling their options.

The result is a win-win-win: Option holders will be able to extract more value from their options by instantly selling them to a Pool (i.e. liquidity providers), who will buy them cheaper than in any other provider. Also, option buyers looking for cheap options will be able to buy them from the pool.

This project is done in partnership with @CryptoSamurai and will be live @ hetoro.com

The Protocol is in ALPHA. Read last section: “Next Steps”
Providing Liquidity will be restricted to whitelisted accounts that understand risks well enough. Get in touch if you are interested and can afford to lose money.

¹ Hegic Staking Pool
² Hegic Tokenizer
³ Hegic Auto exerciser (feat. Macarse)

IMPORTANT: You must DO YOUR OWN RESEARCH. When you deposit crypto assets in the Protocol, you are subject to the rules of the code. The contract is between you and the code. I will not refund you in case of unexpected outputs / losses / hacks / whatever happens. Also, if you end up earning money with this: I don’t care. Thank Vitalik, not me. H2M is an experiment and should be considered as such.

Why?

When I discovered Hegic Protocol I was amazed, I jumped to reading its whitepaper (which is no longer valid), read and understood its code and how Molly designed the protocol. It was v1 and it was seeing nice initial traction.

Soon after that, v888 was launched and from that point, you all know the amazing story (+$100m traded in <10 weeks, blah blah). However, apart from other important stuff that is being worked on, something super important was missing: good value extraction through a secondary market. Until now, the only (and still pretty good) way to get profits from an option purchased from Hegic was exercising it.

This basically means that if you exercise the option before the maturity date, you are “losing” the time value of options, which I will not get deep into. For example, I have an ITM call with 25% profit and 4 days to expiration. What if instead of exercising with a 25% profit I sell it to someone else for a 30% profit?

As I said, it could not be done until now.

Introducing the Hegic 2ndary Market or H2M

I have created a small protocol on top of Hegic Protocol. The H2M uses a peer-to-pool approach to allow instant liquidity for options. This means that users can extract more value from their options without the need of waiting for a counterpart to sell their options. As in an AMM, options’ price is determined by a formula and liquidity is available for *any* option.

Also, this means there is a pool buying options. Again, I believe this is an important part of the design. The worst thing of selling options is that, due to their specificity (strike, period, size, asset, type, …), it is difficult to match supply and demand instantly. And you already know what is the best thing of the peer-to-pool approach used in an options market: instant liquidity for any option.

Let’s get into more detail. Enjoy!

How it works?

There are 3 types of users in H2M. They are:
- Option sellers
- Liquidity Providers
- Option buyers

Liquidity providers, as you might have guessed, provide liquidity to H2M pools. These pools use that liquidity to buy options from option sellers, which sell their options agreeing to a price set by H2M. Then, H2M can do two things to extract value from the options it bought: exercise them when they are in-the-money (ITM) or sell them to other users (option buyers) for more than they were bought for.

So, the full life-cycle of an option that goes into the H2M is

  1. Option is bought from Hegic.co. It needs to be tokenized into an NFT token to be sold (or buy it already tokenized at hetoro.com)
  2. Market conditions change and user wants to take profit. They sell the option to Hegic 2ndary Market for a certain price (always above what the user would earn from exercising it). The H2M pays for that option and holds it now.
  3. The option is listed to be sold to another user, if someone is interested, for a higher price. At this point, three things can happen:
  4. a. A new user buys the option from H2M and the pool earns money from the trade.
    b. The option expires ITM and is exercised before it expires, making the pool earn some profit.
    c. The option expires OTM and is worthless.

This effectively means that:

  • Option Sellers are selling their options, extracting more value than with any other alternative.
  • The H2M Pool (thus, LPs) is buying super cheap options (vs. other venues).
  • Option Buyers are buying cheap options too (although a bit, not much, higher than H2M pool), choosing from the H2M portfolio.

So this is a win-win-win situation.

For all that, there is a low fee on Option Selling and Option Buying of 5% of premiums (not notional value, but premiums). This cash flow will pay for protocol maintenance and will be distributed in case of further decentralisation.

You will be able to use H2M at hetoro.com (thanks to CryptoSamurai)

What about the design?

So, now that you understand what H2M is and how it works from a user’s perspective. Let’s get into details. If you dgaf about details and just want to ape into buying cheap options, you already know what you need to do (hint: provide liquidity). You should read last section: “Next Steps”

The Protocol has 8 contracts:

  • Two Front Contracts (users’ interfaces with the protocol):
    - OptionsBuyer: it buys options (users use them to sell options to H2M)
    - OptionsSeller: it sells options (users use them to buy options from H2M)
  • Two Manager Contracts (implement logic):
    - OptionsManager: manages options and acts as an interface for optionsPool. It implements logic to buy, sell and exercise options.
    - CapitalManager: only contract that can use LP’s capital to withdraw (when paying to option sellers) or deposit (when charging to option buyers).
  • Two Pool Contracts (hold assets and manage them):
    - OptionsPool: holds options and has minimal functionality for option buying, option selling and portfolio management.
    - CapitalPool: holds capital from LPs, has LPs functionality (provide and withdraw) and minimal functionality for option buying and selling (which logic is managed by CapitalManager).
  • Two Support Contracts (provides a separate upgradeable way to price options):
    - OptionsPricerSeller: prices options (for sell-side)
    - OptionsPricerBuyer: prices options (for buy-side)

This design might not be / is not perfect but it is the design I came up with when I tried to abstract contracts holding assets from contracts managing the assets. That way, I can upgrade Front contracts and Manager contracts without migrating assets or asking users to reapprove ERC20 or ERC721 contracts. I would love to get feedback, though.

Next Steps

Marketing and volume: This is the beginning. I only intro’d the protocol. Then, there are two ingredients required for its success: users selling options and liquidity providers “buying options” (i.e. providing liquidity to buy options). This is the main next challenge. I believe beta version of H2M will generate a good P&L for LPs but it is not sure until it happens, and for that we need users and liquidity.

Remove guest list from Liquidity Providing: In the first alpha version, Liquidity Providing will be restricted to whitelisted users. These users need to understand the risks that come with providing liquidity and some specifics about this pool, as well as the next steps to secure their investments. This is the reason I’ll be whitelisting only people that I am sure understand risks and can afford to lose that amount of money. As soon as the protocol is tested, I’ll remove the need to be in the guest list.

Add WBTC options support: I decided to focus on ETH options to deliver the first version of H2M. The second iteration will include WBTC options too, do not worry.

Options Pricing: At the beginning, options will be priced using a simple algorithm that should return *low* (still better than any other source) values to preventLPs losing money. This means that there is still room for improvement. Contracts are designed to be upgradeable in that regard so…

H2M’s Portfolio Management: There is huge room for improvement in the logic choosing what to do with options: Should the pool hold this option until maturity? Should it sell the option for 5%, 10% or 15% more than it bought the option? Should just hedge the bet? This is where we go from a good P&L for LPs to a pro-P&L. Important and super interesting work to be done here.

Do you want to help in any of these fields? Contact me.

Thanks

I would love to thank:
CryptoSamurai for the front-end, it is awesome to work with you.
Carlos AKA Macarse for reviewing the code pre-launch and moral support as a friend.
Lastly, Molly Wintermute for solo-building Hegic Protocol.

--

--