Lossless Core Extension
Overview
The Lossless Core Extension is an extension designed for the Lossless WERC20 Extensible. It will allow the wrapped token to interact with the Lossless Core Protocol. Providing it all the features, reporting, staking and voting.
The extension has to be registered and set as Lossless Core Base for it to be applied. On deployment, in its constructor, all the required configurations will be set in order to properly function with the Lossless Controller.
Workflow
Variables
recoveryAdmin
recoveryAdmin
Type |
|
Visibility |
|
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
recoveryAdminCandidate
Type |
|
Visibility |
|
Description | This variable is used when proposing a new recovery admin. |
recoveryAdminCandidate
recoveryAdminCandidate
Type |
|
Visibility |
|
Description | Keyhash used to execute the recovery admin change. |
admin
admin
Type |
|
Visibility |
|
Description | Address of the admin. |
timelockPeriod
timelockPeriod
Type |
|
Visibility |
|
Description | Timeframe to wait to execute a lossless turnoff since proposal. |
losslessTurnOffTimestamp
losslessTurnOffTimestamp
Type |
|
Visibility |
|
Description | Timestamp of when lossless protection was turned off. |
isLosslessOn
isLosslessOn
Type |
|
Visibility |
|
Description | Determines if lossless protection is on. |
lossless
lossless
Type |
|
Visibility |
|
Description | Address of the lossless controller. |
protectedToken
protectedToken
Type |
|
Visibility |
|
Description | Address of the extensible wrapped token where the extension is being registered. |
Functions
transferOutBlacklistedFunds
transferOutBlacklistedFunds
Type | external |
Restrictions | Only called by Lossless Controller |
Parameters | address[] |
Returns | - |
Description | This function gets called only by the Lossless Controller when a report gets solved. The main objective is to transfer the stolen funds from a list of addresses back to the Lossless Contracts to be distributed once again to the rightful owner. |
setLosslessAdmin
setLosslessAdmin
Type | external |
Restrictions | Only called by Recovery Admin |
Parameters | address |
Returns | - |
Description | Sets a new admin of the contract. |
transferRecoveryAdminOwnership
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
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
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
executeLosslessTurnOff
Type | external |
Restrictions | Only called by Recovery Admin |
Parameters | - |
Returns | - |
Description | This function executes the lossless turnoff proposal. |
executeLosslessTurnOn
executeLosslessTurnOn
Type | external |
Restrictions | Only called by Recovery Admin |
Parameters | - |
Returns | - |
Description | This function instantly turns on lossless protection. |
setLosslessCoreExtension
setLosslessCoreExtension
Type | external |
Restrictions | Only called by Recovery Admin |
Parameters | Address |
Returns | - |
Description | This functions will register the Lossless Core Extension as the before transfer base and the Lossless Core base. |
extensionBeforeTransfer
extensionBeforeTransfer
Type | external |
Restrictions | - |
Parameters | address sender, address recipient, uint256 amount |
Returns | bool |
Description | Executes logic before a transfer takes place. |
extensionBeforeTransferFrom
extensionBeforeTransferFrom
Type | external |
Restrictions | - |
Parameters | address sender, address recipient, uint256 amount |
Returns | bool |
Description | Executes logic before a transferFrom takes place. |
Last updated