Search…
⌃K
🚦

Protocol Configurations

⏳ Timelock

Timelock is a contract for delaying changes to the protocol. This contract is an owner of all the major contracts in Lucky Lion. Hence, every change needs to execute through this contract, which makes it function as a security moat.
In essence, every order from the admin(the group of core developers) has to pass through this contract and is delayed for 7 days (168 hours) before taking effect. To be specific, the execution command for the order goes to the queue, waiting to be executed when the 7 days (168 hours) delay is passed. This is a security feature that enables the community to see any upcoming updates and prepare in advance for them. If anything looks suspicious, they can pull their funds from the protocol before the update takes effect.
Below are the contracts owned by Timelock
  • Masterchef Contracts

🎚️ Adjustable Parameters

This section lists all adjustable parameters and functions in Lucky Lion

Masterchef Contract

  • add(allocPoint, lpToken, harvestIntervalInMinutes, farmStartIntervalInMinutes): add a new LP token pool to the Masterchef
    • allocPoint = the allocation point of the pool which will receive the Lucky rewards proportional to the other pools
    • lpToken = the address of the LP token
    • harvestIntervalInMinutes = the time interval in minutes when user can harvest their reward since the the current block timestamp of this function executed
    • farmStartIntervalInMinutes = the time interval in minutes when user can start depositing into the farm since the current block timestamp of this function executed
  • set(pid, allocPoint, harvestIntervalInMinutes, farmStartIntervalInMinutes): set the alloc point and harvest time stamp of the pool
    • pid = the pool ID of LP token
    • allocpoint = the allocation point of the pool which will receive the Lucky rewards proportional to the other pools
    • harvestIntervalInMinutes = the time interval in minutes when user can harvest their reward since the the current block timestamp of this function executed
    • farmStartIntervalInMinutes = the time interval in minutes when user can starting depositing into the farm since the the current block time stamp of this function executed
  • setMigrator(migrator) : set the migrator contract to be used in LP migration
    • migrator = contract address of the migrator (applicable only when the platform migrate the pool which is a very rare case)
  • setDevAddress(devAddress): set developer address to receive the fee
    • devAddress = the address that platform choose to pay the reward to the developer
  • transferLuckyOwnership(newOwnerAddress): transfer Lucky's ownership to another Masterchef in case of the old Masterchef need an upgrade
    • newOwnerAddress = the Masterchef's new address
  • updateLuckyPerBlock(luckyPerblock): update LuckyPerBlock parameter
    • luckyPerblock = the amount of lucky minted per BSC running block in wei unit

Timelock Contract

  • setPendingAdmin(adminAddress): set the next admin
    • adminAddress = the next admin timelock's contract address
  • acceptAdmin(): accept the admin
  • setDelay(newdelay): set the delay of timelock
    • newdelay = the delay time in second before execute any transactions
  • queueTransaction(target, value, signature, data, eta)
    : send any transaction in queue
    • target = the contract address where the transaction will be sent to
    • value = the BNB value sent to that transaction (normally 0)
    • signature = the function name and its parameter that timelock contract will call to
    • data = the data input to be sent to the function in ABI hex form
    • eta = the execution time of that function in unix time stamp which has to exceed the delay
  • execute transaction(target, value, signature, data, eta): execute the transaction that is already in the queue
    • target = the contract address where the transaction will be sent to
    • value = the BNB value sent to that transaction (normally 0)
    • signature = the function name and its parameter that timelock contract will call to
    • data = the data input to be sent to the function in ABI hex form
    • eta = the execution time of that function in unix time stamp which has to exceed the delay
  • cancelTransaction(target, value, signature, data, eta): cancel the transaction in the queue
    • target = the contract address where the transaction will be sent to
    • value = the BNB value sent to that transaction (normally 0)
    • signature = the function name and its parameter that timelock contract will call to
    • data = the data input to be sent to the function in ABI hex form
    • eta = the execution time of that function in unix time stamp which has to exceed the delay