Comment on page
🔃
Swap open/closed
Stop & Start Swap
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.
WokenPair.sol
modifier tradingMustbeOpen() {
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 tradingMustbeOpen
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 is not Enabled : this pair is tradable 24-7
🔴

Timekeeper is enabled : market is closed for this pair
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.
🟢

Timekeeper is enabled : market is open for this pair
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 for this pair
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.