CertiK reviewed The Sandbox (Sandbox PR) on 26 Jan 2022: 5 findings, 0 critical; none marked fixed.
Report hosted on skynet.certik.com.
Trustblock does not review code.
Statuses are the security firm’s own, from its report.
| Severity | Open | Acknowledged | Fixed |
|---|---|---|---|
| Critical | 0 | 0 | 0 |
| High | 0 | 0 | 0 |
| Medium | 0 | 0 | 0 |
| Low | 5 | 0 | 0 |
In the current implementation, when the `LandSwap` contract is not in the pause condition, the `burn()` function allows everyone to burn `oldLand` tokens with given `ids`. The `LandSwap` contract receives `oldLand` tokens during the `swap()` invocation and those tokens are supposed to be burnt immediately. The concern is if those `_oldland` tokens are still valuable to some extent (f.e., causing market fluctuation), a user might call this function at a certain time for his own profit.
In `LandSwap.sol`, no checks are performed on input parameters to ensure that those are ones that are valid. In the `LandSwap` contract, in the `initialize()` function : - `admin` and `trustedForwarder` addresses should be non-zero addresses; - `oldLand` should not be the same address as `newLand`; - `admin` should not be the same address as `trustForwarder`.
The contract serves as the underlying entity to interact with the following third-party protocols. - `_oldLand` - `_newLand` - `trustedForwarder` The scope of the audit treats third-party entities as black boxes and assumes their functional correctness. However, in the real world, third parties can be compromised, which may lead to lost or stolen assets. For instance, if the `trustedForwarder` is initialized to a malicious address, it could cause unexpected errors during the land-swapping process.
The implementation of `_metaTransactionContracts[msg.sender]` is unknown. In the case that `metaTransaction` contracts are public and propose a `call()` feature, users could call a `metaTransaction` contract, having their call being forwarded to `ERC721BaseToken`. In this scenario, `msg.sender` received by `ERC721BaseToken` would be the address of `metaTransaction`, which would verify the condition `require(_metaTransactionContracts[msg.sender]`. If the check can be bypassed through this way, this would be problematic in the functions using this check: - `ERC721BaseToken`.`approveFor()`; - `ERC721BaseToken`.`_checkTransfer()`; - `ERC721BaseToken`.`_batchTransferFrom()`; - `ERC721BaseToken`.`setApprovalForAllFor()`; - `ERC721BaseToken`.`burnFrom()`. For example, ```solidity=301 function setApprovalForAllFor( address sender, address operator, bool approved ) external { require(sender != address(0), "Invalid sender address"); require( msg.sender == sender || _metaTransactionContracts[msg.sender] || _superOperators[msg.sender], "not authorized to approve for all" ); _setApprovalForAll(sender, operator, approved); } ``` The above function will successfully triggered if the caller is from meta transaction contract (i.e., `_metaTransactionContracts[msg.sender]` is `true`).
The `PausableWithAdmin` contract has an unlocked compiler version. An unlocked compiler version in the source code of the contract permits the user to compile it at or above a particular version. This, in turn, leads to differences in the generated bytecode between compilations due to differing compiler version numbers. This can lead to ambiguity when debugging as compiler-specific bugs may occur in the codebase that would be hard to identify over a span of multiple compiler versions rather than a specific one. Additionally, it has been noticed that all contracts are compiled with the compiler version over `0.5.2`, which dates from March 2019. It is recommended to update the compiler versions in the contracts, so they are not exposed to potential security issues related to old compiler versions.
The report names a repository or files. Open the report to see its scope.
Repository and files the report names (3)
1,044 projects reviewed · 1,375 reports · latest May 2025
See CertiK’s auditsSomething wrong on this page? A missing report, a wrong date, a finding that was fixed since. Tell us and we check it against its source.
Tell us