Lossless Protocol
  • Lossless Whitepaper
  • FAQ
  • Technical reference
    • LERC20
      • Audits
    • Vault and Treasury Protection
      • LosslessControllerV2
      • LosslessGuardian
      • StrategyBase
      • TreasuryProtectionStrategy
      • LiquidityProtectionSingleLimitStrategy
      • Deployments
      • Audits
    • Hack Mitigation Protocol
      • Overview
      • How it works
      • Configuration
        • Current Configuration
      • Audits
      • Deployments
      • Smart Contracts
        • Lossless Controller V3
        • Lossless Governance
        • Lossless Reporting
        • Lossless Staking
    • Lossless Controller
      • Deployments
    • Wrapped Tokens
      • Lossless Wrapped Protection
        • Lossless Wrapped ERC20
        • Lossless Wrapped ERC20 Ownable
      • Extensible Wrapped Tokens
        • Lossless Wrapped ERC20 Extensible
        • Lossless Extensions Core
        • Extensions
          • Lossless Core Extension
      • UMA Protocol Integration
        • DAO Voting
      • Kleros Integration
      • Deployments
  • Guides
    • Wrapped Tokens
    • Committee Voting
    • Lossless Vault Protection User Guide
    • How To Use Vault Protection Smart Contracts
    • Lossless Integration Into The Token
      • Custom Token
      • Standard Token
Powered by GitBook
On this page
  • Overview
  • Workflow
  • Variables

Was this helpful?

  1. Technical reference
  2. Wrapped Tokens
  3. Lossless Wrapped Protection

Lossless Wrapped ERC20 Ownable

PreviousLossless Wrapped ERC20NextExtensible Wrapped Tokens

Last updated 2 years ago

Was this helpful?

Overview

The smart contract is one of the types of wrapping protections a protocol is able to choose.

By default it has all the related protection for the Lossless Core Protocol, allowing any protocol to protect their tokens without the need of relaunching. Once the contract is deployed any user has the ability to swap and lock the original token for a wrapped version of it.

Over the wrapped tokens, any user is able to generate reports, stake on said reports, and the report be voted by Lossless and the Committee.

This smart contracts inherits all the functions and logic from and extends it’s functionality with the ability to have an admin and recovery admin. These two roles are able to trigger specific functions in order to set new parameters on specific workflows.

Workflow

Variables

recoveryAdmin

Type

address

Visibility

public

Description

Address of the recovery admin. The recovery admin has the power to execute a set of functions in order to not lose ownership of a contract.

recoveryAdminCandidate

Type

address

Visibility

public

Description

This variable is used when proposing a new recovery admin.

admin

Type

address

Visibility

public

Description

Address of the admin.

timelockPeriod

Type

uint256

Visibility

public

Description

Timeframe to wait to execute a lossless turnoff since proposal.

losslessTurnOffTimestamp

Type

uint256

Visibility

public

Description

Timestamp of when lossless protection was turned off.

Functions

setLosslessAdmin

Type

external

Restrictions

Only called by Recovery Admin

Parameters

address

Returns

-

Description

Sets a new admin of the contract.

transferRecoveryAdminOwnership

Type

external

Restrictions

Only called by Recovery Admin

Parameters

address

bytes32

Returns

-

Description

This function allows transferring the recovery admin to another address. It’s a two step process where first an address is proposed, paired with a keyHash. And later on executed.

acceptRecoveryAdminOwnership

Type

external

Restrictions

Only called by the recovery admin candidate

Parameters

bytes

Returns

-

Description

This function finishes the recovery adminship transfer. The candidate has to accept the transfer with the correct keyHash.

proposeLosslessTurnOff

Type

external

Restrictions

Only called by Recovery Admin

Parameters

-

Returns

-

Description

This function allows to propose turning off lossless protection on the wrapped token. It’s a two step process where later on, after the timelock period, the turn off has to be executed.

executeLosslessTurnOff

Type

external

Restrictions

Only called by Recovery Admin

Parameters

-

Returns

-

Description

This function executes the lossless turnoff proposal.

executeLosslessTurnOn

Type

external

Restrictions

Only called by Recovery Admin

Parameters

-

Returns

-

Description

This function instantly turns on lossless protection.

Lossless Wrapped ERC20 Ownable
Lossless Wrapped ERC20 Ownable