> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eco.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ZeroLend (zerolend)

> Lending protocol on zkSync Era. Aave V3 fork.

Lending protocol on zkSync Era. Aave V3 fork.

| Fact | Value |
| - | - |
| Category | Lending |
| Family | none |
| Namespace | `Zerolend` on zksync |
| Chains | zksync |

## Notes

* Same interface as Aave V3 (forked codebase) -- referralCode always 0
* interestRateMode: 2 = variable (stable rate not supported)
* All supply/repay operations require ERC-20 approval to the Pool
* zkSync Era-only deployment

## Its names in a program

On zkSync Era, `Zerolend` is a namespace: its contracts need no import.

```ts theme={null}
function main() {
  // zkSync Era's pool, `0x4d9429246EA989C9CeE203B43F6d1C7D83e3B8F8`.
  require(Zerolend.Pool != 0);
}
```

## Deployments

| Chain | Contract | Address | In a program |
| - | - | - | - |
| [zkSync Era](https://docs.eco.com/sauce-sdk/reference/chains/zksync.md) | pool | `0x4d9429246EA989C9CeE203B43F6d1C7D83e3B8F8` | `Zerolend.Pool` |

## ABI

### `ZeroLendPoolABI`

`import ZeroLendPoolABI from "./protocols/zerolend/ZeroLendPoolABI.json";` Speaks for: pool.

* `supply(address asset, uint256 amount, address onBehalfOf, uint16 referralCode)`
* `withdraw(address asset, uint256 amount, address to) returns (uint256)`
* `borrow(address asset, uint256 amount, uint256 interestRateMode, uint16 referralCode, address onBehalfOf)`
* `repay(address asset, uint256 amount, uint256 interestRateMode, address onBehalfOf) returns (uint256)`

## Next steps

* [Protocols](https://docs.eco.com/sauce-sdk/reference/protocols.md): the other protocols, by what they do.
* [Protocols and tokens](https://docs.eco.com/sauce/names.md): calling a contract by its namespace, or through its ABI.
* [Glossary](https://docs.eco.com/sauce/glossary.md): the words these pages use, in plain terms.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.