Audit Report for ThunderBolt Project
Network: on-chain Binance Smart Chain
Telegram Group: https://t.me/ThunderBoltBurn
About Thunder Bult
ThunderBolt is a deflationary token with a positive rebase. Total of 156 cycles, each cycle has a TAX amount on buy/sell and send TXs. The tax starts at 5% and scales to 12% per cycle. The fee gradually increases as 1.275M tokens are burnt per cycle. The cycle concludes when it reaches a total of 1.275M tokens burnt. Upon that 50% of the total burnt is minted back to $BOLT holders. The cycle starts again at 5% tax.
Files In Scope
BEP’s 20’s Conformance
This test checks for BEP-20’s conformance.
• All the functions are present
• All the events are present
• Functions return the correct type
• Functions that must be view are view
• Events’ parameters are correctly indexed • The functions emit the events
• Derived contracts do not break the conformance
✅ Transfer Event
✅ Approve Event
The state variables transferredTokens, tokenBatchCount, MAX_SUPPLY, _gonsPerFragment, and _gonBalances, are never used in the contract.
Remove unused variables to save on storage.
There are many magic numbers in the code.
Magic numbers should be refactored with constant variables. It improves the readability of the code, and easier to maintain.
A function that affects the status of sensitive variables should emit an event. The function _setFeeStage sets the _BURN_FEE a variable which determines the amount of % that is burned in every transaction.
Our recommendation is to add events in critical parts of the contract, such as when the burn rate is changed, when the fee is collected, and the number of tokens that were burned in a transaction. Events are great for integrating with DApps in the future. We recommend considering emitting events when the state is changed.
Lack of events in the contract.
Events are important for the integration with blockchain explorers which are commonly used by non-technical investors(for example BSCSCAN). However, when a burn occurs, the amount of tokens the investor actually gets differs from the number of tokens that are shown in the explorers.
Our recommendation is to emit appropriate Transfer events when burning tokens and collecting fees. For example:
This fix should be applied to all _transfer* functions.
uint256 variables always greater than zero. burnFee type is uint256, burnFee >=0 will be always True.
Fix the incorrect comparison by changing the value type or the comparison. possible fix:
Contact for audits on Telegram: t.me/solid_1
Contact for audits on Twitter: https://twitter.com/solid_group_1