Borrowing mechanics
This section explains Genshiro's money market works
Last updated
This section explains Genshiro's money market works
Last updated
Explain margining within Genshiro
Explain how portfolio of collateral works
Explain how interest rate mechanics works
As explained in the borrower sub-accounts may hold multiple assets and liabilities and thus are subject to collateralization requirements (margin levels). At any point in time user account's current margin is calculated the following way:
, expressed in %
These levels apply both to borrower and sub-accounts, and work both for money market and the DEX. When trading on the DEX, active user orders in the order book also affect margin requirements as explained in detail here.
Initial margin
120%
If current margin < initial margin, users may not borrow more
Maintenance margin
110%
If current margin falls below maintenance margin, a user has 24 hours to top up their accounts' current margin to initial margin level or higher. Otherwise user will default and his portfolio will be liquidated.
Critical margin
105%
If current margin falls below critical margin level, system liquidates user's portfolio and distributes his assets and debts to the bailsman pool. There is an implicit penalty of 5% for liquidation.
One of the most important features that distinguishes Genshiro from traditional money markets and classical stablecoin protocols like Parallel and Acala, is the fact that instead of using single collateral positions, Genshiro allows users to work with portfolios. There are obvious benefits to such approach:
A well diversified portfolio of assets may reduce risks associated with user's portfolio and lead to reduction in interest fees.
Diversification in turn allows to significantly reduce margin requirements and allow for competitive leverage which is much higher than theoretical limit of 2x (given 150% collateralization requirements) or less with such protocols as Acala or Paraller.
Flexibility and the absence of the need to keep multiple "collateralized debt positions" in different assets.
Genshiro adapts the approach proposed in the Xia and Zhou's paper and comes up with an elegant solution which turns out to be a Kelly criterion:
The intererst each debt bearer (borrower who borrowed assets, or bailsman who received debts from liquidations) pays is inversely proportional to the collateralization level and directly proportional to the portfolio volatility.
Here's the approximate interest rate breakdown for a borrower portfolio, given its collateralization ratio and the ratio of dollar liquidity in bailsman and collateral pools. Interest is payable in GENS tokens.
There a special-purpose module within Genshiro called rates pallet which processes interest payments and keeps borrower accounts up to date.
The rates pallet adds the ability to write off the interest rate from borrower account balances using following functions:
reinit - any user can call it, it is also called upon any client action (transfer, deposit, etc.). This function performs margin checks, intiates margin calls if required, calculates and writes off accrued interest from borrowers.
reinit_external - anyone can call it, all validators perform (off-chain worker) recalculation of the interest rate according to their set of accounts and call reinit_external if accrued interest has become more than the minimum value (MinSurplus setting), validators do not pay fees when they call this function
The problem of pricing collateralized loans is a well-known problem in classical finance. Associated research on this was pioneered by . Under the Black–Scholes model, they derived a closed-form pricing formula for the infinite-maturity stock loan by solving explicitly the related optimal stopping problem.