# How do we calculate interest?

## Supported Methods

There are 2 methods of interest calculation supported by Zero Hash:

1. Interest can be accrued in USD, based on the initial value of the loan in USD; and
2. Interest can be accrued in the form of the lent asset, based on the lent quantity of that asset.

## Methodology

### 1. Accrue Interest in USD

To calculate accrued interest in USD, we use the `Initial Loan Value (USD)`, ```Loan Rate```, `Accrual Method` and `Transaction Time` fields that are filled in at loan submission. As a reminder:

• `Initial Loan Value (USD)` is the initial value of the loan in USD, which is the Loan Quantity multiplied by the conversion price of Loan Asset / USD that the lender and borrower agree to. Example: \$1,000,000.
• `Loan Rate` is the annualized rate of interest to be applied to the value of the loan, to be paid by the borrower to the lender. Example: 5%.
• `Accrual Method` is the method by which interest is calculated. Currently Actual/365 and Actual/360 are supported.
• `Transaction Time` is the date and time that the loan was executed. Example: April 1, 2020 at 4pm CST.

Accrued Interest is therefore a simple calculation that uses the following structure:

Accrued Interest = `Initial Loan Value (USD)` x (```Loan Rate``` / `Accrual Method:Days`) x (Now - `Transaction Time`)

## Example

• Initial Loan Value: \$1,000,000
• Loan Rate: 5%
• Accrual Method: Actual/360
• Transaction Time: April 1, 2020 at 4pm CST
• Now: April 16, 2020 at 4pm CST

Accrued Interest = \$1,000,000 x (5% / 360) x (April 16, 2020 at 4pm CST - April 1, 2020 at 4pm CST)

Accrued Interest = \$2,083.33

### 1. Accrue Interest in the Lent Asset

To calculate accrued interest in USD, we use the `Loan Asset``Loan Quantity````Loan Rate```, `Accrual Method` and `Transaction Time` fields that are filled in at loan submission. As a reminder:

• `Loan Asset` is the asset that is lent from lender to borrower. Example: BTC.
• `Loan Quantity` is the amount of the Loan Asset lent from lender to borrower. Example: 100, which represents 100 BTC.
• `Loan Rate` is the annualized rate of interest to be applied to the the loan, to be paid by the borrower to the lender. Example: 5%.
• `Accrual Method` is the method by which interest is calculated. Currently Actual/365 and Actual/360 are supported.
• `Transaction Time` is the date and time that the loan was executed. Example: April 1, 2020 at 4pm CST.

Accrued Interest is therefore a simple calculation that uses the following structure:

Accrued Interest = `Loan Quantity` x (```Loan Rate``` / `Accrual Method:Days`) x (Now - `Transaction Time`)

## Example

• Loan Quantity: BTC
• Loan Asset: 100
• Loan Rate: 5%
• Accrual Method: Actual/360
• Transaction Time: April 1, 2020 at 4pm CST
• Now: April 16, 2020 at 4pm CST

Accrued Interest = 100 x (5% / 360) x (April 16, 2020 at 4pm CST - April 1, 2020 at 4pm CST)

Accrued Interest = 0.20833333 BTC