Akylles NFT

Smart Contract Audit Report

Audit Summary

Akylles is a new NFT collection with a presale and public sale format.

For this audit, we reviewed the AKYLLESXT contract at commit 66bd0df2782f18cdec64a09e5d831449 on the team's Github Gist.

Audit Findings

Please ensure trust in the team prior to investing as they have some control in the ecosystem.
Date: February 24th, 2022.
Updated: March 9th, 2022, to address changes made to the contract.

Finding #1 - AKYLLESXT - High (Resolved)

Description: The maximum transaction amount and wallet amount limitations are not enforced within the _purchase() function or _bulkpurchase() function for public sale purchases.
Risk/Impact: Users can surpass the 100 NFT wallet maximum using either the _purchase() function or the _bulkPurchase() function. Users can also purchase more than 100 NFTs per transaction using the _bulkpurchase() function during the public sale until the maximum supply is reached.
Recommendation: The _purchase() and _bulkpurchase() functions should include logic to confirm that the maximum transaction and wallet amount limitations are met by all purchases.
Resolution: The team has removed transaction and wallet amount limits for the public sale.

Finding #2 - AKYLLESXT - High (Resolved)

Description: If a user's current wallet amount is not equal to the maximum wallet amount, they can purchase the maximum transaction amount of NFTS allowing them to surpass the phase 2 maximum wallet limit.
Risk/Impact: Users with 1 or 2 NFTs can choose to mint the maximum transaction amount of 3 during phase 2 of the presale which would allow them to surpass the maximum wallet amount.
Recommendation: The total of the mint amount and the user's wallet amount should be required to be less than the current phase's maximum wallet amount. An example is provided below.
 require(purchaseTxs[msg.sender] + amount <= maxperaddress);
Resolution: The purchase amount is added to the user's current wallet amount when being compared to the maximum wallet amount.

Contract Overview

  • The AKYLLESXT contract is used to facilitate a presale and public sale for the Akylles NFTs.
  • The maximum total supply of Ayklles NFTs is 4,444.
  • While the presale is active, eligible users can each purchase 1 NFT for a price of 0.1 ETH until a threshold of 500 purchases is reached.
  • Presale users can purchase up to 3 NFTs total, each for a price of 0.2 ETH once the 2nd phase of the presale is triggered by presale purchases reaching 500.
  • The contract uses an off-chain generated Merkle tree provided by the owner to store and verify addresses that are eligible to mint during the presale.
  • When the public sale is active, users can each purchase any amount of NFTs for 0.3 ETH until the maximum total supply is reached; there is no threshold to enable the public sale so it must be activated by the team.
  • The contract will only accept the correct amount of ETH that is required for the specified amount of NFTs to be purchased.
  • On deployment, the team delegates amounts of shares to any amount of addresses that can be used to claim a portion of the total ETH within the contract.
  • The amount of ETH per share is dependent on the contract's total ETH balance and the total amount of shares.
  • The team should use caution when deploying as redeeming shares for ETH is the only method of withdrawing ETH from the contract.
  • The base URI value is set on deployment but is not meant to be the final base URI. This is intended so that users will not know which Akylles NFT they have received until the true base URI is "revealed".

  • The owner can transfer ownership at any time.
  • The owner can mint NFTs to any address at any time as long as the maximum supply has not been reached.
  • The owner can toggle the presale and public sale at any time.
  • The owner can enable the 2nd phase of the presale at any time but cannot disable it.
  • The owner can set the purchase price to any amount at any time.
  • The owner can change the maximum NFT purchase amount at any time.
  • The owner can reveal the token URIs at any time.
  • The owner can set the root of the Merkle tree at any time, effectively controlling the presale whitelist.
  • The owner can set the provenance hash at any time.
  • The owner can lock the provenance hash and base URI at any time. Once locked they cannot be changed or unlocked.
  • In the event that the address receiving an Akylles NFT is a contract, the contract must have implemented the onERC1155Received() function in order to successfully receive the NFT.
  • The contract complies with the ERC-1155 Multi-token standard.
  • As the contract is developed with Solidity 0.8.x, it is protected from overflow/underflow attacks.

Audit Results

Vulnerability CategoryNotesResult
Arbitrary Jump/Storage WriteN/APASS
Centralization of ControlThe owner can mint any amount of NFTs to any address until the maximum supply is reached.WARNING
Compiler IssuesN/APASS
Delegate Call to Untrusted ContractN/APASS
Dependence on Predictable VariablesN/APASS
Ether/Token TheftN/APASS
Flash LoansN/APASS
Front RunningN/APASS
Improper EventsN/APASS
Improper Authorization SchemeN/APASS
Integer Over/UnderflowN/APASS
Logical IssuesN/APASS
Oracle IssuesN/APASS
Outdated Compiler VersionN/APASS
Race ConditionsN/APASS
ReentrancyN/APASS
Signature IssuesN/APASS
Unbounded LoopsN/APASS
Unused CodeN/APASS
Overall Contract Safety PASS

Inheritance Chart

Smart Contract Audit - Inheritance

Function Graph

Smart Contract Audit - Graph

Functions Overview


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public

 + [Lib] SafeMath 
    - [Int] tryAdd
    - [Int] trySub
    - [Int] tryMul
    - [Int] tryDiv
    - [Int] tryMod
    - [Int] add
    - [Int] sub
    - [Int] mul
    - [Int] div
    - [Int] mod
    - [Int] sub
    - [Int] div
    - [Int] mod

 + [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

 +  PaymentSplitter (Context)
    - [Pub]  ($)
    - [Pub] shares
    - [Pub] release #
    - [Int] _addPayee #

 +  Pausable (Context)
    - [Pub]  #
    - [Pub] paused
    - [Int] _pause #
       - modifiers: whenNotPaused
    - [Int] _unpause #
       - modifiers: whenPaused

 +  Ownable (Context)
    - [Pub]  #
    - [Pub] owner
    - [Pub] renounceOwnership #
       - modifiers: onlyOwner
    - [Pub] transferOwnership #
       - modifiers: onlyOwner
    - [Int] _transferOwnership #

 + [Lib] Strings 
    - [Int] toString
    - [Int] toHexString
    - [Int] toHexString

 + [Lib] MerkleProof 
    - [Int] verify
    - [Int] processProof

 + [Int] IERC165 
    - [Ext] supportsInterface

 +  ERC165 (IERC165)
    - [Pub] supportsInterface

 + [Int] IERC1155Receiver (IERC165)
    - [Ext] onERC1155Received #
    - [Ext] onERC1155BatchReceived #

 + [Int] IERC1155 (IERC165)
    - [Ext] balanceOf
    - [Ext] balanceOfBatch
    - [Ext] setApprovalForAll #
    - [Ext] isApprovedForAll
    - [Ext] safeTransferFrom #
    - [Ext] safeBatchTransferFrom #

 + [Int] IERC1155MetadataURI (IERC1155)
    - [Ext] uri

 +  ERC1155 (Context, ERC165, IERC1155, IERC1155MetadataURI)
    - [Pub]  #
    - [Pub] supportsInterface
    - [Pub] uri
    - [Pub] balanceOf
    - [Pub] balanceOfBatch
    - [Pub] setApprovalForAll #
    - [Pub] isApprovedForAll
    - [Pub] safeTransferFrom #
    - [Pub] safeBatchTransferFrom #
    - [Int] _safeTransferFrom #
    - [Int] _safeBatchTransferFrom #
    - [Int] _setURI #
    - [Int] _mint #
    - [Int] _mintBatch #
    - [Int] _burn #
    - [Int] _burnBatch #
    - [Int] _setApprovalForAll #
    - [Int] _beforeTokenTransfer #
    - [Prv] _doSafeTransferAcceptanceCheck #
    - [Prv] _doSafeBatchTransferAcceptanceCheck #
    - [Prv] _asSingletonArray

 +  ERC1155Burnable (ERC1155)
    - [Pub] burn #
    - [Pub] burnBatch #

 +  AbstractERC1155Factory (Pausable, ERC1155Burnable, Ownable)
    - [Ext] pause #
       - modifiers: onlyOwner
    - [Ext] unpause #
       - modifiers: onlyOwner
    - [Ext] setURI #
       - modifiers: onlyOwner
    - [Pub] name
    - [Pub] symbol

 + [Int] IERC721 (IERC165)
    - [Ext] balanceOf
    - [Ext] ownerOf
    - [Ext] safeTransferFrom #
    - [Ext] transferFrom #
    - [Ext] approve #
    - [Ext] getApproved
    - [Ext] setApprovalForAll #
    - [Ext] isApprovedForAll
    - [Ext] safeTransferFrom #

 + [Lib] Counters 
    - [Int] current
    - [Int] increment #
    - [Int] decrement #
    - [Int] reset #

 +  AKYLLESXT (AbstractERC1155Factory, PaymentSplitter)
    - [Pub]  #
       - modifiers: ERC1155,PaymentSplitter
    - [Pub] setwhitelistphase2E #
       - modifiers: onlyOwner
    - [Int] setwhitelistphase2 #
    - [Ext] setPhase4 #
       - modifiers: onlyOwner
    - [Ext] ownerOf
    - [Ext] setMerkleRoot #
       - modifiers: onlyOwner
    - [Ext] setProvenance #
       - modifiers: onlyOwner
    - [Ext] setPrice #
       - modifiers: onlyOwner
    - [Ext] freezemeta #
       - modifiers: onlyOwner
    - [Ext] editSaleRestrictions #
       - modifiers: onlyOwner
    - [Ext] setPresale #
       - modifiers: onlyOwner
    - [Ext] reveal #
       - modifiers: onlyOwner
    - [Ext] whitelistPreSale ($)
    - [Ext] purchase ($)
       - modifiers: whenNotPaused
    - [Prv] _purchase #
    - [Prv] _bulkpurchase #
    - [Ext] airdrop #
       - modifiers: onlyOwner
    - [Pub] release #
    - [Pub] uri

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 occuring 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.