Lossless
Search…
Lossless Integration
Lossless can be integrated to your token code by using Lossless protected ERC20 token.

Lossless protected ERC20

Any token can be protected by Lossless just by using our ERC20 standard (LERC20) instead of the traditional ERC20. Code for the LERC20 can be found here:
lossless-v1/LERC20.sol at master · Lossless-Cash/lossless-v1
GitHub
LERC20 has the same interface and methods as the standard ERC20. The only difference is that before and after calling each of standard ERC20 method it does another call to the Lossless Controller.

Lossless Controller

Lossless Controller is a smart contract that has logic which allows it to check if the transfer or any other ERC20 method can go through. It has the ability to stop the ERC20 method from executing and also is the central contract for the whole Lossless ecosystem. Single Lossless Controller can be used by multiple tokens.

Deploying Lossless protected tokens

Lossless protected token can be deployed just like any other token, all needs is just a few additional properties.
Deploying it requires these parameters:
    1.
    totalSupply_ - amount of tokens to be minted
    2.
    name_ - token title
    3.
    symbol_ - symbol of a token
    4.
    admin_ - project owner’s administrative wallet address, this will be used in Lossless governance decision. Token creators should set a wallet that they are planning on using to interact with Lossless protocol.
    5.
    recoveryAdmin_ - project owner’s wallet that is used to change admin_. Token creators should use multisig for this and keep it as secure as possible as this wallet allows changing the admin wallet.
    6.
    timelockPeriod_ - timelock period in seconds dedicated for turning Lossless turn off. In case project decides to turn off Lossless they would have to wait for this period after initially proposing to turn the Lossless functionality off. Recommended timelockPeriod_ is 24 hours or 86400 seconds. Any lower timelockPeriod_ will be considered unsafe and will be marked as such in Lossless platform.
    7.
    lossless_ - Lossless protocol controller address. Should be set to Lossless Controller address. Lossless Controller address is different on different chains. Any other address will not allow the token to function properly. See below.
Chain
Lossless Controller Address
ETH
0xe91D7cEBcE484070fc70777cB04F7e2EfAe31DB4
BSC
0xDBB5125CEEaf7233768c84A5dF570AeECF0b4634
POLYGON
0x66622e2C1b991983e88132da19b2C31f71009035

Example of deploying LERC20 using REMIX IDE:

    1.
    Create a new contract named LERC20.sol
    3.
    Save it
    4.
    Compile LERC20.sol
    5.
    Choose constructor params. Could look something like the image below.
    6.
    Press transact and the token will be deployed to the Environment that was selected in the Remix.

Lossless Controller on Testnets

Chain
Address
ROPSTEN
0x27fce20D62f1DE73B0Ae1Dc7572F881061692de9
BSC TESTNET
0xC46236F780f1294B2C2a8c3cE5B4d62258dC2619
MUMBAI (POLYGON TESTNET)
0x29C2541d25091B565c6999f20549EB2c75b7c269
Last modified 1mo ago