To avoid to be liquidated, keep greater than 1.0 .
Generally is denoted as
Here assume a user deposit a single asset and leverage its position.
Let denote the balance of collateral and denote the self-collateralized balance of collateral.
Let denote the collateral factor of a asset, denote its borrow factor and denote the collateral factor of a self-collateralized asset (called self-collateralized factor).
Risk-adjusted collateral is calculated as
where .
A pdf is found on Euler fi Discord.
Risk-adjusted collateral seems to be calculated differently. I think the formula in the pdf is wrong. link
Risk-adjusted lilability is calculated as
where self-collateralized part of any asset have always 1.0 borrow factor. is always equal to ??
In Euler self-collateralized part of any asset has always 0.95 collateral factor and 1.0 borrow factor.
In case of our leveraged strategy is always equal to .
is eToken.balanceOfUnderlying(strat)
.
is dToken.balanceOf(strat)
.
for example,
mint
or burn
to maintain a target health score.Let denote the target health score we want to maintain.
Let denote its newly added collateral and denote its newly added collateral with recursive borrowing (eToken.mint()
).
Strategy deposits its underlyings with eToken.deposit(amount x)
and eToken.mint(amount x^s)
.
Resolve the equation for .
Strategy withdraws its underlyings with eToken.withdraw(amount x)
and eToken.burn(amount x^s)
.