Hermes V2

Introducing Yield and Concentrated Unified Liquidity Omnichain Marketplaces. Bringing power back into the hands of the DeFi users.

Maia DAO
14 min readJul 18, 2022

TL;DR
Hermes V2 will offer multiple defi services compared to V1, while improving capital efficiency and user experience:

- Bridge-less omnichain environment, powered with concentrated (Uni V3) and unified liquidity.
- Decentralized Uniswap V3 Liquidity Management.
- Uniswap V3 Liquidity Incentives.
- Refined ve(3,3), becoming a fungible ERC-4626
- Improved UX and UI
- Omnichain Yield marketplace

A Decentralized and Permissionless Yield and Liquidity Omnichain Marketplace packed with a Concentrated and Unified Liquidity AMM and more.

Hermes Creation

Introduction

One of the core issues DeFi is currently presented with revolves around capital inefficiency. This is caused by an array of different factors namely Fragmented Liquidity across dApps, Networks and Layers.

For example, being in the face of a cross chain crypto ecosystem, funds started getting increasingly scattered as the system grew. Hermes V2 aims to address this issue and create an omnichain DEX, but with significant improvements to the protocol’s core and incentives.

Hermes’ AMM is one of these improvements. Since DeFi Summer, various efforts have been made in developing new AMM designs. A major step taken in improving crypto’s efficiency was concentrated liquidity. We will share here our research and briefly explain, why and how we can leverage Uniswap V3’s versatility and capital efficiency and the conclusion we arrived regarding Hermes V2 AMM.

We have seen how incentivizing fees is beneficial for protocols and the ve(3,3) model was designed to do just that. Our goal is to improve the current incentives system by enhancing user experience while introducing new mechanics.

New features don’t stop there, Hermes’ new gauges will support different kinds of yields: from lending and borrowing to any vault/yield strategy or directly from Hermes’ omnichain AMM using Uniswap V3 that enables capital efficient incentives.

Chapter I: Unified Liquidity

TL;DR
Facing an environment with scattered and inefficiently applied capital, Hermes Protocol V2 provides a bridge-less way for users to:

- Directly swap native tokens between chains.
- Manage liquidity and assets from any chain.
- Access yield and deploy incentives from any chain.
- Benefit from higher capital efficiency thanks to unified and concentrated liquidity in a low-fee environment (Hermes V2 Omnichain AMM).

Unified liquidity offers a solution to this issue by grouping assets in pools shared between networks.

Composability

The whole system was designed with the thought composability first. This not only leads to facilitating integration with other projects, but also to the improvement of capital efficiency by freeing up capital and enabling multiple layers of revenue and utility on your assets.

This concept is aligned with the core DeFi ethos and can be seen happening throughout the space — e.g. Lido’s staked ETH.

Using Uniswap V3 also opens the door to a lot of support and existing tools that make integration a lot faster, easier and safer. This also makes audits faster and cheaper, while adding to Hermes’ composability by facilitating other protocols’ integrations.

Introducing Ports

The system is comprised of a base chain where emissions, omnichain balance and liquidity are virtualized and set of Ports one in each branch chain and a in the main / base chain.

Seamless Interaction

Thanks to our bridge-less architecture users can have their native token balance immediately cleared on the destination chain upon validator confirmation.

This enhances overall User Experience ( UX ) and facilitates builders’ work when integrating their projects with our Omnichain Platform whether it be to:

  • Make a token Omnichain.
  • Swap native tokens to any allowed chain.
  • Incentivize liquidity.
  • Earn multiple layers of yield on their treasury assets.

Earn Yield on your Omnichain Balance

Have a war chest ready for deployment on any network earning interest in our Port’s Strategy Vaults.

These strategies are geared towards low-risk core DeFi investment strategies such as depositing in Aave or Lido.

A user can choose to withdraw their assets from the platform or keep them deposited after any interaction with the protocol — keeping them as Omnichain Yield Bearing Tokens which can be referred to as ‘hTokens’.

Note: There are multiple chains with Uniswap V3 and also multiple messaging layers. For multiple reasons (one of the being security), our suggestion is to use Arbitrum and Multichain, but this can change and Hermes’ governance will have the final word.

Chapter II: Bonding Curves Bad?

TL;DR
Uniswap V3 liquidity can approximate the shape of automated market makers or an active order book. Providing users with higher capital efficiency for LPs, trades and incentives, decreasing slippage and spread significantly.

Implementing Uniswap V3 as core of liquidity will enable Capital Efficient Fully Decentralized Liquidity Marketplace.

To foster Uni V3 LPs, we will provide decentralized concentrated liquidity management. Allowing both users protocols to create and join Uni V3 LP strategies.

Hermes’ has a powerful incentive system and it deserves a powerful AMM to accompany it.

First we will make a quick overview of what bonding curves are, along with a couple of examples and some challenges faced by different Protocols that use them. Feel free to skip ahead to sections Uniswap V3 or Decentralized Liquidity Management if you are already familiar with these concepts.

What is a bonding curve?

A bonding curve is a mathematical curve that defines the relationship between the price and the supply of a given asset.

One can look at a bonding curve on how an order book is divided. So a perfect bonding curve does not exist, as it depends on each Market Maker’s strategy/goal. However, one can compromise and for example equally divide assets through the whole order book (Uniswap V2) or have a more leveraged strategy that concentrates orders/liquidity on certain ranges (Curve Finance and Hermes). Instead of using a bonding curve, we can have a more versatile approach with concentrated liquidity that allows for maximum flexibility (Uniswap V3).

Current Protocol’s Challenges

A factor: “Amplification coefficient chosen from fluctuation of prices around 1.”
3CRV: Curve Finance’s main LP (3pool) with 3 assets (DAI-USDC-USDT).

Curve Finance’s A Factor — Recently we have seen the decrease of the A factor of multiple pools due to their imbalances. For example, even after the 3CRV’s A factor decrease from 5000 to 2000, it is still made up of 64.53% USDT (at the time of writing). Or current’s pUSD-3CRV pool’s A factor decrease to 25 to avoid 3CRV farmoors.

Uniswap V2 for Highly Correlated Assets — Uniswap V2 bonding curve is extremely inefficient when trading assets that are assumed to have the same price, having an acceptable range of 1%, while 3CRV has an acceptable range of 70% at the moment (assuming 1% to be off peg). So you can have less than 10x of the liquidity in Curve and still offer substantially better trading rates than in Uni V2.

Centralization — Most stable swaps have compromised centralization for capital efficiency. The most famous example being Curve’s A which is managed by the protocols’ DAO team.

Constant Sum AMM

Constant Sum formula is not applicable for AMMs as it would lead to one sided pools, but it lays the foundation of multiple bonding curves. It assumes all assets in the pool are equal to one another: x + y = k

Constant Sum Bonding Curve

Uniswap V2

Uniswap V2 presented the first bonding curve to DeFi, the constant product formula:

Uniswap V2 Bonding Curve

This is a simple bonding curve that works for any asset, but as pointed out before, it sacrifices capital efficiency and has very low liquidity utilization ratio.

Balancer

Balancer used Vitalik’s generalized Uniswap V2’s formula to multiple assets and different ratios inspired by one of Vitalik Buterin’s post, coming up with:

Curve Finance

Curve Finance was inspired by Uniswap’s constant product formula and Balancer’s generalization of it, to create the StableSwap invariant.

This formula has an A factor which, when equal to 0 presents the same output as Uniswap’s V2, but raising A flattens the curve, approximating it to constant sum formula.

Hermes Protocol V1

One of Hermes Protocol’s main features are stableswap pools that use the formula presented by Andre Cronje in Solidly:

It is not widely known that when the pool is balanced, this bonding curve is always more capital efficient than Curve Finance’s (regardless of the A factor).

When the pools is balanced, compared to Curve (depending on the A factor with the same TVL) Hermes is cheaper:

This is clearly visible when A is 10, here is the prices of previously mentioned bonding curves:

  • Black -> Uniswap V2
  • Purple -> Curve Finance (A factor = 10)
  • Blue -> Hermes Protocol
  • Green Area -> Region where Hermes Protocol is cheaper than Curve Finance.

From this graphic, we can see that when the pool is balanced, it is actually cheaper to trade on Hermes. But not when the pool is unbalanced, this is great to counter previously mentioned challenges of Curve Finance’s A Factor.

We are frequently reminded of just how important peg stability is for many of DeFi’s dearest applications and consequently the entirety of the space. A balanced pool is important as it is to have prices rise when tokens depeg. Hermes stable pools do exactly that because prices quickly rise when the pool deviates more than ~15% from balance, but it is very capital efficient when the pool is not.

Adding A Factor to Hermes’ Bonding Curve

By going through the same process Curve Finance went with Uni V2 pool, but with Andre Cronje’s bonding curve, we arrive to the following formula:

x³y+xy³ = k with leverage (with A factor)

Even though this formula would have the potential to be a used towards lowering price impact in bonding curves for stable swaps. It comes at the cost of centralization, equivalent or even better capital efficiency can be achieved through another method: concentrated liquidity.

By using concentrated liquidity, one can mimic bonding curves in a fully decentralized and permissionless way.

Uniswap V3

Uniswap V3’s liquidity can be described as a decentralized order book. You can add liquidity in any given range (concentrated liquidity) and you only get fees if your liquidity is used. It also supports multiple fee ranges, which allows LPs to be compensated according the risk their taking, as well as any of the previously mentioned bonding curves in a decentralized way.

Given that the protocol’s Core is under Business Source License 1.1 and it cannot be forked until as early as of 2023–04–01 or a date specified at v3-core-license-date.uniswap.eth. So we need to use a deployed version of Uni V3, which, at the time of writing, it’s deployed on: Ethereum Mainnet, Arbitrum, Optimism and Polygon. This means that we can only offer Uniswap V3 liquidity management in these chains.

By using Uni V3, Hermes Protocol can offer an extensive list of both simple and advanced LP strategies. Enabling one of Hermes’ V2 features: a Fully Decentralized Concentrated Liquidity Management Platform for Uniswap V3.

Adding Liquidity to Uni V3

Please read the following for a more in depth look into Uniswap V3 features. But here is a quick overview of how liquidity is applied:

  • Liquidity can be added between any given ticks/ranges (tick spacing depends on the fee tier of the pool), and that liquidity is all applied there.

This way, otherwise unused capital can be effectively used to gain fees and offer more depth to the liquidity pool.

This is especially good for stable pools (read this post for a more in depth look on Stablecoins on Uniswap V3, from a series written by 0xfbifemboy on the performance of concentrated liquidity). But also optimal for loosely correlated assets: “Uniswap Protocol v3 has deeper liquidity in ETH/USD, ETH/BTC and other ETH pairs than leading centralized exchanges.

For example: taking into account liquidity in DAI/USDC 0.01% pool in Ethereum Mainnet:

Liquidity in DAI/USDC 0.01% pool in Ethereum Mainnet

Only liquidity between 1 and 1.0001 DAI (between 0.9999 and 1 USDC) is being used, so trades under ~170M get less than 0.01% price impact and have 0.01% fee.

Decentralized Liquidity Management

Only rewarding LPs in the traded ranges enables the ability to scale liquidity strategies and decentralized vaults where a fee is given to anyone who triggers range adjustments, relying on own users and MEV. This allows for the system’s self-optimization as profitable LP strategies gain traction while non-profitable strategies loose it.

Initially there will exist only one LP template and more will be added as time goes on. But this implementation will be versatile enough to be the base of any complex LP management strategies.

You can create an LP from any template, each manages 1 NFT position, are completely immutable and anyone can join them. New templates with options like adding managers, more parameters, more NFTs and private pools are going to be added later on.

By having single decentralized separated LPs, users can pool together saving management fees while having different strategies. Each user is free to manage his liquidity distribution strategy without the need to pivot to different templates, simply by allocating different sizes to each template.

Here are some simple liquidity distribution examples:

  • Adding more liquidity to tighter positions:
  • Adding more liquidity to wider positions:
  • Equally distributed (Uniswap V2):

By extending concentrated liquidity management tools, both protocols and users can optimize their strategies, create new strategies that would not be profitable otherwise and more.

Down the line, features like social ranking can be added to the platform, allowing for web3 identity integration and portfolio tracking.

Incentivizing Liquidity in Uni V3

Liquidity incentives in protocols with ambient liquidity (i.e. Hermes V1, Curve Finance, Uni V2, Balancer, etc) goes towards capital in LPs that are not being used. Leading to emissions being inefficiently distributed.

Liquidity incentives also benefit from Uni V3 capital efficiency, as you are able to only rewards user that have liquidity in the current range. So LP’s that are not being used do not get any emissions.

By leveraging this mechanism along with improved ve(3,3) tokenomics. We get a Capital Efficient Fully Decentralized Concentrated Liquidity Marketplace.

Chapter III: Transitioning from ve(3,3) to b(3,3)

TL;DR
Users need to do a lot of weekly tasks to get the most out of their veHermes, including increasing their lock, claim distribution, claim rewards and re-vote.

Making the lock permanent (burning) and changing the locked version to an one way ERC-4626, enables to simplify and improve user experience while adding new mechanics, so users do not need to do all the steps previously mentioned.

Inspiration

One major user of Hermes Protocol is Maia DAO, with a position of +20M $HERMES and already had +40 $veHERMES NFTs to manage weekly. So we quickly noticed how tiresome is to optimize your voting power, especially with multiple veNFTs. This makes it expensive to manage these positions, especially for large DAO’s that need to have this process to be as decentralized and scalable as possible.

Here is what you need to do every week to maximize your staked position in the current ve(3,3) model:

  1. Claim Distribution (rebase)
  2. Claim bribes
  3. Lock max date (4 years)
  4. Cast votes (same or different votes)

If you miss any of those steps you are loosing on potential rewards or voting power. Of course, steps may or may not be worth it depending on size and gas costs. By the way, this is without taking into account any auto-compounding and LP/rewards management (which would add more steps).

This will keep the ve(3,3) game theory intact while reducing to zero the number of steps necessary weekly to maximize voting power. You can claim bribes and change your vote if you want, but you won’t loose anything if you don’t. Claiming rebases and increasing locked time are natively added to the protocol.

Burning vs locking

If someone increases their lock amount every week, one can argue that it is the same as burning the underlying since it will never be unlocked. By making the assumption that active users and protocols will have to do this to maintain relevancy or it will be made by a protocol like Convex, there is no reason for it not to be implemented at the base protocol level.

We assume that burn = lock 4 years:

ve(3,3) <=> b(3,3)

Set and Forget Vote Mechanics

Because of this simple assumption, there is no more locked token positions in illiquid ERC-721 format, bHermes ERC-4626 has been implemented in it’s place. Avoiding unnecessary swap, lock increase and merge mechanics, while implementing dilution protection measures for burners/lockers.

To simplify the whole process and increase the user experience instead of locking up your $HERMES in the form of an NFT ,you would burn it by sending it to a one way ERC-4626: $bHERMES. So you only need to vote once while having dilution protection, and only need to collect fees for perpetuity.

ERC-20 and Wrapped Equivalents (cvxCRV)

We have seen a lot of “ve” tokens have a voting/boosting aggregator (à la Convex) which perma-locks tokens in a more familiar, liquid and fungible format (ERC-20). Allowing these types of protocols to have high fees (~20%) because they are the only way to escape exhausting voting routines.

This mechanism will greatly improve Hermes by removing the necessity of a Convex like ecosystem. There are still incentives for someone to create one, but users are not obligated to use them as the only way to get a good user experience. This makes aggregators lower their fees or provide significant improvements to attract users, deterring rent seeking protocols.

Why ERC-4626?

The ERC-4626 standard is a new interface for tokenized vaults with a single underlying ERC-20 token. Hermes will be able to be integrated with other protocols seamlessly by implementing this standard whenever possible.

This will make it easier for everyone to build Hermes and around it, a great example is adding secondary markets for hedging Hermes’ rates.

While some gauges will not be ERC-4626 vaults from the start, we will continue to look for solutions or alternatives to continuously raise our project’s composability through time.

Gauges

As previously mentioned, Hermes V2 will have gauges supporting Uniswap V3 LP staking, where only reward LPs in used ranges are rewarded. This makes Hermes AMM’s liquidity incentives a lot more capital efficient.

However, Hermes’ gauges are not limited to it’s AMM, any gauge can be implemented as long as it receives any kind of revenue from its underlying. Gauges can also be implemented on any chain.

Gauges will need to be added/removed via governance and can be paused by an emergency multisig (à la Curve).

Bonds

Bonds have proven to be an effective and sustainable way of retaining long term liquidity. Combining bonds with emissions would get us on the right track in terms of solving current liquidity scarcity issues.

Conclusion

Hermes Protocol can leverage existing DeFi tools and build on top of them to achieve substantial capital efficiency improvements for both LPs and incentives.

Improving upon the ve(3,3) mechanics to provide an elevated user experience packed with new and improved features, completely modular architecture design and a fully re-written and audited modern code base implementing the newest Smart Contract Development Standards and best practices.

If you are interested in working on this, you can reach out to us through discord, twitter or telegram.

--

--

Maia DAO

​Maia is the yield powerhouse of Metis with its community rooted in this Ethereum L2. With a 100% fair launch Maia is a truly community owned.