> For the complete documentation index, see [llms.txt](https://docs.nept.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nept.finance/develop/contracts/flashloan.md).

# Flashloan Reciever

Flashloan Receiver Contract Addres&#x73;**:** [inj1wmtzan6tgzg0zyauknuxdnnfjwn350yewjf6fq](https://injscan.com/contract/inj1wmtzan6tgzg0zyauknuxdnnfjwn350yewjf6fq/)

The **Flash Loan Receiver Contract** is a component of the Neptune protocol designed to handle flash loan operations. It is a utility which allows users to execute multiple messages related to a trading strategy utilising flashloans. Upon a borrow\_flash\_loan excution call, the borrowed funds and messages are forwarded to the Flashloan Receiver to be executed.

## Execute Messages

### 1. Receive Flash Loan

**Execute:** `receive_flash_loan`

**Purpose:** Authorizes the sender and processes subsequent flash loan messages.

**Execute Input:**

```json
{
  "receive_flash_loan": {
    "flash_loan_receive_msg": {
      "msgs": [
        {
          "bank": {
            "send": {
              "amount": [
                {
                  "denom": "inj",
                  "amount": "1000000"
                }
              ],
              "to_address": "inj1exampleaddress"
            }
          }
        }
      ],
      "sender": "inj1senderaddress"
    }
  }
}
```

| Parameter                | Type                  | Description                                                    | Required |
| ------------------------ | --------------------- | -------------------------------------------------------------- | -------- |
| `flash_loan_receive_msg` | `FlashLoanReceiveMsg` | Contains the messages to be processed and the sender's address | Yes      |

### 2. Withdraw Assets

**Execute:** `withdraw_assets`

**Purpose:** Withdraws specified assets to a designated recipient.

**Execute Input:**

```json
{
  "withdraw_assets": {
    "assets": [
      {
        "native_token": {
          "denom": "inj"
        }
      }
    ],
    "recipient": "inj1nc7gjkf2mhp34a6gquhurg8qahnw5kxs5u3s4u"
  }
}
```

| Parameter   | Type             | Description                                | Required |
| ----------- | ---------------- | ------------------------------------------ | -------- |
| `assets`    | `Vec<AssetInfo>` | List of assets to withdraw                 | Yes      |
| `recipient` | `Addr`           | Recipient address, Neptune Market contract | Yes      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nept.finance/develop/contracts/flashloan.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
