Pyramiding with EOSDT

By generating stablecoins in response to a user posting collateral, the way Equilibrium operates allows for leverage. Consider this example: given a current collateralization ratio (СR) of 130%, when a user deposits X dollars of EOS, the maximum dollar amount of EOSDT he may generate is X / CR. This EOSDT may be then used to buy additional EOS, which can in turn be used as additional collateral to generate more EOSDT — you get the idea!

You might remember the idea of an infinite geometric series from middle school geometry. But do you remember the formula for its sum when the common ratio R is less than one? In our case R = 1 / CR, so the maximum theoretical achievable leverage L is equal to: 1/(1-1/CR)

The following table shows the maximum achievable leverage given a level of collateralization:

With current system parameters, users can enjoy a maximum leverage around 4.33. This is of course the theoretical maximum — in reality, the numbers will be lower as it’s unreasonable to collateralize the position around the critical level. There has to be some safety margin above 130%.

From the user’s perspective, the mechanism works the following way:

  • The user picks the desired safety margin (SM).

  • Based on the SM, the user is offered a choice of leverage (L) from 1 to L_max, where L_max = 1/(1-1/(CR + SM)).

  • The user supplies X amount of EOS.

To achieve desired leverage L, the system needs to buy (1 - L) * X EOS on the exchange. This may be done in several iterations in the loop according to the following algo:

generate X * oracle price / (CR + SM) EOSDT
amount_to_buy = (L-1)*X EOS
while amount_to_buy >= 0
    buy Q EOS on exchange
    deposit Q EOS to eosdtcntract
    generate Q * Oracle price / (CR + SM) EOSDT
    amount_to_buy = amount_to_buy - Q
end

New eosdtlevrage contract

All the above logic is implemented within a new contract called eosdtlevrage.

  • Contract tables:

    ltvopers table

  • Contract actions:

Last updated