Smart Contract Audit Report
Peepcoin is building a bidding and distributing platform for their new NFT.
For this audit, we reviewed the project team's MultiSigWallet and Peepcoin contracts at commit 4fb95fe3b27b73d1233646d1dfa6990047c74f2d on the team's private GitHub repository.
Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
Date: March 28th, 2022.
Finding #1 - Peepcoin - LowDescription: The safeMint() function does not account for the batch being minted when checking total supply against maximum supply.Risk/Impact: if _batchSize is not a factor of _maxSupply, _maxSupply can be exceeded.
require(_maxSuply > totalSupply());
Recommendation: The safeMint() function should be modified to account for the number of NFTs being minted when checking the total supply.Resolution: The team has not yet addressed this issue.
require(_maxSuply >= totalSupply() + _batchSize);
Finding #2 - MultiSigWallet/Peepcoin - InformationalDescription: Several functions are declared public, but are never called internally.Recommendation: These functions should be declared external for additional gas savings on each call.
MultiSigWallet.depositEth(), MultiSigWallet.withdraw(), MultiSigWallet.withdrawToOwner(), MultiSigWallet.withdrawToOwnerByAmount(), MultiSigWallet.getDepositAmount, MultiSigWallet.getBalance(), Peepcoin.safeMin(), Peepcoin.batchSize(), Peepcoin.setBaseURI(), Peepcoin.approveUsers(), Peepcoin.setBatchURI()
- As the contracts are implemented with Solidity v0.8.10, they are safe from any possible overflows/underflows.
- This contract functions as a bidding platform that allows users to deposit ETH while keeping track of their total deposit.
- Users' contributions can only be discerned by querying the blockchain's state or by tracking emitted events. Therefore, the team must be trusted to distribute the NFTs manually and in line with users' contributions.
- ETH must be deposited in amounts divisible by 0.05.
- The Owner can return deposited ETH to users at any time. Users cannot withdraw their own ETH.
- The Owner can withdraw any amount of ETH from the contract at any time.
- This contract is used to facilitate the distribution of peepcoin NFTs.
- NFTs are minted to the Owner in batches and can then be transferred to users.
- The batch size and maximum supply are set on deployment and cannot be changed.
- The token URI associated with each NFT is determined using the NFT's batch number and token ID.
- The Owner can transfer tokens to and from any address at any time.
- The Owner can mint new batchtes of NFTs at any time.
- The Owner can change the base and batch URI values at any time.
- This contract complies with the ERC721 standard.
|Arbitrary Jump/Storage Write||N/A||PASS|
|Centralization of Control||WARNING|
|Delegate Call to Untrusted Contract||N/A||PASS|
|Dependence on Predictable Variables||N/A||PASS|
|Improper Authorization Scheme||N/A||PASS|
|Outdated Compiler Version||N/A||PASS|
|Overall Contract Safety||WARNING|
($) = payable function # = non-constant function Int = Internal Ext = External Pub = Public + Context - [Int] _msgSender - [Int] _msgData + Ownable (Context) - [Pub]
# - [Pub] owner - [Pub] renounceOwnership # - modifiers: onlyOwner - [Pub] transferOwnership # - modifiers: onlyOwner - [Int] _transferOwnership # + MultiSigWallet (Ownable) - [Pub] # - [Pub] depositEth ($) - modifiers: invalidDepositAmount - [Pub] withdraw # - modifiers: onlyOwner,insufficientBalance - [Pub] withdrawToOwnerByAmount # - modifiers: onlyOwner - [Pub] withdrawToOwner # - modifiers: onlyOwner - [Pub] getDepositAmount - [Pub] getBalance
($) = payable function # = non-constant function Int = Internal Ext = External Pub = Public + [Int] IERC165 - [Ext] supportsInterface + [Int] IERC721 (IERC165) - [Ext] balanceOf - [Ext] ownerOf - [Ext] safeTransferFrom # - [Ext] transferFrom # - [Ext] approve # - [Ext] getApproved - [Ext] setApprovalForAll # - [Ext] isApprovedForAll - [Ext] safeTransferFrom # + [Int] IERC721Receiver - [Ext] onERC721Received # + [Int] IERC721Metadata (IERC721) - [Ext] name - [Ext] symbol - [Ext] tokenURI + [Lib] Address - [Int] isContract - [Int] sendValue # - [Int] functionCall # - [Int] functionCall # - [Int] functionCallWithValue # - [Int] functionCallWithValue # - [Int] functionStaticCall - [Int] functionStaticCall - [Int] functionDelegateCall # - [Int] functionDelegateCall # - [Int] verifyCallResult + Context - [Int] _msgSender - [Int] _msgData + [Lib] Strings - [Int] toString - [Int] toHexString - [Int] toHexString + ERC165 (IERC165) - [Pub] supportsInterface + ERC721 (Context, ERC165, IERC721, IERC721Metadata) - [Pub]
# - [Pub] supportsInterface - [Pub] balanceOf - [Pub] ownerOf - [Pub] name - [Pub] symbol - [Pub] tokenURI - [Int] _baseURI - [Pub] approve # - [Pub] getApproved - [Pub] setApprovalForAll # - [Pub] isApprovedForAll - [Pub] transferFrom # - [Pub] safeTransferFrom # - [Pub] safeTransferFrom # - [Int] _safeTransfer # - [Int] _exists - [Int] _isApprovedOrOwner - [Int] _safeMint # - [Int] _safeMint # - [Int] _mint # - [Int] _burn # - [Int] _transfer # - [Int] _approve # - [Int] _setApprovalForAll # - [Prv] _checkOnERC721Received # - [Int] _beforeTokenTransfer # - [Int] _afterTokenTransfer # + Ownable (Context) - [Pub] # - [Pub] owner - [Pub] renounceOwnership # - modifiers: onlyOwner - [Pub] transferOwnership # - modifiers: onlyOwner - [Int] _transferOwnership # + ERC721A (Context, ERC165, IERC721, IERC721Metadata) - [Pub] # - [Int] _startTokenId - [Pub] totalSupply - [Int] _totalMinted - [Pub] supportsInterface - [Pub] balanceOf - [Int] _numberMinted - [Int] _numberBurned - [Int] _getAux - [Int] _setAux # - [Int] _ownershipOf - [Pub] ownerOf - [Pub] name - [Pub] symbol - [Pub] tokenURI - [Int] _baseURI - [Pub] approve # - [Pub] getApproved - [Pub] setApprovalForAll # - [Pub] isApprovedForAll - [Pub] transferFrom # - [Pub] safeTransferFrom # - [Pub] safeTransferFrom # - [Int] _exists - [Int] _safeMint # - [Int] _safeMint # - [Int] _mint # - [Prv] _transfer # - [Int] _burn # - [Int] _burn # - [Prv] _approve # - [Prv] _checkContractOnERC721Received # - [Int] _beforeTokenTransfers # - [Int] _afterTokenTransfers # + Peepcoin (ERC721A, Ownable) - [Pub] # - modifiers: ERC721A - [Pub] safeMint # - modifiers: onlyOwner - [Pub] tokenURI - [Pub] batchSize - [Pub] setBaseURI # - modifiers: onlyOwner - [Pub] approveUsers # - modifiers: onlyOwner - [Prv] _tokenURI - [Pub] setBatchURI # - modifiers: onlyOwner
About Solidity Finance
Solidity Finance was founded in 2020 and quickly grew to have one of the most experienced and well-equipped smart contract auditing teams in the industry. Our team has conducted 1000+ solidity smart contract audits covering all major project types and protocols, securing a total of over $10 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 Solidity Audit?
Typically, a smart contract audit is a comprehensive review process designed to discover logical errors, security vulnerabilities, and optimization opportunities within code. A Solidity 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.