> ## 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.

# Instadapp (instadapp)

> Flash loan aggregator that routes across Aave, Maker, Balancer and other sources.

Flash loan aggregator that routes across Aave, Maker, Balancer and other sources.

| Fact | Value |
| - | - |
| Category | Infrastructure and standards |
| Family | none |
| Namespace | `Instadapp` on ethereum |
| Chains | ethereum |

## What it offers

* **getRoutes**: Query available flash loan routes and their IDs
* **flashLoan**: Execute a flash loan through a route

## Notes

* Aggregates flash loans from: Aave V2/V3, Maker, Balancer, Compound, and others
* Each route has a different fee structure - use getRoutes to find available options
* route parameter selects which underlying protocol to borrow from
* Callback pattern: your contract must implement the receiver interface to repay
* Flash loans must be repaid within the same transaction (atomic)

## Its names in a program

On Ethereum, `Instadapp` is a namespace: its contracts need no import.

```ts theme={null}
function main() {
  // Ethereum's flashloanAggregator, `0xE6054aE0Dba269560061D736e7510Ce64fCD517d`.
  require(Instadapp.FlashloanAggregator != 0);
}
```

## Deployments

| Chain | Contract | Address | In a program |
| - | - | - | - |
| [Ethereum](https://docs.eco.com/sauce-sdk/reference/chains/ethereum.md) | flashloanAggregator | `0xE6054aE0Dba269560061D736e7510Ce64fCD517d` | `Instadapp.FlashloanAggregator` |

## ABI

### `FlashAggregatorABI`

`import FlashAggregatorABI from "./protocols/instadapp/FlashAggregatorABI.json";` Speaks for: flashloanAggregator.

* `flashLoan(address[] tokens, uint256[] amounts, uint256 route, bytes data, bytes extraData)`
* `getRoutes() pure returns (uint16[] routes)`

## 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.