Deep dive into Hashstack’s Interest rate model- DIAL.

First published:

In January 2021, when we first introduced the whitepaper for Open protocol, we intended to implement a savings apr that is at par with the savings interest offered by the traditional financial(tradfi) institutions in high-growth economies; while also enabling a sense of predictability & stable apr. As we journeyed from the theoretical concept to an early prototype to the private testnet, this proposed solution underwent a series of iterations. Data suggested that high-yield static interests could open up secondary risk vectors for the protocol, particularly during low-demand cycles. So we went back to the drawing board to review the interest model part of these efforts, and we referred to the algorithms used at Compound and Aave amongst other incumbent defi lending products. We tried to explore a fitment of the existing formulae with that of today’s market practicalities. Unfortunately, none of the current methodologies appeared reliable at scale. In addition, in conjunction with their inability to meet our specific needs to determine interest rates for each compartmentalised minimum commitment period, we needed to develop an interest rate model that is derivative of the protocol’s practicalities.

During our deliberation, we recognised the need for an autonomous, self-determining algorithm that factors in an asset’s underlying supply-demand state while also considerate of various commitment periods. In this technical deep dive, we derive this algorithm. Note that, the interest rate model will continue to evolve with time to fit all practical challenges of tomorrow.

A mathematically self-determinant interest rate model considerate of various commitment periods.

As we dive into the Hashstack’s algorithmic interest rate model, [DIAL]; for ease, we have categorised the explanation in 4 parts.


Key variables, assumptions & premise

Interest rate equation

A self-sustainable interest model is the one that charges borrowers an apr just above the amount that needs to be repaid to its liquidity providers. The offset interest rate[i.e. difference between supply & borrow apr] enables the protocol to secure liquidity for insurance, and/or as rain-day fund. The below equation is our approach to a a self-sustainable interest rate model.

Simply put, the net apr charged to the borrowers should be just greater than the net apr to be paid to the liquidity providers. In the above equation, x is an offset factor which is expected to be between 0.5 to 1.5%. This offset provides a cushion to the protocol by charging the borrowers an apr that is effectively excess by a fractional percentage.

Logic breakdown, & deriving supply, borrow apr

To effectively determine payable interest rates, the dial model relies on the data points — effective asset utilisation, utilisation randomisation, deposits & loans by minimum commitment periods, and correlation between different commitment periods.

Let Utilisation percentage(Up)= 32%. This Up falls within the 25% to 50% Utilisation percentage classification. A random utilisation percentage is a random number between the classified range ( in this case, (25,50)). Open protocol relies on Chainlink vrf to determine a random number within a classified utilisation percentage range. For the sake of this explanation, let’s assume the randomised utilisation as returned by vrf is 42. So, the dial uses 42% as utilisation percentage to calculate the supply & borrow apr.

This random utilisation percentage is converted into utilisation rate( Ur) by dividing it with 100. So, 42% becomes 0.42.

The Ur is then multiplied with the maximum supply apr; i.e. 0.15[15%]. We get 0.063. So, a liquidity provider with 3 months mcp is expected to be paid 0.063 x 100 = 6.3% apr against their savings at a randomised asset utilisation percentage of 42%.

15% apr is the maximum apr rewarded to the liquidity providers with 3 month mcp. The supply apr for the remnant mcp is determined by the correlation coefficient. For ease of this example, and as implemented in the testnet, it’s a flat figure of 1.2

The supply apr for the remnant mcp thus derived is as follows :

This data is then fed into the primary equation,

Here we have 1 equation, and 1 unknown variable. The value of Bi can be easily determined. It can be denominated in 1month mcp, or none mcp using correlation coefficient as a basis. The borrow apr thus derived for a loan type of a specific mcp can be used to determine the borrow apr for another loan type using the correlation coefficient.

What if the derived borrow apr exceeds the permitted range of (2%, 20%)?

In such cases, the borrow apr is set to the maximum rate, i.e. 20% for 1 month mcp. From this, the borrow apr for none mcp is derived as 16.67%[i.e. 20%/1.2]. We use the below equation to calculate the apr for none mcp

We add the borrow apr in the base equation.

1 equation, and 1 unknown variable. The value of Di can be easily determined. It can be denominated in 3 month mcp, or none mcp. The supply apr for the remnant mcp can be easily determined basing the correlational factor as mentioned in this equation.

What if the derived supply apr exceeds the permitted range?

This is not possible. If you observe, in the first approach the supply apr determined was within the range min & max supply apr range; which could probably lead to a borrow apr exceeding the range. To maintain apr stability, the borrow apr is then restricted to the maximum borrow apr as set by the comptroller. This effectively implies reducing the borrow apr. Since supply & borrow apr are directly proportional, the supply apr can only drop. Further, the supply apr can go as low as 0%. Thus, any supply apr derived through the reverse derivation will be well within the permitted range of supply apr.


There are four caveats one should be aware of

When the asset utilisation is ≤25%, it indicates lack of market demand for the primary market in context. To rebalance supply-demand, the algorithm disincentives liquidity providers with a flat apr of 0% for assets with poor utilisation rate; while charges 2% apr for borrowers with none mcp.

When the asset utilisation is ≥80%, implying a high-demand asset, the supply & borrow apr will also be higher by the algorithm design. The algorithm in this particular context, incentivises liquidity providers with higher supply apr, which results in the derived borrowed apr to be higher as well, thus denoting the demand for the primary market. For assets with ≥80% utilisation percentage, 1% supply apr mark-up is added to the derived supply apr for 3 month mcp.

Open’s dial relies on randomisation at two points:

Randomisation introduces an anomaly intended to help the protocol mitigate liquidity manipulation by malefic entities who may add/remove liquidity just around the snapshot time to manipulate the apr.

The asset utilisation snapshot is taken at a random time of 4 to 7 days so as to build a sense of stable supply & borrow apr with restricted volatility.

Reserve factor — A percentage of the total available liquidity locked from distributing as loans. This is set to 10% in the testnet. This means, 10% of the total deposits of a primary market is kept away from deployment as loans.

About Hashstack: Hashstack builds critical infrastructure necessary to further the usability of decentralised finance.

Open: Hashstack’s solution to the over-collateralisation problem in defi lending, Open is a non-custodial money market protocol designed to enable secure under-collateralised loans on-chain.



A non-custodial money market protocol enabling secure under-collateralised loans on the blockchain. Website-

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

A non-custodial money market protocol enabling secure under-collateralised loans on the blockchain. Website-