# IKyberReserve

{% hint style="warning" %}
You are referring to the **`Legacy`** version of KyberSwap docs.

For the most updated information, please refer to:

* [**`Classic`**](https://github.com/KyberNetwork/kyberswap-documentation/blob/main/reference/legacy/api-abi/core-smart-contracts/broken-reference/README.md)
* [**`Elastic`**](/reference/legacy/kyberswap-elastic.md)
* [**`Limit Order`**](/kyberswap-solutions/limit-order.md)
* [**`Aggregator`**](/kyberswap-solutions/kyberswap-aggregator.md)
  {% endhint %}

## interface IKyberReserve

imports IERC20

*Source*: [IKyberReserve.sol](https://github.com/KyberNetwork/smart-contracts/blob/master/contracts/sol6/IKyberReserve.sol)

***

### INDEX[​](https://docs.kyberswap.com/Legacy/api-abi/core-smart-contracts/api_abi-ikyberreserve#index) <a href="#index" id="index"></a>

\<AUTOGENERATED\_TABLE\_OF\_CONTENTS>

### REFERENCE[​](https://docs.kyberswap.com/Legacy/api-abi/core-smart-contracts/api_abi-ikyberreserve#reference) <a href="#reference" id="reference"></a>

#### Functions[​](https://docs.kyberswap.com/Legacy/api-abi/core-smart-contracts/api_abi-ikyberreserve#functions) <a href="#functions" id="functions"></a>

#### `trade`[​](https://docs.kyberswap.com/Legacy/api-abi/core-smart-contracts/api_abi-ikyberreserve#trade) <a href="#trade" id="trade"></a>

Executes a trade between the reserve and the KyberNetwork contract.

***

function **trade**(IERC20 srcToken, uint256 srcAmount, IERC20 destToken, address payable destAddress, uint256 conversionRate, bool validate) external payable returns (bool) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | `srcToken` | IERC20 | source ERC20 token contract address | | `srcAmount` | uint256 | source ERC20 token amount in its token decimals | | `destToken` | IERC20 | destination ERC20 token contract address | | `destAddress` | address | recipient address for destination ERC20 tokens | | `conversionRate` | uint256 | actual conversion rate between srcToken and destToken | | `validate` | bool | Apply additional validations if `true` | **Returns:**\ `true` if the trade was successful, otherwise `false` if unsuccessful

\
\### \`getConversionRate\` Gets the conversion rate for a pair of tokens at block number. \_\_\_ function \_\_getConversionRate\_\_(IERC20 src, IERC20 dest, uint256 srcQty, uint256 blockNumber) external view returns (uint256) | Parameter | Type | Description | | --------- |:-----:|:-----------:| | \`src\` | IERC20 | source ERC20 token contract address | | \`dest\` | IERC20 | destination ERC20 token contract address | | \`srcQty\` | uint256 | source ERC20 token in its token decimals | | \`blockNumber\` | uint256 | current block height or block number | \*\*Returns:\*\*\ Current conversion rate of token pairs at \`blockNumber\`


---

# Agent Instructions: 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:

```
GET https://docs.kyberswap.com/reference/legacy/api-abi/core-smart-contracts/ikyberreserve.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
