Wunder Token V1
Smart Contract Audit Report
Audit Summary
Wunderpar is a new ERC-20 token on Polygon.
For this audit, we reviewed the project team's WunderTokenV1 implementation contract at 0xc8ba1b2270017f73e9e9dc2a50779591d4177a8e and Proxy contract at 0x28eBFAF629A858D83550B4B8292C7995aF2E32aa on the Polygon Mainnet.
Audit Findings
No findings were identified, though centralized aspects are present.
Date: December 7th, 2023.
Updated: March 4th, 2024 to reflect the contract's mainnet address.
Contract Overview
- The total supply of the token is set to zero upon initialization.
- Any user granted the Minter role can mint any number of tokens to any address at any time.
- Any user granted the Minter role can mint any number of tokens to up to 256 addresses per transaction at any time.
- Any user granted the Burner role can burn their own tokens to reduce the total supply at any time.
- Any user granted the Burner role can burn tokens on another user's behalf up to their granted allowance at any time.
- Any user granted the Govern role can declare/undeclare any address as "frozen" at any time.
- Frozen addresses are prohibited from transferring their tokens.
- Any user granted the Govern role can transfer any frozen account's full token balance to the contract at any time.
- Any user granted the Govern role can withdraw any tokens from the contract at any time.
- Any user granted the Pauser role can pause/unpause the contract at any time. When paused, all transfers, minting, and burning are prohibited from occurring.
- Any user can transfer any number of tokens to up to 256 addresses per transaction at any time.
- As the contract is implemented with Solidity v0.8.x, it is safe from any possible overflows/underflows.
- The contract complies with the ERC-20 token standard.
Audit Results
Vulnerability Category | Notes | Result |
---|---|---|
Arbitrary Jump/Storage Write | N/A | PASS |
Centralization of Control |
|
WARNING |
Compiler Issues | N/A | PASS |
Delegate Call to Untrusted Contract | N/A | PASS |
Dependence on Predictable Variables | N/A | PASS |
Ether/Token Theft | N/A | PASS |
Flash Loans | N/A | PASS |
Front Running | N/A | PASS |
Improper Events | N/A | PASS |
Improper Authorization Scheme | N/A | PASS |
Integer Over/Underflow | N/A | PASS |
Logical Issues | N/A | PASS |
Oracle Issues | N/A | PASS |
Outdated Compiler Version | N/A | PASS |
Race Conditions | N/A | PASS |
Reentrancy | N/A | PASS |
Signature Issues | N/A | PASS |
Sybil Attack | N/A | PASS |
Unbounded Loops | N/A | PASS |
Unused Code | N/A | PASS |
Overall Contract Safety | PASS |
Inheritance Chart
Function Graph
Functions Overview
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [Int] IERC20Metadata (IERC20)
- [Ext] name
- [Ext] symbol
- [Ext] decimals
+ Initializable
- [Int] _checkInitializing
- [Int] _disableInitializers #
- [Int] _getInitializedVersion
- [Int] _isInitializing
- [Prv] _getInitializableStorage
+ ContextUpgradeable (Initializable)
- [Int] __Context_init #
- modifiers: onlyInitializing
- [Int] __Context_init_unchained #
- modifiers: onlyInitializing
- [Int] _msgSender
- [Int] _msgData
+ [Int] IERC20Errors
+ [Int] IERC721Errors
+ [Int] IERC1155Errors
+ ERC20Upgradeable (Initializable, ContextUpgradeable, IERC20, IERC20Metadata, IERC20Errors)
- [Prv] _getERC20Storage
- [Int] __ERC20_init #
- modifiers: onlyInitializing
- [Int] __ERC20_init_unchained #
- modifiers: onlyInitializing
- [Pub] name
- [Pub] symbol
- [Pub] decimals
- [Pub] totalSupply
- [Pub] balanceOf
- [Pub] transfer #
- [Pub] allowance
- [Pub] approve #
- [Pub] transferFrom #
- [Int] _transfer #
- [Int] _update #
- [Int] _mint #
- [Int] _burn #
- [Int] _approve #
- [Int] _approve #
- [Int] _spendAllowance #
+ ERC20BurnableUpgradeable (Initializable, ContextUpgradeable, ERC20Upgradeable)
- [Int] __ERC20Burnable_init #
- modifiers: onlyInitializing
- [Int] __ERC20Burnable_init_unchained #
- modifiers: onlyInitializing
- [Pub] burn #
- [Pub] burnFrom #
+ PausableUpgradeable (Initializable, ContextUpgradeable)
- [Prv] _getPausableStorage
- [Int] __Pausable_init #
- modifiers: onlyInitializing
- [Int] __Pausable_init_unchained #
- modifiers: onlyInitializing
- [Pub] paused
- [Int] _requireNotPaused
- [Int] _requirePaused
- [Int] _pause #
- modifiers: whenNotPaused
- [Int] _unpause #
- modifiers: whenPaused
+ ERC20PausableUpgradeable (Initializable, ERC20Upgradeable, PausableUpgradeable)
- [Int] __ERC20Pausable_init #
- modifiers: onlyInitializing
- [Int] __ERC20Pausable_init_unchained #
- modifiers: onlyInitializing
- [Int] _update #
- modifiers: whenNotPaused
+ [Int] IAccessControl
- [Ext] hasRole
- [Ext] getRoleAdmin
- [Ext] grantRole #
- [Ext] revokeRole #
- [Ext] renounceRole #
+ [Int] IERC165
- [Ext] supportsInterface
+ ERC165Upgradeable (Initializable, IERC165)
- [Int] __ERC165_init #
- modifiers: onlyInitializing
- [Int] __ERC165_init_unchained #
- modifiers: onlyInitializing
- [Pub] supportsInterface
+ AccessControlUpgradeable (Initializable, ContextUpgradeable, IAccessControl, ERC165Upgradeable)
- [Prv] _getAccessControlStorage
- [Int] __AccessControl_init #
- modifiers: onlyInitializing
- [Int] __AccessControl_init_unchained #
- modifiers: onlyInitializing
- [Pub] supportsInterface
- [Pub] hasRole
- [Int] _checkRole
- [Int] _checkRole
- [Pub] getRoleAdmin
- [Pub] grantRole #
- modifiers: onlyRole
- [Pub] revokeRole #
- modifiers: onlyRole
- [Pub] renounceRole #
- [Int] _setRoleAdmin #
- [Int] _grantRole #
- [Int] _revokeRole #
+ [Int] IERC1822Proxiable
- [Ext] proxiableUUID
+ [Int] IBeacon
- [Ext] implementation
+ [Lib] Address
- [Int] sendValue #
- [Int] functionCall #
- [Int] functionCallWithValue #
- [Int] functionStaticCall
- [Int] functionDelegateCall #
- [Int] verifyCallResultFromTarget
- [Int] verifyCallResult
- [Prv] _revert
+ [Lib] StorageSlot
- [Int] getAddressSlot
- [Int] getBooleanSlot
- [Int] getBytes32Slot
- [Int] getUint256Slot
- [Int] getStringSlot
- [Int] getStringSlot
- [Int] getBytesSlot
- [Int] getBytesSlot
+ [Lib] ERC1967Utils
- [Int] getImplementation
- [Prv] _setImplementation #
- [Int] upgradeToAndCall #
- [Int] getAdmin
- [Prv] _setAdmin #
- [Int] changeAdmin #
- [Int] getBeacon
- [Prv] _setBeacon #
- [Int] upgradeBeaconToAndCall #
- [Prv] _checkNonPayable #
+ UUPSUpgradeable (Initializable, IERC1822Proxiable)
- [Int] __UUPSUpgradeable_init #
- modifiers: onlyInitializing
- [Int] __UUPSUpgradeable_init_unchained #
- modifiers: onlyInitializing
- [Ext] proxiableUUID
- modifiers: notDelegated
- [Pub] upgradeToAndCall ($)
- modifiers: onlyProxy
- [Int] _checkProxy
- [Int] _checkNotDelegated
- [Int] _authorizeUpgrade #
- [Prv] _upgradeToAndCallUUPS #
+ WunderTokenV1 (Initializable, ERC20Upgradeable, ERC20BurnableUpgradeable, ERC20PausableUpgradeable, AccessControlUpgradeable, UUPSUpgradeable)
- [Pub] #
- [Pub] initialize #
- modifiers: initializer
- [Int] _update #
- modifiers: whenNotFrozen
- [Pub] burn #
- modifiers: onlyRole
- [Pub] burnFrom #
- modifiers: onlyRole
- [Pub] isFrozen
- [Pub] freeze #
- modifiers: onlyRole,whenNotFrozen
- [Pub] unfreeze #
- modifiers: onlyRole,whenFrozen
- [Pub] seize #
- modifiers: onlyRole,whenFrozen
- [Pub] withdraw #
- modifiers: onlyRole
- [Pub] mint #
- modifiers: onlyRole
- [Ext] batchMint #
- modifiers: onlyRole
- [Ext] batchTransfer #
- [Pub] pause #
- modifiers: onlyRole
- [Pub] unpause #
- modifiers: onlyRole
- [Int] _authorizeUpgrade #
- modifiers: onlyRole
About SourceHat
SourceHat has quickly grown to have one of the most experienced and well-equipped smart contract auditing teams in the industry. Our team has conducted 1800+ solidity smart contract audits covering all major project types and protocols, securing a total of over $50 billion U.S. dollars in on-chain value!
Our firm is well-reputed in the community and is trusted as a top smart contract auditing company for the review of solidity code, no matter how complex. Our team of experienced solidity smart contract auditors performs audits for tokens, NFTs, crowdsales, marketplaces, gambling games, financial protocols, and more!
Contact us today to get a free quote for a smart contract audit of your project!
What is a SourceHat Audit?
Typically, a smart contract audit is a comprehensive review process designed to discover logical errors, security vulnerabilities, and optimization opportunities within code. A SourceHat Audit takes this a step further by verifying economic logic to ensure the stability of smart contracts and highlighting privileged functionality to create a report that is easy to understand for developers and community members alike.
How Do I Interpret the Findings?
Each of our Findings will be labeled with a Severity level. We always recommend the team resolve High, Medium, and Low severity findings prior to deploying the code to the mainnet. Here is a breakdown on what each Severity level means for the project:
- High severity indicates that the issue puts a large number of users' funds at risk and has a high probability of exploitation, or the smart contract contains serious logical issues which can prevent the code from operating as intended.
- Medium severity issues are those which place at least some users' funds at risk and has a medium to high probability of exploitation.
- Low severity issues have a relatively minor risk association; these issues have a low probability of occurring or may have a minimal impact.
- Informational issues pose no immediate risk, but inform the project team of opportunities for gas optimizations and following smart contract security best practices.