Tinlake uses an interest rate mechanism that is typically implemented as compounding per second. The implementation can be found in github.com/centrifuge/tinlake-math.
Below we show abstract examples of how this is calculated:
interest rate per second
the number of times the interest is compounded, compounding is once per second, so "n" is seconds past since last calculation
Nominal interest rate (5% would be 0.05)
Annual Percentage Rate (APR)
constant, seconds in a year:
The basic formula is:
Debt equals to Principal (or the previous debt amount) times rate to the power of seconds since last calculation.
Using the formula above, the Debt after half a year would result in .
After one year () the would be .
Thus a 5.00% interest rate compounded every second is equivalent to an annually compounded rate of 5.127%.
The annual percentage rate could also be calculated directly from the percentage rate (using ):
To calculate the Debt, we initialize an interest rate in Tinlake with a variable called
ratePerSecond or . The ratePerSecond represents the interest accrued per second in Tinlake.
The debt can be calculated by multipling the principial with to the power of . The variable represents the time passed in seconds since the loan has been borrowed.
Continuing the example from above for annual interest:
The Tinlake User Interface uses an annual percentage rate (APR) as input. Tinlake transforms this annually compounded rate into the equivalent rate used for compounding per seconds . This is achieved by solving the equation:
Using the calculated compounding every second leads to the same amount of debt like using compounding annually over the course of a year. Thus, the calculated
rate can be used to achive an interest per year (APR) behaviour with the compounding per second implementation in Tinlake.
Continuing the example from above with an 5.00% annual interest rate (APR):
We use fixed precision decimals for any monetary amounts. Interest Rates are typically of type
ray with 27 digits precision and amounts are of type
wad which has 18 digits precision.
This is usually explicitally mentioned in throught the codebase.
Centrifuge’s Tinlake is an asset-backed smart contract lending platform built to responsibly bridge real-world assets, such as invoices, mortgages or streaming royalties to the DeFi ecosystem. This post is the first in a multiple part series about how valuation and pricing of real-world assets work within the Tinlake ecosystem. Collectively, this series will form our knowledge base on real-world asset pricing and will be used to educate the DeFi community as we bridge non-native crypto assets into the decentralized finance ecosystem. This post starts with the fundamentals of pricing real-world assets. It will focus on one particular asset — an invoice — and explain which factors are usually considered in pricing this asset and how these factors may be turned into an interest rate. Invoices are particularly interesting collateral for Tinlake and DeFi because they have historically low default rates and a short maturity of 30–90 days.
For our purposes, an invoice is a bill sent from one entity (supplier) to another (buyer) in connection with the delivery of goods or services. Key data points on an invoice usually are:
Suppliers around the world typically have to wait for 30–90 days to get paid for an invoice. Instead of waiting several months until the invoice is due, the supplier has an alternative: find a way to convert the invoice into capital quickly by financing it through a capital provider, e.g. an Asset Originator or a factor.
The parties involved in issuing and financing an invoice through Tinlake usually are the following:
Invoices the buyer for delievered goods or services; has to wait for payment by the buyer; finances this invoice to get paid right away.
Purchases the goods or services and incurs the charges related to the invoice for the goods or services
Provides capital to supplier at a discount to the face value of the invoice, and 100% of the collections related to the invoices.
Lends money to the Asset Originator in exchange for certain rights and privileges regarding the invoice payments of buyers.
Financing an invoice can be structured as a simple loan with one bullet repayment. The two decisive pricing parameters are advance rate and interest rate. The advance rate acts as a reserve or protection for the Lender against losses. The interest amount/finance fee is usually deducted up-front and the loan is then paid back in relation to the payment due date of the invoice.
Imagine e.g. an invoice with a face value of USD 100 due in 90 days. A supplier may use this invoice as collateral to receive early payment in form of a short term loan. Assuming an 80% advance rate and a 7.0% interest rate (APR) a supplier could receive a loan (“early payment amount”) of USD 78.6 (deducting interest of USD 1.4 = USD 80 (7.5% (90/360)) and pay back USD 80 after 90 days when he receives the payment of the buyer. If the supplier wants to finance this invoice through Tinlake, he could turn to an Asset Originator who would tokenize it and use a Tinlake pool to draw funding in stablecoin from a Lender, e.g. from a decentralized lending protocol, against the invoice NFT as collateral.
There are several different factors to consider when setting advance rate and fee/interest rate for financing an invoice. These different factors are relevant for both the Asset Originator as well as the Lender. For brevity, I will refer to both parties as just the Lender in the section below:
The value of an invoice is firstly based on the buyer’s ability and willingness to pay. In some cases, this can be represented by publicly available credit ratings. In others, credit bureau data, the payment history of the buyer or publicly available news may be used.
The stability of the supplier is another important factor to be considered. Lenders are underwriting the supplier as much as the invoices themselves. The suppliers working capital management is of particular importance. Is the supplier’s net working capital positive or negative? How have its metrics trended in the past? What is the supplier’s collection history with this specific buyer? Also, what is its history of commercial disputes and/or failures to deliver?
In addition to the supplier’s and buyer’s individual credit risk, the market impact on pricing by industry and country is another important factor. While some industries have a robust, constant supply chain, other industries may be subject to seasonality or prone to disruption. Each country carries with it some amount of systematic risk that trickles down to suppliers and its ability to pay. Further, the recovery of defaulted amounts or the ability to collect an overdue payment often depends on a country’s legal system.
There is inherent bias baked into repeating relationships that can be either positive or negative. If a Lender has some track record with a supplier/borrower, then the impact of a continuing relationship will work its way into the pricing. For instance, if an efficiently run supplier has a long track record, with invoices based on contracts with stable counterparties, they will get favorable pricing on its invoice population.
The most important factor when estimating the advance rate/fee for invoices is volume. To a Lender, a large number of invoices means the risk of non-payment is spread across a number of counterparties — more invoices are better than less. If one is pricing a pool of invoices, the statistics around the invoice pool can be considered. One can think of a distribution function where a great sample amount means a smoother distribution. Lower invoice counts mean that collecting on the discrete, single invoice has a more significant impact on the pool’s return.
Now let’s take a look at how considering all these factors may translate into advance rate and a fee/interest rate for financing an invoice. This will be illustrated with a very simple example. Having this in mind, please note that valuation and pricing generally come with a large variety of approaches and different, usually higher levels of complexity.
Imagine a large Buyer, “Sneaker Group” and a Supplier, “Laces Inc”. There is also “Lender Co” willing to provide financing. Laces invoices Sneaker for its delivery of laces worth USD $1,000 with payment due in 90 days. Laces wants to request financing from Lender with the invoice as collateral.
To set interest and advance rates, the Lender may use a homemade risk scorecard. These scorecards come in a variety of forms and different levels of complexity. For this purpose, we will assume a very simple scorecard, where with five individual factors described above (Note, that portfolio aspects are not considered for this simple example of an individual invoice) contribute equally with a score from 1 (the worst) to 10 (the best) to an overall risk score of up to 50. Let’s assume the following scores for Laces Inc:
Supplier Credit Worthiness ("Laces, Inc.")
Laces provides its financial information, tax returns, bank statements to AO so that it can estimate credit worthiness. The analysis leads to an above average score which implies risk of default is lower compared to the overall market. Lower advance rates needed.
Buyer Credit Worthiness (“Sneaker Group”)
Sneaker is a large buyer and publicly traded with excellent credit ratings provided by established rating agencies
A strong relationship means less variance around the outcome, thus lower risk.
Lace’s industry is cyclical and can impact collections.
Sneaker and Laces operate lower risk jurisdictions and warrant pricing that reflects this lower risk.
Adding up the individual scores for each of these factors leads to a risk score of 36 for Laces.
This risk score can be mapped on a risk scorecard with assigned advance and interest rates for risk scores. The typical advance rate is usually between 70% to 90%. As of the writing of this blog, annual rates (APR) around 6% to 8% on a loan 90-day invoice are consistent with observable market rates. These rates would also include and reflect the Lenders operational costs and cost of capital, which are similar for all loans. Having this in mind, a simple scorecard could look like this:
No financing approved
Based on this scorecard, Laces would be assigned a risk rating of C and Lender could offer Laces financing with an advance rate of 80% and an interest rate/fee of 7.00% against the invoice as collateral. The Asset Originator would advance $786 (80% advance less $14 interest at 7% interest) and collect $800 in 90 days from Laces.
Asset Valuation is the process of determining the current worth of an asset or portfolio by assigning a monetary value. The value of a portfolio of assets is often also expressed as the net asset value (NAV).
A NAV is usually required when a portfolio is sold or when investors want to join/exit an existing investment pool. Then the portfolio value ultimately determines the investment/redemption price. Note that for these purposes the portfolio value may be different to the book value or accounting value of a portfolio.
Determining the value of illiquid assets is notoriously difficult because – by definition – there isn’t a liquid secondary market to determine the value, unlike many stocks, bonds or most fungible tokens. For illiquid asset portfolios the valuation methodology is thus often based on a fair value valuation utilizing a financial model ("marked to model"). This often comes down to valuing the present value of future cash flows expected to receive based on these financings - the so-called discounted cash flow (“DCF”) method.
Tinlake's valuation methodology is also based on a fair value valuation ("marked to model") utilizing a discounted cash flow model. The approach can be summarized as follows:
Derive Expected Cash flows
For every outstanding financing of an asset, the expected cash flow is calculated. The current implementation allows to calculate the Expected Repayment of simple bullet loan structures which are common in particular in invoice financing and trade finance. The
Expected Cash Flow is calculated based on (i) the expected repayment dates and (ii) the expected repayment amounts.
(i) The expected repayment date is derived on contractual obligations associated with the financing, e.g. the due date of the underlying invoice. This is provided through an Oracle based on the documents underlying the NFT minted on Centrifuge's P2P Protocol.
(ii) The expected repayment amount is projected based on the outstanding Tinlake financing by applying the financing fee on the current debt until the repayment date.
Risk-adjust expected cas flows
The expected Cash Flow is risk-adjusted for credit risk by the
Expected loss. Every financing is allocated a risk class that has a
Probability of Default (PD) and
Loss Given Default (LGD) assigned to it. The
Expected Loss is calculated as
Expected loss = Expected Cash Flow * PD * LGD and substracted from the expected repayment amount to adjust for credit risk. Note that PDs are often communicated per anno and may need to be adjusted to the term of the underlying asset.
Discount risk-adjusted expected cash flows The risk-adjusted expected cash-flows are discounted with an appropriate discount rate (this depends on asset class and pool) to derive the present value of a financing. The discount rate usually reflects the rate of return an investor could earn in the marketplace on an investment of comparable size, tenor and risk. Note, that the discount rate is the same for every financing of a pool. The standard formula to calculate the PV of a cash flow is
r = discount rate and
t = period of cash flows. As we deal with intra-year cash flows, the formula becomes
with being number of discounting periods per year (e.g. 360 days for a financial year).
Tinlake allows for a flexible treatment of write-offs. If a financing is overdue the expected repayment amount can be (partially) reduced by defined percentages after a defined number of days following pre-determined criteria (e.g. a grace period and collection period).
Average loan maintainance/running costs (such as legal, SPV, servicing) could be substracted from the PV. At the moment these are set to zero in Tinlake's NAV calculation as operating costs are currently borne by the SPV of the issuer.
Today = 31.03.2020
r = 5.00%
Days per year: 360
Seconds per year: 31536000
Financing parameters: Financing date = 01.01.2020 Financing amount = 100 DAI Financing fee = 10% APR Expected repayment date = 30.06.2020 Expected loan duration = 180 days (Annual) PD = 4% LGD = 50%
Remember the textbook compounding formula is
P = Principal in DAI [=100]
r = Interest rate (decimal [0.1])
t = Time --> Loan duration i years
n = Number of times interest is compounded per unit
Applying this to our financing assuming compounding per second gives P = 100 DAI r = 0.1 t = loan duration in years = 180/360 days = 0.5 n = 31536000 seconds per year
The Expected Loss with the risk parameters given is
Note that the PD is adjusted to reflect the term of the asset. This is substracted from the Expected CF to calculate the risk-adjusted expected CF: 105.13 DAI - 1.05 DAI ~ 104 DAI