WokenExchange
Woken Exchange
  • 👋Welcome to Woken Exchange
  • Preface
    • 💡Birth of the idea
    • ⏮️Project genesis
  • Predefined Trading Hours?
    • 👷For Web3 Builders
    • 👨‍💼For Investors
    • 🏬For IRL companies
    • 🌍To boost the adoption
    • 🏢For Institutionals ?
    • ⚖️To seduce the States ?
  • Woken V1 : our solution
    • 🔬Overview
    • 🔃Swap open/closed
    • 🅿️Pool open/closed
    • ⏳Timekeeper
      • 🕓Settings Trading Hours
      • ⚙️Safety Tools
    • ✅Certified Projects
    • 👥DAO : vote
      • 🗳️Woken Protocol Votes
        • 📓How to submit and vote for the Woken Protocol?
      • ✅Woken Certified Projects : vote market
        • 📓How to submit and vote market?
      • ⚙️Snapshot API
  • PROTOCOL & Tokenomic
    • 🪙$WKN Woken DAO Token
    • 📊Tokenomic
    • 💲DAO Rewards
    • 🔁Fees
    • ⛓️Multi-chain
    • 🛣️Roadmap
  • Woken V2 : evolutions
    • 🚀Woken V2
  • Tools
    • 🤖Woken Timekeeper Events BOT
    • 🛡️Sample ERC20 protected by Timekeeper
  • Team
    • 👨‍💻Core Team and Contributors
  • Security
    • 🔐Audit & Verifications
    • 📔Contracts and wallets
  • FAQ
    • ❔Frequently Asked Questions
  • Media kit
    • 📸Logo
    • 📩Contact
  • Official Links
    • 🌐Links
  • Legal
    • Legal Disclaimer
Powered by GitBook
On this page
  1. Woken V1 : our solution
  2. Timekeeper

Safety Tools

For PairAdmin / PairAdminDao

PreviousSettings Trading HoursNextCertified Projects

Last updated 1 year ago

Disable timekeeper : If you no longer wish to use your Timekeeper, you can disable it and return to 24-7. The 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);
    }

⏳
⚙️
open/closed module
Safety Tools