Hegic Protocol (HEGIC)

From CryptoWiki

(Redirected from Hegic)

Basics

Hegic Protocol
TypeOptions Trading
Total supply3,012,009,888.00
Websitehttps://www.hegic.co/

"Hegic is an on-chain options trading protocol on Ethereum powered by hedge contracts and liquidity pools. Protocol can be used for trustless creating, maintaining and settling of hedge contracts."

History

"Hegic is another options protocol, however what makes it unique is the fact that it's run by an anonymous founder by the handle 0mollywint3ermutz. The site is pretty primitive, contracts are in beta, however I wanted to mention it since this will be a project to keep your eyes on due to the lack of legal boundaries this can go. Options for securities and other risky assets, I'm sure Hegic will happily do something as risky as that."

"Hegic’s product is probably the quickest DeFi project to go from launch to critical bug as both of those things happened within a few days last week! The short of it is that a new DeFi Protocol that allows you to trade options (called Hegic) deployed their contracts to mainnet, received a lot of hype and some capital inflows, then a critical bug was discovered that led to frozen funds in their contracts. Now, ~$28,000 is forever locked in their contracts due to that bug (though the team will be covering the losses)."

Audits & Exploits

"No audits have taken place on Hegic V8888. Older versions (V888) have been audited by PeckShield, but since V8888 is a different product this iteration remains unaudited."

  • Previously scored a 75% (1-12-2020); "​There was a Peckshield audit on October 2020 on the newer version of code v888. The audit was done before release with corrections implemented." With the comment: "Docs and tests are a bit weak but good audit and all the info for code and team available."

"After finding a bug in your code in your first version, why did you decide to relaunch Hegic without an Audit?

You can read the post-mortem article that I’ve wrote to share my thoughts about the real process of working with auditors that I’ve experienced. They can tell you that a three-days security audit will provide a good coverage even after you asked if this could even be possible and on the next day they will publicly say that it wasn’t a “real” audit. But it’s only my personal experience. Before launching v1.1 in June, I’ve finally decided to hire another audit firm and they have audited the code of v1.1."

Bugs/Exploits

"The only thing inside [the Hegic Github] repo was a bunch of solidity files. No automated tests (standard software development practice, especially for contracts), no linting, deployments scripts or other basics. What's inside these files anyways? Well essentially, just some Solidity code - but poorly formatted. For those of you that aren't technical, reading this file is kind of like reading English but you can tell that it's someone who has just learned to write the basics. Same thing here but for software engineering. I wouldn't say all poorly formatted code == bad code but more so it's an indicator of the person writing the code. Turns out Hegic did by none other than Trail of Bits!"

What follows is a back and forth between Hegic and Trail of Bits, where it seems like Trail of Bits did not handle the situation carefully.

  • Hegic had to shut down again because of an exploit that Sam Sun reported weeks beforehand (21-5-2020).

Governance

Admin Keys

"There is no access control information. For older versions, admin information was found but this must be updated in V888 documentation in order to remain relevant. No pause control documentation was found."

"Hegic Protocol V1.1 contracts admin key holder CAN:

  1. call setLockupPeriod function to change the lock-up period for liquidity providers (can only be <60 days)
  2. call setImpliedVolRate function to change the Implied Volatility proxy that influences the fees
  3. call setMaxSpread function to change the maximum spread for the swap on the Uniswap Protocol
  • Hegic Protocol V1.1 contracts admin key holder CAN'T (after 90 days from the day of contracts deployment: 30/05/2020)
  1. can't withdraw users' funds from the pools contracts using the withdraw function
  2. can't lock users' funds on the liquidity pools contracts calling the call lock function
  3. can't unlock users' funds on unexercised active contracts calling the unlock function
  4. can't send users' writeETH / writeERC tokens calling the transfer function
  5. can't exercise users' active options contracts calling the exercise function"

"Hegic Protocol has opened up its governance to four groups of stakeholders to get the ball rolling."

DAO

  • Token holders will be part of governance according to the website (25-2-2021):

"In the future, it will be the way to delegate governance of the Hegic Protocol to the community of token holders."

"HEGIC tokens are used as part of the Hegic Improvement Proposal (HIP) mechanism. HEGIC token holders can vote on key protocol parameters such as hedge contracts rates, settlement fee size, strike price multipliers, and assets supported by hedge contracts. Hegic Improvement Proposals (HIPs) are intended to be the main governance mechanism to submit improvements to the protocol. The process will be implemented once the protocol accumulates enough traction. The team plans to transition governance to the community when Hegic reaches at least 100 monthly active holders and writers."

Treasury

"— 10% will be allocated to the Hegic Development Fund (HDF). This amount is subject to linear vesting among 48 months after IBCO end (12/09/2020)"

Token

Launch

"HEGIC is using what it calls an Initial Bonding Curve Offering, for its sale today. Every HEGIC IBCO participant will have the same price of 0.0000057 ETH / HEGIC (~$0.0027) for HEGIC tokens. During the IBCO contributors’ liquidity will be pooled and settled, and tokens will be claimed after the sale ends. That means there will be no difference in settlement prices for the contributors."

  • From this Vietnamese blog (3-12-2020):

"The HEGIC token was listed on the bonding curve contract via the Hegic website on September 09, 09. With a starting price of 2020 ETH / HEGIC (close to $ 0,0000069) and a final price of 0,0027 ETH / HEGIC (close to $ 0,007537), selling 2,93% of the total public HEGIC supply."

  • From this comparison blog (1-12-2021):

"This token sale was quite a success with 31,000 ETH raised during this IBCO process."

Token allocation

"HEGIC an ERC20 token that is used for distribution of 100% of the settlement fees between all the token holders and in the protocol on-chain governance purposes. HEGIC token combines the collective fractional ownership, utility and governance functions. HEGIC has a fixed supply of 3012009 HEGIC tokens, which will be unlocked with the time after the particular goals are reached by the Hegic protocol."

"She [the founder] has a simple recommendation for those who are still wary about Hegic: “Don’t use it.” Still, Wintermute is quick to point out the juicy returns Hegic traders are making, and says others will also want to taste some “DeFi raw meat.” Wintermute also talks about the next big milestone she’s focused on; HEGIC tokens, which she promises will have a “chad” distribution."

"Total supply will be split up in 6 blocks:

— 3% were distributed during IBCO (Initial Bonding Curve Offering)

— 22% will be used to provide liquidity to bonding curve contract

— 5% will be allocated to provide liquidity to a DEX liquidity pool

— 40% will be distributed as rewards to Hegic Protocol users (option holders and liquidity providers)

— 10% will be allocated to the Hegic Development Fund (HDF). This amount is subject to linear vesting among 48 months after IBCO end (12/09/2020)

— 20% will be allocated to reward Early Contributors. This amount is subject to linear vesting among 24 months after IBCO end (12/09/2020)"

Utility

"I’m currently working on finalizing the token mechanics design of the protocol for scaling the settlement fees distribution process as well as making it possible for practically anyone to partially own the protocol while holding HEGIC tokens. The HEGIC token holders will be able to earn settlement fees through staking their tokens on the staking contract. One more important thing is that options buyers and liquidity providers will be rewarded in HEGIC tokens for their activity in the protocol."

"The HEGIC token is the platform’s native token and has a right to claim a share of the protocol fees (1% of all options volume traded on Hegic). Fees are paid in the underlying option’s asset, which results in stakers receiving a yield in either Bitcoin (wBTC) or Ether (ETH). Whilst acquiring a staking lot requires 888,000 HEGIC, several staking pools have been created that allow for smaller HEGIC holders to gain access to the yield."

  • From this Vietnamese blog (3-12-2020):
  1. "Governance: Owners can participate in governance to determine things like rates, size of settlement fees, actual price coefficients or types of assets supported.
  2. Holder token is entitled to a 30% discount when buying contracts excluding the payment fees determined by the Ethereum network - heavily dependent on current Gas fees.
  3. Hegic rewards for liquidity providers
  4. Staking: to collect payment fees from the platform"

Token Details

Stablecoin

Coin Distribution

  • When looking at the holders of HEGIC we can see the following addresses holding major percentages of the supply. From Etherscan (25-2-2021):
  1. Hegic: Liquidity M&U Rewards: 38.62%
  2. An token holder: 18.67%
  3. Early Contributors: 16.66%
  4. Development Fund: 9.15%
  5. Hegic Balancer Pool Fund: 4.99%

The next 8 biggest holders are all contracts or exchanges. The next 'normal' holder only has 0.066% of the supply.

Tech

How it works

"Hegic is an on-chain options trading protocol on Ethereum powered by hedge contracts and liquidity pools. Protocol can be used for trustless creating, maintaining and settling of hedge contracts.

Hedge contract is an options-like on-chain contract that gives the holder (buyer) a right to buy or to sell an asset at a certain price (strike) as well as imposes the obligation on the writer (seller) to buy or to sell an asset during a certain period. Hedge contracts can be considered as a non-custodial, trustless and censorship-resistant alternative to options contracts. Exercising of hedge contracts is guaranteed by the liquidity allocated and locked on them, timestamps and Ethereum Virtual Machine (EVM) that executes the code.

On Hegic, liquidity providers’ (writers’) funds can be distributed between many hedge contracts simultaneously. It diversifies the liquidity allocation and makes capital work in an efficient way. The assumption is that in the long-run, liquidity providers’ returns could beat the returns of a solo options writer.

The initial implementations of Hegic will enable holders to buy put hedge contracts that will give them a right to swap ETH to DAI stablecoin at a certain price (strike) at any given moment until the expiration. Hegic uses a dynamic strike price determination approach, which influences the rate and the premium of hedge contracts. Maintenance and execution of hedge contracts do not depend on the external price feeds.

Liquidity pools are non-custodial. In the initial implementations of Hegic, the rate for holding a hedge contract varies from 0.5% up to 2.0% per week. Theoretical yearly returns for hedge contracts writers (sellers) are in between from +27% up to +108% APR on DAI, USDC or USDT. While allocating DAI token in the pool on Hegic, liquidity providers will be simultaneously earning DSR (DAI Savings Rate) with the help of CHAI (ERC20 wrapper over the DSR). Allocating DAI in the liquidity pool provides writers with the returns on DAI paid by MakerDAO’s DSR plus the premiums that are paid by hedge contracts holders."

"To open a hedge contract, investors are required to pay an initial premium and choose a number of parameters, including the number of contracts to purchase, the strike price of the contract, and the time to expiration. The contracts follow the American style execution so they can be exercised anytime between the purchase date and expiration date. If exercised, the contract is guaranteed by the writer’s funds, which are locked in a liquidity pool."

Fees

Upgrades

  • Upgraded to V8888, which needed users to move their funds (10-2021).
  • From this comparison of options protocols (1-12-2020):

"Hegic v888

Though Molly’s team remains anonymous, the naming of v888 might give away their origin (just a wild guess). With the mainnet debut of this new version of Hegic on October 10, the basic pooled liquidity model remained from previous versions of the protocol, but there were some dramatic changes to the mechanisms which govern how those liquidity pools operate.

Here is a rundown of the basic differences.

  1. Hegic v888 has a dual pool model. The previous DAI and ETH pools were terminated while new ETH and WBTC liquidity pools were created.
  2. Both ETH and WBTC options are included in v888 while previously only ETH options were available.
  3. The Hegic liquidity pools are now bidirectional, which means that the writing of both puts and calls can be powered by the same pool, with WBTC and ETH as underlying assets respectively. Previous versions of the protocol allowed ETH puts to be backed by the DAI pool, and ETH calls to be backed by the ETH pool.
  4. Very attractive mining rewards, denominated in rHEGIC, a token that can later be converted into HEGIC, are promised for providing liquidity to the collateral pools.
  5. Hegic is now a DeFi primitive, with other development teams building on top of Hegic’s protocol like ZlotFinance and Hegic Staking.
  6. Options do not have to be physically settled as in the last version of Hegic. WBTC and ETH now serve as the basic currency for cash settlement."

Staking

"Settlement fees on Hegic are paid in ETH and WBTC each time an option contract is bought and distributed among active staking lot holders. Staking lots can only be activated by Hegic token holders with a minimum of 888,000 tokens. When staking HEGIC, the minimum lock-up period is 30 days.  Settlement fees are set at 1% of each option size in ETH and WBTC. After requesting a withdrawal from the staking contract, there is also a waiting period of 7 days before tokens and rewards can be withdrawn."

  • 44.7% of $HEGIC in circulation is staked (1-3-2021).

Liquidity Mining

  • From DeFi Rate (10-9-2020):

"Hegic’s liquidity mining program has 3 phases starting in September 2020 and ending in November 2023. Each phase lasts exactly 12 months and will distribute rewards to both liquidity providers and options holders. There are also specific milestones that must be hit for each phase before the reward tokens are unlocked."

Interoperability

Other Details

  • Its own Risk Blog post (26-8-2020) mentions the following:
  1. "Potential losses on selling options as a liquidity provider.
  2. Sending funds to the contracts instead of calling their functions.
  3. Funds provided to the pools are locked for 14 days.
  4. Inability to withdraw funds when liquidity pools are maxed out.
  5. Transferring write ERC20 tokens to other addresses.
  6. ChainLink ETH/USD and BTC/USD price feeds potential issues.
  7. Unexercised options’ profits (if any) will be lost after expiration."

Oracle Method

  • In the comment section of the announcement (20-2-2020) it was discussed that there is a centralized price feed. The founder argued this would not cause issues due to how it is set up:

"price feed is only required in 1 part of z hedge contract: pricing. if u visit hegic.co 8 website, u’ll see z currenct price of ETH. chainlink’s ETH/USD price reference contract (with 21 independent data providers) is used 4 calculatin’ z price of hedge contracts based on z current price of ETH. after a contract is activated, z liquidity is locked on z hedge contract (+ it’s timestamp’d). price feeds are not used for maintainin’ / executin’ / settlin’ hedge contracts

to compromise z oracle one should attack 21 independent data providers. as z price feed is used only for pricing z hedge contracts, z data received from an oracle that z price of ETH is 0 will lead 2 a sutuation wen a hedge contract will be priced as a free one, but z liquidity locked on z contract will also be zero due to z 0 price of ETH"

Privacy Method

Compliance

"No registration, KYC or email required."

Their Other Projects

Roadmap

  • Can be found [Insert link here].
  • An old one for November and December 2020 can be found here.

Usage

"These are the numbers that I’ve recently published in the Hegic June 2020 Community Report:

• 220.24 ETH trading volume
• 164.82 ETH traded in call options
• 55.42 ETH traded in put options

• 40 options contracts traded
• 12 contracts are active
• 9 contracts have been exercised
• 19 contracts have expired

• $39,145 Total Value Locked
• 136.95 ETH ($31,411) TVL in ETH Pool
• $7,734 TVL in DAI pool
• 78.04% (max. 80%) DAI pool current utilization rate
• 79.66% (max. 80%) ETH pool current utilization rate

Liquidity providers’ returns in June are: +25.09% APY in ETH and +19.20% APY in DAI."

"In aggregate over the first month of trading on Hegic, there have been ~900 options traded with a total value of almost $35m."

  • From this comparison blog (1-12-2021):

"The Hegic protocol has seen over $75 million locked in its two collateral pools in less than 2 months since launching v888."

  • Has accumulated about $5M in fees in five months (1-3-2021).

Projects that use or built on it

Competition

"Unlike the OPYN model, the LPs in the Hegic options model do not directly mint option tokens themselves. They are options LPs, not options writers. Thus, they cannot control the exact options that the options buyers (who decide the options terms in this case) pay premiums for. Each option written is unique and is 1) based on the price of ETH at the time of the minting and 2) based on the option writer’s selection of one of 5 times to expiry, currently 1, 7, 14, 21, or 28 days.

Hegic options are non-transferrable and non-tradeable. Hegic’s options only exist at the contract level, which is different from OPYN’s model that tokenizes the options into standalone ERC-20 tokens. While Hegic options are more tailored to buyer needs, they cannot easily circulate on the secondary market after creation, limiting liquidity. Hegic Protocol v1.1 will introduce the “resell” function to allow users to sell the position into the pool anytime before expiration. The liquidity problems are partially solved by this mechanism."

  • From this Vietnamese blog (3-12-2020):

"While Hegic has a lot of competition, it offers unique features that other DeFi options products don't. Opyn is like an unauthorized Deribit, its only advantage is that there is no KYC. If KYC is not a problem for a particular trader, then the logical choice is to trade on Deribit instead of Opyn since the pricing structure is exactly the same. Trading on Deribit is cheaper and the exchange is also much more liquid.

But Hegic's approach turns the sale of options into an investment that produces a passive return. Offers many more advantages to options buyers over most cryptocurrency options platforms."

Pros and Cons

Pros

  • From this Vietnamese blog (3-12-2020):

"Hegic offers good liquidity, something that its predecessors did not achieve. With deep liquidity for PUTs and CALL ETH and WBTC (Wrapped Bitcoin)."

  • From this comparison of options protocols (1-12-2020):

"Hegic uses a peer-to-pool options model in its protocol. The liquidity pools are the counterparties to all the options, with any variety of terms, written from that pool. Liquidity is collectively shared with all the buyers, with zero price slippage. This model also provides more flexibility for the option writers.

With bidirectional pools in Hegic v888, puts and calls are simultaneously powered by the same pool. If puts lose money, calls will be in profit. This bidirectionality mitigates the risks of a pool with only a single type of options because it further diversifies risk.

Moreover, Hegic token holders earn attractive staking rewards and pool contributors earn are incented with generous liquidity mining rewards. Options buyers also enjoy rewards from Hegic that are a bit like rebates."

Cons

  • Despite audits, had two bugs, one which was warned about before hand.
  • From this blog (25-6-2020):

"The Hegic options pricing model may be flawed. It is said that the key to option pricing is to determine the implied volatility rate, according to the classic Black-Scholes pricing model. Trading options is essentially trading volatilities. The famous VIX, often referred to as the fear index, is derived from the expected market volatility based on S&P 500 index options. The option prices in Hegic are derived from skew.com data and then the implied volatility (IV) is manually updated, rather than dynamically priced in real-time by the market, in the Hegic protocol. Therefore, arbitrage opportunities between Hegic and other options venues could arise, but this is currently not an issue. Due to the various methods one could automate IV calculations, options pricing is the most challenging aspect for all the emerging decentralized options platforms. In other words, IV issues are not unique to Hegic.

Hegic options may have trouble bootstrapping liquidity. Hegic options are not tokenized and can only be exercised (or resold as in V1.1). Thus, there will not be an active secondary market after the creation of options. If one believes in the trope that the beauty of options only shines in a highly liquid market, due to the gaming that occurs around the constantly shifting expectations of IV, then Hegic has yet to provide such possibilities.

Hedging risk for LPs will be difficult in the nascent decentralized options market. In the traditional financial market, those who backstop options products are mostly professionals who have access to a variety of means to hedge against the potentially unlimited risks associated with options products. However, the liquidity providers of Hegic options are pooled together, jointly acting as the counterparty to all the valid option contracts written from the pool, with different strike prices and expiration dates. Hedging those risks would be extremely difficult for Hegic LPs."

  • From this comparison of options protocols (1-12-2020):
  1. "Under-collateralization. For put options, bidirectionality can be a problem. Puts give option holders the rights to sell ETH at a certain USD price, like protection or insurance. In Hegic’s model, if an option holder exercises a put, the pool needs to deliver the difference between the market price and the strike price, which is calculated in USD but delivered with ETH tokens. In v888, this is called cash settlement of options. In prior versions of the Hegic protocol, it was physically settled. Now suppose the ETH price drops by 30% in a week. The value of ETH in the pool also decreases by 30%, which undermines the pool’s capability of performance. In extreme cases, if there are full of at-the-money (ATM) 4-week puts against the pool and the ETH market price drops 50% in this 4-week period, the pool will be drained. If it drops more than 50%, the pool will be incapable to perform. For now, Hegic does not specify the current collateral ratio requirement in their documents, but it would be safer to keep the collateral ratio higher than 100% or make it dynamic according to the market conditions."
  2. Option Pricing. Hegic applies a special and simplified pricing model for pricing options, different from the traditional ones, and the implied volatility (IV) is manually updated with reference to skew.com. The protocol specifies 1-month ATM IVs. Each time this parameter changes -10% or +10% on Skew.com, the IV parameter is manually adjusted in the Hegic smart contracts. Moreover, Hegic v888 charges an additional 1% fee on the purchasing of options, which all gets distributed to staking lots holders. These two mechanisms result in a relatively higher price for options compared with other platforms, especially the out-the-money (OTM) options, despite the fact that they are being compensated with transaction mining rebates. Arbitrage opportunities between Hegic and other options venues could arise if the market becomes more crowded.
  3. Risks in the pool. As there is no price slippage in option pricing, the ideal put-call balance can be hard to be maintained."

Team, Funding, Partners

Team

  • Full team can be found [here].
  • Molly Wintermute  aka 0mollywint3ermutz; founder

Funding

  • From this comparison blog (1-12-2021):

"This token sale was quite a success with 31,000 ETH raised during this IBCO process."

Partners

"Demand for the protocol, which temporarily suspended activity after a bug earlier this year, is soaring as its partnership with Yearn Finance’s rockstar founder compounds with increasing demand for trading protection.

Yearn strategies will use Hegic to gain additional exposure to stablecoins to protect against downside risk and leverage binary options. This would allow forthcoming Yearn V2 vaults to capture more yield while remaining market neutral, with the added protection against market volatility thanks to put and calls. More on the collaboration is detailed in this article."

(:

Knowledge empowers all and will help us get closer to the decentralized world we all want to live in!

Making these free wiki pages is fun but takes a lot of effort and time.

If you have enjoyed reading, tips are appreciated :) This will help us to keep expanding this archive of information.

ETH tip address: 0x83460bE5F218b1520B69D702cE60A1DE37dD8E31