Protocol specific workflows: qTokens
Technical Frequently Asked Questions
Last updated
Technical Frequently Asked Questions
Last updated
qTokens are Cardano native tokens which function as interest bearing assets and receipt tokens similar to LP tokens on a DEX. As borrower interest accrues in a market, the exchange rate of qToken to the underlying pool of assets increases. The redemption of an underlying asset can be performed at any point in time by burning qTokens assuming sufficient liquidity exists.
The difference in value between the qToken and the underlying token is the time value of money, which corresponds to accrued interests to be received on the supplied assets by qToken holders. The value of the asset XYZ deposited by the suppliers will increase over time due to the accrued interests.
*The exchange rate between the underlying asset to corresponding qToken is increasing over time to capture the continuously accruing borrow interest.
*Please note market and pool are used interchangeably and both refer to the same Liqwid market smart contract that users supply assets to and borrow from.
*If sufficient liquidity does not exist for qToken suppliers to fully exit the market (due to high market utilization), users may partially withdraw assets from the protocol up to the amount of remaining assets. The protocol has liquidity buffers (market reserves) to ensure sufficient liquidity always exists for suppliers to exit a market.
*The above is an example to visualize the qToken to underlying asset exchange rate change. For protocol math purposes the actual exchange rate will begin at .02, not 1:1.
The qTokens value represents the value of the principal + the accrued interests. At t=0, the exchange rate for the qToken has been set arbitrary to 0,02.
Example for a market with 1 borrower and 2 suppliers.
Bob supply 10 ADA and Alice 10 ADA. Once they supplied, they have 500 qADA each. (10/0.02)
Then some ADA are borrowed by Alice and interests are accrued over time, which resulted in interests of 2 ADA. (nothing changed on the supplied side).
From this interest value of 2 ADA, 1.6 ADA are booked and belong to the suppliers (because 80% of the interests are allocated to the suppliers given the market parameters, activated through a governance vote).
As Bob supplied 50% of the ADA pool (10 on 20), he should receive 0.8 ADA (1.6*50%), and has supplied position equals to 10.8 ADA (10+0.8).
Therefore, the exchange rate qToken/token is 0.0216.
Exchange rate: (20 ADA + 1.6 Interests / 1’000 qtokens) = 0.0216
Calculation control for Bob: 500 qtoken x 0.0216 = 10.8 ADA