ApeIron - Audit 3

CertiKFiles named in the report

CertiK reviewed Apeiron (ApeIron - Audit 3) on 11 Oct 2022: 14 findings, 0 critical; 11 marked fixed, 2 acknowledged, 1 open.

No open critical findings
Open the reportOpen Apeiron’s security record

Report hosted on skynet.certik.com.

Trustblock does not review code.

Findings14

Statuses are the security firm’s own, from its report.

SeverityOpenAcknowledgedFixed
Critical000
High020
Medium002
Low109
MediumPotential Bypass of Blacklisted UsersFixed

The blacklist feature is designed to prevent the blacklisted users from listing NFT/ERC1155 tokens by validating the following **require** statement. ```solidity require( !blacklist.blacklistedNFT(msg.sender, address(_nftAddress), _nftId), "Nft is blacklisted" ); ``` However, this feature can be bypassed by using the `transferFrom()` function defined in `ERC721.sol` and `ERC1155.sol`. The blacklisted user could transfer NFT/ERC1155 tokens to another account and use that account to list NFTs instead.

MediumUninformed Users Can Buy Blacklisted NFTsFixed

If a NFT/ERC1155 token is blacklisted *after* being listed, then an uninformed user can still successfully purchase the blacklisted token.

LowComparison to Boolean ConstantFixed

Boolean constants can be used directly and do not need to be compared to `true` or `false`.

LowCorner Case Logic Issue in `Blacklist.sol`Fixed

The constant `ANY_TOKEN_ID` is equal to the max `uint256` value. Throughout the contract, `ANY_TOKEN_ID` is used to represent blacklisting *ALL* IDs for an NFT/ERC1155 address for a specific user. However, if a user genuinely owns the ID equal to the max `uint256` value of an NFT/ERC1155 address and that ID is blacklisted by `Blacklist.sol`, then the function `blacklistedNFT()` would mistakenly blacklist all the users other token IDs from also being listed on `MarketPlace.sol` and `MarketPlace1155.sol`. Therefore, blacklisting the ID equal to the max `uint256` value would also incorrectly blacklist all the other IDs for a user.

LowMissing Emit EventsFixed

There should always be events emitted in the sensitive functions that are controlled by centralization roles.

LowMissing Upper BoundFixed

In the current implementation, `platformFeePercent` can be set as much as 2^256-1. This can lead to a revert in functions `buyAuctionItem()` and `buyItem()` if `platformFeePercent` is set to be greater than `10000` because the logic during the `sellerRecieve` calculation attempts to subtract `platformFeePercent` from `percentMaxValue` (A constant set to value `10000`). ```solidity function buyItem(...){ ... uint256 sellerReceive = (targetPrice * (percentMaxValue - platformFeePercent)) / percentMaxValue; ... } ``` This situation will automatically revert due to arithmetic underflow in Solidity Versions `^0.8.0`. As a consequence, a revert in the functions `buyAuctionItem()` and `buyItem()` will prevent users from purchasing any listed NFT/ERC1155 tokens.

LowMissing Zero Address ValidationFixed

Addresses should be checked before assignment or external call to make sure they are not zero addresses. --- `_payoutWalletAddress` in contract `MarketPlace.sol` is not zero-checked before being used. ```solidity=200 payoutWalletAddress = _payoutWalletAddress; ``` --- `_payoutWalletAddress` in contract `MarketPlace1155.sol` is not zero-checked before being used. ```solidity=230 payoutWalletAddress = _payoutWalletAddress; ```

LowReturn Value Not HandledFixed

The return value of an external call is not stored in a local or state variable. In both linked locations the function `allowance()` is called, but its return value is never utilized. --- In contract `MarketPlace.sol`: ```solidity=214 token.allowance(msg.sender, address(this)); ``` --- In contract `MarketPlace1155.sol`: ```solidity=244 token.allowance(msg.sender, address(this)); ```

LowTautologyFixed

The linked statement compares a `uint256` variable to be less than or equal to 0. Since a unsigned integer cannot be less than 0, it is unnecessary to check if the variable is less than 0.

LowUnchecked ERC20 `transfer()`/`transferFrom()` CalFixed

The return value of the `transfer()`/`transferFrom()` calls is not checked. --- In contract `MarketPlace.sol`: ```solidity=368 token.transferFrom(msg.sender, listedItem.seller, sellerReceive); ``` ```solidity=369 token.transferFrom( msg.sender, payoutWalletAddress, payoutWalletReceive ); ``` --- In contract `MarketPlace1155.sol`: ```solidity=373 token.transferFrom(msg.sender, listedItem.seller, sellerReceive); ``` ```solidity=374 token.transferFrom( msg.sender, payoutWalletAddress, payoutWalletReceive ); ```

Show 1 more
LowUsers can List/Purchase Zero Tokens in Contract `Fixed

In contract `MarketPlace1155.sol`, the functions `listItem()` and `buyItem()` does not check if the amount of ERC1155 tokens being listed/purchased is greater than 0. A user may accidentally attempt to purchase 0 ERC1155 token in exchange for a non-zero amount of ERC20 tokens.

Contracts in scope

No deployed address is recorded for this audit.

The report names a repository or files. Open the report to see its scope.

Repository and files the report names (3)

  • contracts/Blacklist.sol
  • contracts/marketplace/MarketPlace.sol
  • contracts/marketplace/MarketPlace1155.sol

Part of Apeiron’s security record

Apeiron
Audits3 audits by 1 firmLast audit Nov 2022, by CertiK.
Critical findingsNo open critical findingsAcross 3 reports.
Open Apeiron’s security record

Security firm

CertiK

1,044 projects reviewed · 1,393 reports · latest May 2025

See CertiK’s audits

Something 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