# Finny

Finny is a decentralized lending and borrowing protocol hosted on the Internet computer.&#x20;

Our canister principal is listed below:

```
z4viz-kiaaa-aaaal-qbxmq-cai
```

## How it works visualized

## Protocol Math

All math on Finny is done using integers. All assets have a token decimal cutoff that represents the smallest decimal unit of that asset. For example the ICP token has 8 decimals.  If you want to signify 5.2 ICP you need would enter in 520\_000\_000 as into the protocol. See below for other assets and token decimals. Liquidity is denominated in USD with 8 decimals.

## Assets

| fToken | fToken Decimal | Underlying | Underlying Decimal |
| ------ | -------------- | ---------- | ------------------ |
| fICP   | 8              | ICP        | 8                  |
| fCkBtc | 8              | CkBtc      | 8                  |
| fXTC   | 8              | XTC        | 12                 |

### Notational Token (Not for  Lending or Borrowing Just for Liquidity Displays)

| Token | Decimal |
| ----- | ------- |
| USD   | 9       |

## Exchange Rate

The exchange rate is given by the amount of tokens one would receive for 1 underlying token.&#x20;

$$
exchangeRateMantissa\_{n} =\\\frac{ (totalCash\_{n}+totalBorrows\_{n}-totalReserves\_{n})\*mantissa}{totalfTokenSupply\_{n}}
$$
