# IWNatDelegationFee

> Manages the delegation fees set by voters for WFLR delegations.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown versions of documentation pages are available by appending `.md` to the page URL.

Source: https://dev.flare.network/network/fsp/solidity-reference/IWNatDelegationFee

Manages the delegation fees set by voters for WFLR delegations.

Sourced from `IWNatDelegationFee.sol` on [GitHub](https://github.com/flare-foundation/flare-smart-contracts-v2/blob/main/contracts/userInterfaces/IWNatDelegationFee.sol).

## Functions[​](#functions "Direct link to Functions")

### defaultFeePercentageBIPS[​](#defaultfeepercentagebips "Direct link to defaultFeePercentageBIPS")

The default fee percentage value.

```
function defaultFeePercentageBIPS() external view returns (    uint16);
```

### feePercentageUpdateOffset[​](#feepercentageupdateoffset "Direct link to feePercentageUpdateOffset")

The offset in reward epochs for the fee percentage value to become effective.

```
function feePercentageUpdateOffset() external view returns (    uint24);
```

### getVoterCurrentFeePercentage[​](#getvotercurrentfeepercentage "Direct link to getVoterCurrentFeePercentage")

Returns the current fee percentage of `_voter`.

```
function getVoterCurrentFeePercentage(    address _voter) external view returns (    uint16);
```

#### Parameters[​](#parameters "Direct link to Parameters")

-   `_voter`: Voter address.

### getVoterFeePercentage[​](#getvoterfeepercentage "Direct link to getVoterFeePercentage")

Returns the fee percentage of `_voter` for given reward epoch id.

```
function getVoterFeePercentage(    address _voter,    uint256 _rewardEpochId) external view returns (    uint16);
```

#### Parameters[​](#parameters-1 "Direct link to Parameters")

-   `_voter`: Voter address.
-   `_rewardEpochId`: Reward epoch id. **NOTE:** fee percentage might still change for the `current + feePercentageUpdateOffset` reward epoch id

### getVoterScheduledFeePercentageChanges[​](#getvoterscheduledfeepercentagechanges "Direct link to getVoterScheduledFeePercentageChanges")

Returns the scheduled fee percentage changes of `_voter`.

```
function getVoterScheduledFeePercentageChanges(    address _voter) external view returns (    uint256[] _feePercentageBIPS,    uint256[] _validFromEpochId,    bool[] _fixed);
```

#### Parameters[​](#parameters-2 "Direct link to Parameters")

-   `_voter`: Voter address.

#### Returns[​](#returns "Direct link to Returns")

-   `_feePercentageBIPS`: Positional array of fee percentages in BIPS.
-   `_validFromEpochId`: Positional array of reward epoch ids the fee settings are effective from.
-   `_fixed`: Positional array of boolean values indicating if settings are subjected to change.

### setVoterFeePercentage[​](#setvoterfeepercentage "Direct link to setVoterFeePercentage")

Allows voter to set (or update last) fee percentage.

```
function setVoterFeePercentage(    uint16 _feePercentageBIPS) external returns (    uint256);
```

#### Parameters[​](#parameters-3 "Direct link to Parameters")

-   `_feePercentageBIPS`: Number representing fee percentage in BIPS.

#### Returns[​](#returns-1 "Direct link to Returns")

-   \`\`: Returns the reward epoch number when the value becomes effective.

## Events[​](#events "Direct link to Events")

### FeePercentageChanged[​](#feepercentagechanged "Direct link to FeePercentageChanged")

Event emitted when a voter fee percentage value is changed.

```
event FeePercentageChanged(    address voter,    uint16 value,    uint24 validFromEpochId)
```
