⚙️Safety Tools

For PairAdmin / PairAdminDao

Disable timekeeper : If you no longer wish to use your Timekeeper, you can disable it and return to 24-7. The open/closed module on the swap page will also indicate that your pair's timekeeper is no longer active.

function setEnable
WokenFactory.sol
function setEnable(address _pair, bool _enable) public isPairAdmin(_pair) {
        isTimekeeperEnabledLP[_pair] = _enable;
        emit TimekeeperEnable(_pair);

The timekeeper remembers your settings, so if you decide to reactivate it later, you'll find your old settings. Which you can, of course, change again if you wish.


Transfer Ownership : if you want to transfer the ownership of your Timekeeper to a new address.

function setPairAdmin
WokenFactory.sol
function setPairAdmin(address _addr, address _pair) public isPairAdmin(_pair){
        address temp = pairAdmin[_pair];
        pairAdmin[_pair] = _addr;
        emit PairAdminChanged(temp, _addr);
    }

If you transfer the Timekeeper ownership to a new address, you will no longer be able to edit it with the old one. Use with caution.


Security ForceOpen feature for DexAdmin

If a PairAdmin's wallet is hacked and the hacker decides to close his pair for lifetime, users' funds will be locked forever as the Timekeeper blocks the swap, burn, and mint functions.

ForceOpen acts as a safety valve if such a situation should arise.

If a pair is permanently closed due to a hack of PairAdmin's wallet, and if the situation has been verified (large-scale notification from the project community + verification of the admin's address from the backend), the DexAdmin has the possibility to force-open the pair, enabling users to recover their funds.

The ForceOpen feature has also a 48h timelock protection before getting activated by the DexAdmin.


//security option for DexAdmin to avoid closed pair for lifetime
    function setForceOpenTimelock(address _pair, bool _enable) public isDexAdmin {
        require (isTKEnabled(_pair), "Timekeeper is Disabled, market is already open");
        timelock[_pair] = block.timestamp + 172800; // 48h timelock
        isForceOpenTimelock[_pair] = _enable;
        emit ForceOpenTimelock(_pair, _enable);
    }

    function setForceOpen(address _pair) public isDexAdmin {
        require(block.timestamp >= timelock[_pair], "Timelock not yet expired");
        isForceOpen[_pair] = isForceOpenTimelock[_pair];
        emit ForceOpen(_pair);
    }

Last updated