Timekeeper

For PairAdmin / PairAdminDao

When a project owner creates his liquidity pair on Woken, it is by default tradable 24-7, as on any AMM.

Timekeeper is an option that a Project Owner/Builder (PairAdmin) enable/disable if he wants to customize the trading hours of his pair on the DEX, according to his needs.

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

Once enabled*, he can switch from 24-7 to custom trading hours for his pair. Timekeeper management is facilitated by a dedicated, intuitive and easy-to-use interface.

When the PairAdmin enables his pair's Timekeeper for the very first time, the default settings is: open every day from Monday to Friday without interruption, closed from Saturday at 00:00 UTC 0 and Sunday before reopening the following Monday at 00:00 UTC 0 (24h/Day option enabled).

WokenFactory.sol
TimekeeperPerLp[pair]= pairTimekeeper(0, 0, 23, 59, [0,0,0,0,0,1,1], 0, true);


How Timekeeper works?

Timekeeper is the smart contract that controls the LPs trading hours.

Whenever a user initiates a transfer, LP will request the Timekeeper for the current trading status. The Timekeeper retrieves the actual time from the blockchain, computes the status of the transactions and sends it back.

Last updated