Search…
⌃K

# FAQ - Hedging Agents

Common questions about HAs and perpetual futures

## How come perpetual futures insure the Core module?

Let's take a simple example where users bring an amount y of collateral to get y worth of stablecoins, and Hedging Agents back up exactly this amount y of collateral (after bringing a margin of x in collateral).
If the initial price was p and the current price is q, now to be able to sustain the convertibility, an amount y.p/q of collateral is needed to reimburse users.
According to the formula of the position of the HA written, besides the x of collateral initially brought, the amount of collateral due to (or taken from) the HA is now y(1-p/q).
Hence while there was initially x+y in the Core module, what is now due to HAs and users is:
$x+ y\cdot \frac{p}{q} + y\cdot (1-\frac{p}{q}) = x+y$
Since the Core module is fully hedged by Hedging Agents with perpetual futures, it can sustain convertibility and keep the stablecoins stable.

## Is there a cost for holding perpetual futures as a HA?

No, there is no funding rate like in centralized exchanges proposing perpetual futures. The only fees paid with Angle perpetuals are entry and exit fees.
There are no fees for removing or adding collateral as margin to a position.

## Can HAs always open new positions with the Core module?

Within Angle Core module, Hedging Agents are here to cover the volatility of the collateral that was brought by users. If the amount of collateral from users is worth x of stablecoins and HAs already cover this amount, then new ones will not be able to enter.
The ratio between what HA currently hedge and what they hedge in total can be seen in the analytics. If we take the USDC/EUR pair as example, HA can't open positions anymore when the hedge ratio reaches the target hedge ratio.
To put it in other words, Angle Core module can be seen as a marketplace between stability and volatility seekers. If the supply of volatility is fully taken by HAs, then the Core module cannot offer more leveraged positions (and thus more volatility) than what it has already offered.

## How is the amount to hedge by HAs computed?

The amount to hedge for a given collateral corresponds to the quantity of stablecoins issued against this collateral, multiplied by a target ratio fixed by the Core module. It refers to the total position HAs can open.
For instance, if a user minted 20000 agEUR with wETH, then the amount to hedge is 20000 EUR of wETH. Then, if a user burns 15000 agEUR against wETH, the amount to hedge becomes 5000 EUR of wETH.
If the target proportion that HAs are allowed to hedge is 90%, then after the burn the amount to hedge by HAs is 5000 * 0.9 = 4500 EUR worth of stablecoins. This means that the sum of the position size (in collateral) multiplied by the entry oracle rates of HAs should less or equal to 4500 EUR.
Why is that quantity expressed in stablecoins? Let's say that there is one HA in the Core module that entered at a time where the price of collateral with respect to the stablecoin was p_e and commits to an amount of collateral of c. HAs are not allowed to hedge more collateral that is in the Core module. To this extent, c must be collateral in the Core module's reserves, brought by users minting stablecoins.
If the HA cashes out at a moment in which the collateral is worth p, if we imagine that there was only c of collateral in the module before the HA came in, then it ends up with:
$c - \texttt{PnL} = c \cdot \frac{p_e}{p}$
This means that the Core module has enough in reserves to burn:
$c \cdot \frac{p_e}{p} \cdot p = c \cdot p_e \texttt{ stablecoins}$

## How is the amount hedged by HAs computed?

For a given stablecoin-collateral pair, it is the sum of the product between the amount hedged by each HA perpetual and the entry rate when this perpetual was opened. It is expressed in stablecoin value.
This amount is updated whenever a HA position is opened, closed, or liquidated.
This amount should always remain inferior to the target amount HAs should hedge (as specified above). Above this amount hedged, HAs are no longer allowed to open perpetual positions. Additionally, if HAs hedge significantly more than the target hedge amount, then keepers can force-close some positions.

## What is exactly implied by hedging ratio?

The hedging ratio refers to the portion of the amount to hedge by Hedging Agents that is actually hedged.
If one user mints 2000 agEUR for 1 wETH, and the target hedging ratio is set to 90%, then the amount HAs should hedge for agEUR is 1800 agEUR of wETH. If one HA enters when wETH is worth 1000 EUR, brings 2 wETH and decides to commit to the variation of 0.8 wETH (this HA has a leverage of x1.4), then 800 out of the 1800 wETH in stablecoin value are hedged: the hedging ratio is 44.44%.

## What happens if there are too many HAs with respect to the amount to hedge from the Core module?

At any given point in time, HAs could hedge more than the target hedge amount.
In case this happens, Angle Core module has two parameters: the target hedging ratio, and the limit hedging ratio.
The target heding ratio gives the amount to be hedged by HAs. Above this ratio, HAs can't open positions anymore. The limit hedging ratio is the maximum hedging ratio possible in the Core module. If HAs start hedging more than this ratio because of users burning stablecoins, their positions can be automatically cashed out. This is called force-closing.
Imagine the limit hedging ratio is defined at 95%, then if 0.9x/(x-y) becomes superior to 0.95, then some HAs positions could be force-closed until the amount covered by HAs is back in the bounds again (below the target hedging ratio).
When a HA position is force-closed, the owner gets back its margin plus any unrealized PnL. Keepers are responsible for force-closing HAs positions in such cases. They are incentivized to force-close positions in a way that the hedge ratio comes back as close as possible to the target. There is no other conditions that could depend on the position size. More details in the Keepers page.

## What happens if the Core module does not have enough reserves to close a HA position?

It is possible, because of users bringing one collateral, getting stablecoins and directly burning it against another collateral or because some of the reserves are lent and thus not immediately available, that when a HA tries to close their positions there is not enough collateral in the pool to which they contributed.
In this case, the HA gets everything that can be given from the collateral pool, and the rest is returned in Standard Liquidity Providers' tokens (called sanTokens).

## Can I open multiple perpetuals?

A HA can own multiple perpetuals across a similar pool. For example, a HA can choose to have two positions on the wETH/EUR pair, one with a x5 leverage, and the other with a x2 leverage. Each position has its dedicated margin (isolated margin perpetuals).
Once the amount hedged by a HA has been set, it can no longer be modified. For instance if a HA opens a position of 5 wETH with 1 wETH of collateral as margin, the HA can add or remove collateral from this perpetual to change the leverage, but it can never modify this amount committed (also defined as the position size). The solution would be to close this position and to open a new one.
A HA can also own perpetuals across multiple pairs for different stablecoins. For instance, a HA could have a perpetual on the pair USDC/EUR, and another perpetual on the pair wETH/EUR.
In the Core module, positions are represented by NFTs: they can be transferred from one address to another and are non fungible.

## What's the minimum amount of time I can stay as a HA?

To reduce the risk of front-running with the oracle, after perpetual creation, a HA cannot exit or remove collateral from the position within the hour that follows.
This is a parameter that can be modified by Angle governance.

## Is there a maintenance margin like in centralized exchanges?

Yes. If the margin ratio goes below a certain threshold, your position should get liquidiated by keepers. The maintenance margin depends on the stablecoin/collateral pair concerned. For instance for wETH/EUR pair, the maintenance margin should be set at 6.25%.

## Are there minimum or maximum leverage as a HA?

There is no minimal leverage, meaning you can come as a HA in the Core module, bring 2 wETH and open a position of only 0.001 wETH (thus hedging only that amount).
There is a maximum leverage though. This parameter depends on the volatility of the pairs.
For instance, for a perpetual on the pair wETH/EUR, the maximum leverage allowed is x10. For perpetuals on forex pairs like USDC/EUR, the maximum leverage is set at x100.

## Are there slippage protections for HAs?

Yes. When opening a perpetual in Angle Core module, HAs can specify the maximum oracle value they are willing to accept as entry price.
The same goes for HAs cashing out their perpetual: they can specify the smallest oracle value below which they do not want their transaction executed.