# Getting Started

## Guides

* [How to set up MetaMask and GeneChain network](https://docs.genechain.io/v/master/user-manual/metamask)
* [Transaction always pending on MetaMask](https://docs.genechain.io/v/master/user-manual/faq/transaction-always-pending-on-metamask)
* [GeneChain common errors](https://docs.genechain.io/v/master/user-manual/faq/common-errors)
* [Supply Asset to supplying market](https://docs.lendland.finance/how-lendland-works#supply-asset-to-supplying-market)
* [Borrow Asset from borrowing market](https://docs.lendland.finance/how-lendland-works#borrow-asset-from-borrowing-market)

## Networks

The contract addresses of different networks are listed below.

{% tabs %}
{% tab title="GeneChain Mainnet" %}

| Name         | Description         | Address                                                                                                                                 |
| ------------ | ------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| eRNA         | Ribose Network Atom | 0x3Dd95b5d01c7C8E154401e751b9F9Bfe490b85cA                                                                                              |
| eVBC         | RADR network        | 0x95681029d4cAf9abaabb15845c9C7ADEBCE6a4fa                                                                                              |
| eUSDT        | Tether USD          | 0xFD4Df231B04904a96F95e6A727D075277dA93d4E                                                                                              |
| eLEND        | Lendland            | 0xBff78dF614C9FEbE012A2Bc4FD9958a4573Df6E5                                                                                              |
| eNOVA        | Novaswap            | 0x98F007a79807943EaDcAF601d8b494726B9c3932                                                                                              |
| LEND         | Lendland            | [0x1589992c28120C8981C7360edbC7f68640718689](https://scan.genechain.io/address/0x1589992c28120C8981C7360edbC7f68640718689/transactions) |
| Unitroller   | Lendland Controller | 0x97153f1373862A0D44eE534fB31E92C31E70D51C                                                                                              |
| PriceOracle  | Price Oracle        | 0x42602b74221A0081aEF237BB1fCBcc709496eF47                                                                                              |
| {% endtab %} |                     |                                                                                                                                         |

{% tab title="GeneChain Testnet" %}

| Name          | Description         | Address                                                                                                                                         |
| ------------- | ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| eRNA          | Ribose Network Atom | [0x6C818c0C83d182F2d77D2786780143E8c71eBf6B](https://scan-testnet.genechain.io/address/0x6C818c0C83d182F2d77D2786780143E8c71eBf6B/transactions) |
| eVBC          | RADR network        | [0xFC8e841Bc857f532abB6BBB251b8236CD8D46Ff9](https://scan-testnet.genechain.io/address/0xFC8e841Bc857f532abB6BBB251b8236CD8D46Ff9)              |
| eUSDT         | Tether USD          | [0x323Af9990958D396D417eB65260FF12100CEcEf9](https://scan-testnet.genechain.io/address/0x323Af9990958D396D417eB65260FF12100CEcEf9)              |
| eLEND         | Lendland            | [0x44095Ebb2a33B6CD86fE0dFC7Ca632f61Ed2c1a5](https://scan-testnet.genechain.io/address/0x44095Ebb2a33B6CD86fE0dFC7Ca632f61Ed2c1a5)              |
| eETH          | Ethereum            | [0xd98AC82aD907B921D9006b84597639779Ae92897](https://scan-testnet.genechain.io/address/0xd98AC82aD907B921D9006b84597639779Ae92897)              |
| eBTC          | Bitcoin             | [0xeC8bbC9e018cA155Dfc9EeB5c13c1A518999f6A0](https://scan-testnet.genechain.io/address/0xeC8bbC9e018cA155Dfc9EeB5c13c1A518999f6A0)              |
| eNOVA         | Novaswap            | [0xd600D0FEfCC28f09c7A902D137F2bFaf3FAf7330](https://scan-testnet.genechain.io/address/0xd600D0FEfCC28f09c7A902D137F2bFaf3FAf7330)              |
| LEND          | Lendland            | [0x0Bb78E352af8231d471e37d4DBCB8A2811ABe22b](https://scan-testnet.genechain.io/address/0x0Bb78E352af8231d471e37d4DBCB8A2811ABe22b)              |
| Unitorller    | Lendland Controller | [0x32cde64882C748da88DEd2297Ca434AeDa2b3C9A](https://scan-testnet.genechain.io/address/0x32cde64882C748da88DEd2297Ca434AeDa2b3C9A)              |
| PriceOracle   | Price Oracle        | [0x84635513c748e0E111504A90B7Ff65203Bd432F9](https://scan-testnet.genechain.io/address/0x84635513c748e0E111504A90B7Ff65203Bd432F9)              |
| {% endtab %}  |                     |                                                                                                                                                 |
| {% endtabs %} |                     |                                                                                                                                                 |

## Math

### eToken and underlying decimals

Most of the tokens of ERC20 contracts in GeneChain are 18-digits, and a few are 6-digits, such as USDT. The eTokens corresponding to these tokens are all 8-digits.

| eToken | Decimals | Underlying token | Decimals |
| ------ | -------- | ---------------- | -------- |
| eRNA   | 8        | RNA              | 18       |
| eVBC   | 8        | VBC              | 18       |
| eUSDT  | 8        | USDT             | 6        |
| eLEND  | 8        | LEND             | 18       |
| eETH   | 8        | ETH              | 18       |
| eBTC   | 8        | BTC              | 18       |
| eNOVA  | 8        | NOVA             | 18       |

### Exchange Rate

The Exchange Rate represents the ratio between eToken and the underlying token. As market interest increases, each eToken can be converted into an ever-increasing number of underlying assets.

```
oneETokenInUnderlying = exchangeRateCurrent / (1 * 10 ^ (18 + underlyingDecimals - eTokenDecimals))
```

There is no underlying contract for RNA, so to do this with eRNA, set underlyingDecimals to 18.

### Calculating Accrued Interest

Interest rates for each market update on any block in which the ratio of borrowed assets to supplied assets in the market has changed. The amount interest rates are changed depends on the interest rate model smart contract implemented for the market, and the amount of change in the ratio of borrowed assets to supplied assets in the market.

Lendland uses different interest rate modes, the corresponding contract addresses are listed below:

{% tabs %}
{% tab title="GeneChain Mainnet" %}

| Name                  | Address                                    |
| --------------------- | ------------------------------------------ |
| RNAInterestRateModel  | 0xB7C7e2B41E20AF4ffD08ce017286Cc625e5D3327 |
| USDTInterestRateModel | 0x5420fB2A471813f00647E88AABf8E4b6899E9cDb |
| VBCInterestRateModel  | 0xD64d95657c1eCC702c14425E120834dB456332E3 |
| NovaInterestRateModel | 0x2698fC941F5F79D7B7Ebf474f84c678b4bD85479 |
| LendInterestRateModel | 0x2698fC941F5F79D7B7Ebf474f84c678b4bD85479 |
| {% endtab %}          |                                            |

{% tab title="GeneChain Testnet" %}

| Name                  | Address                                    |
| --------------------- | ------------------------------------------ |
| RNAInterestRateModel  | 0x73836B1809Dd08657e1d1C940782E61b996C9824 |
| USDTInterestRateModel | 0x96C661c3c6b3E58469794Ac4b7C884b251Ca22BA |
| VBCInterestRateModel  | 0xfd537c94789E51F54b10E4C7d15c115Bd62f473f |
| NovaInterestRateModel | 0x9fA072f042D5617DEEE76c92549031478fd23549 |
| LendInterestRateModel | 0x9fA072f042D5617DEEE76c92549031478fd23549 |
| {% endtab %}          |                                            |
| {% endtabs %}         |                                            |

Interest accrues to all suppliers and borrowers in a market when any GeneChain address interacts with the market’s eToken contract, calling one of these functions: mint, redeem, borrow, or repay. Successful execution of one of these functions triggers the accrueInterest method, which causes interest to be added to the underlying balance of every supplier and borrower in the market. Interest accrues for the current block, as well as each prior block in which the accrueInterest method was not triggered (no user interacted with the cToken contract). Interest compounds only during blocks in which the eToken contract has one of the aforementioned methods invoked.

#### Calculating the APY&#x20;

The Annual Percentage Yield (APY) for supplying or borrowing in each market can be calculated using the value of supplyRatePerBlock (for supply APY) or borrowRatePerBlock (for borrow APY) in this formula:

```
Rate = eToken.supplyRatePerBlock(); // Integer
Rate = 2345678
RNA Mantissa = 1 * 10 ^ 18 (RNA has 18 decimal places)
Blocks Per Day = 28800 (3 seconds per block)
Days Per Year = 365

APY = ((((Rate / ETH Mantissa * Blocks Per Day + 1) ^ Days Per Year)) - 1) * 100
```
