Closed seasonaltokens closed 3 years ago
Estimated payment in ETH was sent to the specified Treasury Address: 0x74682Fc32007aF0b6118F259cBe7bCCC21641600
txn hash: 0x15a9db821abe388953207cfa4858d12c14ddd64fac5ee1b16e4a0b0254eab447
Seasonal Tokens smart contract security audit report performed by Callisto Security Audit Department
Commit 0be82284de6484d5adee25f8f9eb8f38d725ecf6
In total, 0 issues were reported, including:
0 high severity issues.
0 medium severity issues.
0 low severity issues.
In total, 3 notes were reported, including:
3 notes.
0 owner privileges.
No critical security issues were found.
onlyOwner
modifierThe constructor runs once on contract deployment, at the same time the deployer assigned as owner
. So onlyOwner
modifier has no sense in this case.
Also, revert contract deployment based on preset variable has no sense.
This applies to all contracts for Seasonal Tokens
(SpringToken
, SummerToken
, AutumnToken
, WinterToken
).
Remove onlyOwner
modifier and revert.
The functions getChallengeNumber() and getMiningTarget() returns value of appropriate variables.
But the variables challengeNumber and miningTarget declared as public
therefore compiler will automatically create the getter function for it.
This applies to all contracts for Seasonal Tokens
(SpringToken
, SummerToken
, AutumnToken
, WinterToken
).
Remove functions getChallengeNumber() and getMiningTarget() or declare challengeNumber and miningTarget as private
.
totalSupply
does not reflect the real total supply of tokensThe function totalSupply() returns constant TOTAL_SUPPLY that does not reflect real total amount of tokens.
This applies to all contracts for Seasonal Tokens
(SpringToken
, SummerToken
, AutumnToken
, WinterToken
).
Return in function totalSupply() the tokensMinted value instead of TOTAL_SUPPLY
.
CREATE (0xf0)
opcode is assigned following this scheme keccak256(rlp([sender, nonce]))
. Therefore you need to use the same address that was originally used at the main chain to deploy the mock contract at a transaction with the nonce
that matches that on the original chain. Example: If you have deployed your main contract with address 0x010101 at your 2021th transaction then you need to increase your nonce of 0x010101 address to 2020 at the chain where your mock contract will be deployed. Then you can deploy your mock contract with your 2021th transaction, and it will receive the same address as your mainnet contract.The audited smart contract can be deployed. No security issues were found during the audit. Some notes were pointed to optimize gas usage.
It is recommended to adhere to the security practices described in pt. 4 of this report to ensure the contract's operability and prevent any issues that are not directly related to the code of this smart contract.
Many thanks for your hard work.
Regarding note 3.2, getMiningTarget() and getChallengeNumber() are part of the ERC918 interface and are needed for compatibility with existing mining software: https://eips.ethereum.org/EIPS/eip-918
Many thanks for your hard work.
Regarding note 3.2, getMiningTarget() and getChallengeNumber() are part of the ERC918 interface and are needed for compatibility with existing mining software: https://eips.ethereum.org/EIPS/eip-918
In this case, you may declare challengeNumber
and miningTarget
as private
to avoid duplicate functions.
Perfect - thanks.
Thankyju
Audit request
There are four proof-of-work mineable ERC-20 tokens. Each token halves its rate of production every 3 years. The interval between the halving of each token and the next is 9 months. The mining rewards can be batched to reduce gas costs.
Source code
https://github.com/seasonaltokens/seasonaltokens
commit: 0be82284de6484d5adee25f8f9eb8f38d725ecf6
Disclosure policy
Standard disclosure policy is fine.
Contact information (optional)
admin at seasonaltokens.org
Platform
ETH