Prepared by:
HALBORN
Last Updated 04/26/2024
Date of Engagement by: May 10th, 2022 - May 10th, 2022
100% of all REPORTED Findings have been addressed
All findings
1
Critical
0
High
0
Medium
0
Low
0
Informational
1
\client engaged Halborn to conduct a security audit on their NFT multisend smart contract beginning on 2022-05-10 and ending on May 10th, 2022. The security assessment was scoped to the smart contract provided to the Halborn team.
The contract in scope was a simple contract with only one function which allowed to transfer multiple NFTs in one single call.
The team at Halborn was provided one week for the engagement and assigned a full-time security engineer to audit the security of the smart contract. The security engineer is a blockchain and smart-contract security expert with advanced penetration testing, smart-contract hacking, and deep knowledge of multiple blockchain protocols.
The purpose of this audit is to:
Ensure that smart contract functions operate as intended
Identify potential security issues with the smart contracts
Halborn perform different test cases to validate the functionality of the smart contract. These included trying to transfer NFTs not owned by the caller, as well as providing invalid data. The smart contract was found to function correctly and did not present any security vulnerabilities.
In summary, Halborn identified one security risk that stemmed from the use of an old Solidity pragma version. Halborn recommends that the contract is deployed using at least pragma 0.8.10. the Seascape team applied the fix.
Halborn performed a combination of manual and automated security testing to balance efficiency, timeliness, practicality, and accuracy regarding the scope of this audit. While manual testing is recommended to uncover flaws in logic, process, and implementation, automated testing techniques help enhance coverage of the bridge code and can quickly identify items that do not follow security best practices. The following phases and associated tools were used throughout the term of the audit:
Research into architecture and purpose
Smart contract manual code review and walkthrough
Graphing out functionality and contract logic/connectivity/functions (solgraph
)
Manual assessment of use and safety for the critical Solidity variables and functions in scope to identify any arithmetic related vulnerability classes
Manual testing by custom scripts
Static Analysis of security for scoped contract, and imported functions (Slither
)
Testnet deployment (Brownie
, Remix IDE
)
The assessment was scoped to the smart contract available in \href{https://github.com/blocklords/seascape-smartcontracts/blob/nft-marketplace/contracts/marketplace/multi-send/MultiSend.sol}{GitHub} with commit ID 2305e92b4b3e3531b3649de21a8e12de385fc8d9.
Critical
0
High
0
Medium
0
Low
0
Informational
1
Impact x Likelihood
HAL-01
Security analysis | Risk level | Remediation Date |
---|---|---|
UPGRADE TO AT LEAST PRAGMA 0.8.10 | Informational | Solved - 05/10/2022 |
// Informational
Gas optimizations and additional safety checks are available for free when using newer compiler versions and the optimizer.
The contract within scope made use of the pragma version 0.6.7
SOLVED: Seascape upgraded the pragma version to 0.8.13.
Halborn used automated testing techniques to enhance the coverage of certain areas of the scoped contracts. Among the tools used was Slither, a Solidity static analysis framework. After Halborn verified all the contracts in the repository and was able to compile them correctly into their abi and binary formats, Slither was run on the all-scoped contracts. This tool can statically verify mathematical relationships between Solidity variables to detect invalid or inconsistent usage of the contracts' APIs across the entire code-base.
MultiSend.sendNfts(uint256,address,address[],uint256[]) (contracts/multisend.sol#9-28) has external calls inside a loop: require(bool,string)(IERC721(nftAddresses[i]).ownerOf(nftIds[i]) == msg.sender,sender not owner of nft) (contracts/multisend.sol#21-22)
MultiSend.sendNfts(uint256,address,address[],uint256[]) (contracts/multisend.sol#9-28) has external calls inside a loop: IERC721(nftAddresses[i_scope_0]).safeTransferFrom(msg.sender,receiver,nftIds[i_scope_0]) (contracts/multisend.sol#25)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation/#calls-inside-a-loop
Different versions of Solidity is used:
- Version used: ['0.8.13', '^0.8.0']
- 0.8.13 (contracts/multisend.sol#1)
- ^0.8.0 (contracts/openzeppelin-contracts@4.5.0/contracts/token/ERC721/IERC721.sol#4)
- ^0.8.0 (contracts/openzeppelin-contracts@4.5.0/contracts/utils/introspection/IERC165.sol#4)
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#different-pragma-directives-are-used
Pragma version0.8.13 (contracts/multisend.sol#1) necessitates a version too recent to be trusted. Consider deploying with 0.6.12/0.7.6/0.8.7
Pragma version^0.8.0 (contracts/openzeppelin-contracts@4.5.0/contracts/token/ERC721/IERC721.sol#4) allows old versions
Pragma version^0.8.0 (contracts/openzeppelin-contracts@4.5.0/contracts/utils/introspection/IERC165.sol#4) allows old versions
solc-0.8.13 is not recommended for deployment
Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity
contracts/multisend.sol analyzed (3 contracts with 77 detectors), 7 result(s) found
All the findings are deemed to be false positives.
Halborn strongly recommends conducting a follow-up assessment of the project either within six months or immediately following any material changes to the codebase, whichever comes first. This approach is crucial for maintaining the project’s integrity and addressing potential vulnerabilities introduced by code modifications.
// Download the full report
* Use Google Chrome for best results
** Check "Background Graphics" in the print settings if needed