How does Hera work?
Last updated
Was this helpful?
Last updated
Was this helpful?
The price for a token can change quickly at any point in time. So the best priced trade is not always on one DEX and may involve a combination of trades across many DEXes.
Here are some key features for how Hera dex aggregator discovers the best priced trades.
Hera directly connects all DEX markets and AMM pools together no matter the provider and will find all direct and 2-hop to 5-hop routes between any two tokens on Metis Network.
That's can be up to 5 tokens included in a transaction path. So, supports maximum 5-hop now.
Not only does Hera dex aggregator compare the prices between markets on different DEXes but often the best priced routes are not direct markets. Instead, Hera.Finance may finds the best price by routing through an intermediary token, e.g. USDC-WETH-METIS instead of USDC-METIS. This may be due to price inefficiencies and/or volatility in the various markets that Hera.Finance routes through.
Hera dex aggregator will split your trade into smaller trade sizes. For example, if you want to make a 100 USDC-METIS trade, it may distribute your trade into a 30 USDC-METIS trade on Netswap and a 70 USDC-METIS trade on Tethys Finance. The % distribution of the trades is dynamically determined to give you the best price. Trade splitting helps get better prices for large size trades and trades with tokens where there is shallow liquidity spread out across a number of DEXes.
The number of new tokens being added is increasing at an ever faster pace. This means you can be assured that you'll be able to trade new tokens as they launch on Metis Network.
Lists new markets rapidly The number of markets and liquidity pools that are launching is also increasing. Hera rapidly picks up any market or pool for any of the DEXes it currently aggregates. This ensures that Hera always has the latest liquidity for any token that is listed as soon as it is available.
Hera has worked to optimize its swap aggregation so that it all fits with the transaction limits so that swapping can be done in one transaction. This is important to handle cases where the price for the token you are buying has changed and no longer fits your slippage limit. If Hera dex aggregator cannot make the trade with your slippage limit, it rollback the transaction and return an error.
User enters in the tokens they want to trade.
User enters in the amount of tokens they want to trade for.
Hera calculates out all the possible routes for the token trade.
Hera fetches the quotes for each of those routes and returns the amount of tokens you will receive per route.
Hera ranks each route by most tokens you will receive.
User can select select any route but the first route offers the best price.
User clicks to trigger a swap.
User approves the Hera transactions from their wallet
Hera dex aggregator executes the trade.