SAFU
Last updated
Was this helpful?
Last updated
Was this helpful?
Timelock is a contract for delaying changes to the protocol. This contract is an owner of all the major contracts in PLAY Finance. 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 24 hours before taking effect. To be specific, the execution command for the order goes to the queue, waiting to be executed when the 24h 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
All Vault Contracts
FairLaunch Contract
Lottery Contract
PriceOracle Contracts
Config Contracts
SAFU Contracts
Proof of Transfer Ownership:
FairLaunch:
Lottery:
Config:
PriceOracle:
SAFU:
Vaults:
BTCB:
ETH:
BNB:
BUSD:
USDT:
ALPACA:
PLAY:
PLAY-BNB:
BUNNY:
CAKE:
PRIZE:
Time lock Parameters
Upgradable contract is a way to deploy smart contract; instead of deploying an actual code, you deploy a pointer to an address where actual code is located. Developers have the ability to change where the pointer points to so that the actual execution will come from a new “upgraded” code.
Pros:
It allows contracts to be changed if bugs or vulnerabilities are found so that the protocol can continue to function safely
Cons:
Bad actor can maliciously switch contracts and implement new functions / behavior that users did not expect — e.g., steal users’ fund
This means you need to be able to trust dev team!
Each time the contract is upgraded, the potential hacking risk increases and requires a new audit
The security of the contract is proportional to the period of not being hacked. (This means that the longer the period of not being hacked, the more secure the contract can be.)
However, for a contract that is continuously updated, even if the period of not being hacked increases, it cannot be judged that the contract is secure.
PLAY Finance believes in "SIMPLE IS THE BEST!"
The more complex the contract/system, the higher the chance of unexpected bugs. Conversely, the simpler the contract/system, the lower the probability of unexpected bugs.
PLAY Finance considers simplicity and security as a top priority when designing contracts/systems.
We design the I/O interface to be intuitive and predictable, reducing the scope for unexpected bugs. And by writing high-quality test code within the predictable scope, it prevents bugs from occurring in advance. (Details of the test code can be found below.)
Based on these development principles and contract/system design, PLAY Finance can be safe from vulnerability even without using upgradable contracts.
Most projects are designed to be configurable with user's fund-related logic. And a good dev team reduces rugpull risk by changing parameters based on timelock. However, users must check the timelock daily to protect their funds.
PLAY Finance is designed so that only game-related logic is configurable. This means that the logic related to the user's funds is designed to be non-configurable! From now on, users don't have to check the timelock every day to protect their funds!
Also, since there is no logic related to the user's funds, the user's funds are safe from oracle issues and flash-loan attacks!
In computer programming, unit testing is a software testing method by which individual units of source code—sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures—are tested to determine whether they are fit for use.
The short answer is to keep your funds safe!
As a fair launch project with no investors, getting our contracts audited is quite cost-prohibitive. While we took great care in testing our codes.
239 test cases
1493 assertions
Please note that the initial test cases and assertions of Alpaca Finance, which has excellent security among BSC's top players, are 72 and 300, respectively.
PLAY Finance operates SAFU Fund with PLAY JACKPOT. If security issue happens and user got damaged from it, PLAY Finance will compensate with this SAFU pool.
For more details in
For more details in
SAFU: