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
  • Dynamic Open/Closed module
  • Timekeeper Disabled
  • Timekeeper Enabled
  • The module settings display
  • No Liquidity
  1. Woken V1 : our solution

Swap open/closed

Stop & Start Swap

PreviousOverviewNextPool open/closed

Last updated 1 year ago

Our Swap page lets you swap a Token A for a Token B.

Woken Exchange gives to Project owners/Builders (PairAdmin) the option of enabling their pair's Timekeeper (Token A + Token B) to customize trading hours (swap).

So, if the Timekeeper is enabled for a pair, swaps are only allowed if its market is open.

modifier tradingMustBeOpen
WokenPair.sol
modifier () { 
        if (_WokenFactory.isTKEnabled(address(this)) == true) {
            require(_WokenFactory.isTradingOpen(address(this)) == true, 'blocktime is outside trading hours' );
        }  
WokenPair.sol
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external lock 

Dynamic Open/Closed module

We have developed a dynamic "open/closed" module that listens our smart contracts to display 3 different states in real time on our interface: Timekeeper Disabled, Timekeeper Enabled, No Liquidity. This lets you know whether a pair is tradable or not.

Timekeeper Disabled

The module displays that the pair is tradable 24-7 : just like any AMM, you can swap Token A for Token B at any time.

Timekeeper Enabled


The module settings display

Timekeeper settings for a pair :

  • market opening days

  • market opening time

  • market closing time

  • UTC (timezone)

  • 24h/day is enabled: true or false When 24h/day is enabled (true), then the pair's settings no longer consider the specified hours (which become grayed out/inactive), but only the working days according to UTC.

    In the screenshot example above, the opening market for Pair WKN-WSDQ would then be, if the 24h/Day option has been enabled (true): Opening on Monday at 00:00 UTC +2 without interruption until closing on Thursday at 00:00 UTC+2. Then reopening on Friday at 00:00 UTC+2.

  • If the Force Open function has been enabled

The countdown is always there to alert you to the exact time before the market opens/closes.

No Liquidity

The UTC displayed for a pair represents its configuration on the blockchain and not your computer's configuration. The countdown is there to notify you about opening or closing trading time for a pair.

The module displays that the market for the pair is closed : you cannot swap Token A for Token B until the market opens, which will be done automatically on our interface. A countdown warns you of the time remaining before the market opens for this pair. The pair's settings (trading days and hours) are also displayed.

The module displays that the market for the pair is open : you can swap Token A for Token B until the market closes, which will be done automatically on our interface. A countdown warns you of the time remaining before the market closed for this pair. The pair's settings (trading days and times) are also displayed.

Swap impossible for a pair without liquidity

🔃
🔴
🟢
🔴
🟢
Timekeeper is not Enabled : this pair is tradable 24-7
Timekeeper is enabled : market is closed for this pair
Timekeeper is enabled : market is open for this pair
No liquidity for this pair