EthereumCommonwealth / Auditing

Ethereum Commonwealth Security Department conducted over 400 security audits since 2018. Not even a single contract that we audited was hacked. You can access our audit reports in the ISSUES of this repo. We are accepting new audit requests.
https://audits.callisto.network/
GNU General Public License v3.0
131 stars 34 forks source link

Seasonal Tokens #543

Closed seasonaltokens closed 3 years ago

seasonaltokens commented 3 years ago

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

seasonaltokens commented 3 years ago

Estimated payment in ETH was sent to the specified Treasury Address: 0x74682Fc32007aF0b6118F259cBe7bCCC21641600

txn hash: 0x15a9db821abe388953207cfa4858d12c14ddd64fac5ee1b16e4a0b0254eab447

yuriy77k commented 3 years ago

Seasonal Tokens Security Audit Report

1. Summary

Seasonal Tokens smart contract security audit report performed by Callisto Security Audit Department

2. In scope

Commit 0be82284de6484d5adee25f8f9eb8f38d725ecf6

2.1. Excluded

3. Findings

In total, 0 issues were reported, including:

In total, 3 notes were reported, including:

No critical security issues were found.

3.1. The constructor should not have onlyOwner modifier

Severity: note

Description

The 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).

Recommendation

Remove onlyOwner modifier and revert.

3.2. Duplicate functions

Severity: note

Description

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).

Recommendation

Remove functions getChallengeNumber() and getMiningTarget() or declare challengeNumber and miningTarget as private.

3.3. The totalSupply does not reflect the real total supply of tokens

Severity: note

Description

The 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).

Recommendation

Return in function totalSupply() the tokensMinted value instead of TOTAL_SUPPLY.

4. Security practices

5. Conclusion

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.

seasonaltokens commented 3 years ago

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

yuriy77k commented 3 years ago

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.

seasonaltokens commented 3 years ago

Perfect - thanks.

hsghnr commented 2 years ago

Thankyju