> For the complete documentation index, see [llms.txt](https://docs.lossless.io/protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lossless.io/protocol/guides/lossless-integration-into-the-token/custom-token.md).

# Custom Token

The best way for integrating lossless protection into your token contract that has custom functions is to inherit from LERC20.&#x20;

```solidity
import ./LERC20.sol

contract YourCustomToken is LERC20 {
    constructor(
         uint256 totalSupply_,
         string memory name_, 
         string memory symbol_
         address admin_,
         address recoveryAdmin_,
         uint256 timelockPeriod_,
         address lossless_
         ) LERC20(
               totalSupply_,
               name_,
               symbol_,
               admin_,
               recoveryAdmin_,
               timelockPeriod_,
               lossless_) {}
               
   // Your custom function goes here...
}

```

However in cases where you want to modify one of the public functions like:

* `transfer`
* `transferFrom`
* `approve`
* `increaseAllowance`
* `decreaseAllowance`

You must add before modifier to these functions. This modifier must call [lossless controller](/protocol/technical-reference/lossless-controller.md) hook function and forward all of the initial function call parameters. An example of how these modifiers can be found here:

{% embed url="<https://github.com/Lossless-Cash/lossless-v4/blob/master/contracts/utils/first-version/LERC20.sol>" %}
LERC20
{% endembed %}

{% embed url="<https://github.com/Lossless-Cash/lossless-v4/blob/master/contracts/LERC20Burnable.sol>" %}
LERC20Burnable
{% endembed %}

{% embed url="<https://github.com/Lossless-Cash/lossless-v4/blob/master/contracts/LERC20Mintable.sol>" %}
LERC20Mintable
{% endembed %}

{% embed url="<https://github.com/Lossless-Cash/lossless-v4/blob/master/contracts/LERC20MintableBurnable.sol>" %}
LERC20MintableBurnable
{% endembed %}
