# IKyberFeeHandler

{% 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 IKyberFeeHandler

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

***

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

\<AUTOGENERATED\_TABLE\_OF\_CONTENTS>

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

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

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

Event for logging the rewards paid.

***

event **RewardPaid**(address indexed staker, uint256 indexed epoch, IERC20 indexed token, uint256 amount) | Parameter | Type | Description | | --------- |:-------:|:-------------------------:| | `staker` | address | staker's address | | `epoch` | uint256 | epoch number | | `token` | address | ERC20 token address | | `amount` | uint256 | ERC20 token amount in wei | Signature: `0xaf206e736916d38b56e2d559931a189bc3119b8fc6d6850bd34e382f09030587`

\\

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

Event for logging the rebates paid.

***

event **RebatePaid**(address indexed rebateWallet, IERC20 indexed token, uint256 amount) | Parameter | Type | Description | | -------------- |:-------:|:----------------------------:| | `rebateWallet` | address | address receiving the rebate | | `token` | address | ERC20 token address | | `amount` | uint256 | ERC20 token amount in wei | Signature: `0xb5ec5e03662403108373ab6431d3e834cb1011fca164541aef315fc7dea7b3b6`

\\

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

Event for logging the platform fees paid.

***

event **PlatformFeePaid**(address indexed platformWallet, IERC20 indexed token, uint256 amount) | Parameter | Type | Description | | ---------------- |:-------:|:----------------------------------:| | `platformWallet` | address | address receiving the platform fee | | `token` | address | ERC20 token address | | `amount` | uint256 | ERC20 token amount in wei | Signature: `0xebe3db09f5650582b4782506e0d272262129183570e55fcf8768dd6e91f8c0f6`

\\

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

Event for logging the amount of KNC burned.

***

event **KncBurned**(uint256 kncTWei, IERC20 indexed token, uint256 amount) | Parameter | Type | Description | | --------- |:-------:|:----------------------------------:| | `kncTwei` | address | address receiving the platform fee | | `token` | address | ERC20 quote token address | | `amount` | uint256 | ERC20 quote token amount in wei | Signature: `0xa0fcef56e2b45fcbeb91d5e629ef6b2b6e982d0768f02d1232610315cd23ea10`

\\

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

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

Handles the fees when a trade happens in the network, unless the trade is not involving any fees.

***

function **handleFees**(contract IERC20 token, address\[] eligibleWallets, uint256\[] rebatePercentages, address platformWallet, uint256 platformFee, uint256 networkFee) external payable | Parameter | Type | Description | | ------------------- |:---------:|:----------------------------------------------------:| | `token` | address | ERC20 quote token address | | `eligibleWallets` | address\[] | array of eligible wallet addresses | | `rebatePercentages` | uint256\[] | array of rebate percentages to rebate wallets | | `platformWallet` | address | wallet address receiving the platform fee | | `platformFee` | uin256 | fee amount in wei the platfrom wallet is entitled to | | `networkFee` | uin256 | fee amount in wei to be allocated for BRR |\\

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

Claim the rebates for the rebate wallet from KyberFeeHandler.

***

function **claimReserveRebate**(address rebateWallet) external returns (uint256) | Parameter | Type | Description | | -------------- |:-------:|:----------------------------:| | `rebateWallet` | address | address receiving the rebate | **Returns:**\ The rebate amount claimed in wei.\\

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

Claim the platform fees for the platform wallet from KyberFeeHandler.

***

function **claimPlatformFee**(address platformWallet) external returns (uint256) | Parameter | Type | Description | | ---------------- |:-------:|:----------------------------------:| | `platformWallet` | address | address receiving the platform fee | **Returns:**\ The platform fee amount claimed in wei.\\

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

Claim the staking rewards from KyberFeeHandler.

***

function **claimStakerReward**(address staker, uint256 epoch) external returns (uint256 amount) | Parameter | Type | Description | | --------- |:-------:|:---------------------------------------------:| | `staker` | address | staker's address | | `epoch` | uin256 | which epoch is the staker claiming the reward | **Returns:**\ The staking reward amount claimed in wei.\\

[PreviousKyberHintHandler](https://docs.kyberswap.com/Legacy/api-abi/core-smart-contracts/api_abi-kyberhinthandler)[<br>](https://docs.kyberswap.com/Legacy/api-abi/core-smart-contracts/api_abi-ikyberstaking)


---

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