> For the complete documentation index, see [llms.txt](https://docs.tokentable.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tokentable.xyz/for-developers/unlocker/evm/apis/utilities/fee-collector.md).

# Fee Collector

## ITTUFeeCollector

*This contract handles TokenTable service fee calculation.*

### DefaultFeeSet

```solidity
event DefaultFeeSet(uint256 bips)
```

### CustomFeeSet

```solidity
event CustomFeeSet(address unlockerAddress, uint256 bips)
```

### getFee

```solidity
function getFee(address unlockerAddress, uint256 tokenTransferred) external view returns (uint256 tokensCollected)
```

Returns the amount of fees to collect.

#### Parameters

| Name             | Type    | Description                                         |
| ---------------- | ------- | --------------------------------------------------- |
| unlockerAddress  | address | The address of the Unlocker. Used to fetch pricing. |
| tokenTransferred | uint256 | The number of tokens transferred.                   |

#### Return Values

| Name            | Type    | Description                              |
| --------------- | ------- | ---------------------------------------- |
| tokensCollected | uint256 | The number of tokens to collect as fees. |
