> 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/technical-reference/wrapped-tokens/lossless-wrapped-protection/lossless-wrapped-erc20-ownable.md).

# Lossless Wrapped ERC20 Ownable

## Overview <a href="#overview" id="overview"></a>

The [Lossless Wrapped ERC20 Ownable ](https://github.com/Lossless-Cash/wrapped-lossless-erc20/blob/master/src/LosslessWrappedERC20Ownable.sol)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 [Lossless Wrapped ERC20 Ownable](https://lossless.atlassian.net/wiki/spaces/LOSSLESSCO/pages/254443532) 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 <a href="#workflow" id="workflow"></a>

<figure><img src="/files/KZ6gRRAvtVqb0k7dwtHq" alt=""><figcaption></figcaption></figure>

## Variables <a href="#variables" id="variables"></a>

#### `recoveryAdmin` <a href="#recoveryadmin" id="recoveryadmin"></a>

| 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` <a href="#recoveryadmincandidate" id="recoveryadmincandidate"></a>

| Type        | `address`                                                  |
| ----------- | ---------------------------------------------------------- |
| Visibility  | `public`                                                   |
| Description | This variable is used when proposing a new recovery admin. |

#### `admin` <a href="#admin" id="admin"></a>

| Type        | `address`             |
| ----------- | --------------------- |
| Visibility  | `public`              |
| Description | Address of the admin. |

#### `timelockPeriod` <a href="#timelockperiod" id="timelockperiod"></a>

| Type        | `uint256`                                                       |
| ----------- | --------------------------------------------------------------- |
| Visibility  | `public`                                                        |
| Description | Timeframe to wait to execute a lossless turnoff since proposal. |

#### `losslessTurnOffTimestamp` <a href="#losslessturnofftimestamp" id="losslessturnofftimestamp"></a>

| Type        | `uint256`                                             |
| ----------- | ----------------------------------------------------- |
| Visibility  | `public`                                              |
| Description | Timestamp of when lossless protection was turned off. |

&#x20;

#### Functions <a href="#functions" id="functions"></a>

#### `setLosslessAdmin` <a href="#setlosslessadmin" id="setlosslessadmin"></a>

| Type         | external                          |
| ------------ | --------------------------------- |
| Restrictions | Only called by Recovery Admin     |
| Parameters   | address                           |
| Returns      | -                                 |
| Description  | Sets a new admin of the contract. |

#### `transferRecoveryAdminOwnership` <a href="#transferrecoveryadminownership" id="transferrecoveryadminownership"></a>

| Type         | external                                                                                                                                                                           |
| ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Restrictions | Only called by Recovery Admin                                                                                                                                                      |
| Parameters   | <p>address</p><p>bytes32</p>                                                                                                                                                       |
| 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` <a href="#acceptrecoveryadminownership" id="acceptrecoveryadminownership"></a>

| 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` <a href="#proposelosslessturnoff" id="proposelosslessturnoff"></a>

| 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` <a href="#executelosslessturnoff" id="executelosslessturnoff"></a>

| Type         | external                                              |
| ------------ | ----------------------------------------------------- |
| Restrictions | Only called by Recovery Admin                         |
| Parameters   | -                                                     |
| Returns      | -                                                     |
| Description  | This function executes the lossless turnoff proposal. |

#### `executeLosslessTurnOn` <a href="#executelosslessturnon" id="executelosslessturnon"></a>

| Type         | external                                              |
| ------------ | ----------------------------------------------------- |
| Restrictions | Only called by Recovery Admin                         |
| Parameters   | -                                                     |
| Returns      | -                                                     |
| Description  | This function instantly turns on lossless protection. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.lossless.io/protocol/technical-reference/wrapped-tokens/lossless-wrapped-protection/lossless-wrapped-erc20-ownable.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
