Totem - Smart Contract Audit Report
Summary
Totem Finance is a new project which aims to distribute NFTs and reward NFT holders via a transaction tax on the project's ERC20 token.
We audited Totem's token contract at 10732fc143aa7fb9771a4b0730b6834b92523ff3 on GitHub. It is deployed at 0xae95dC56a480ba3B1830cB760B43633D3f87Aa17 on the Ethereum Mainnet.The total supply of the token is 4,316,539, delivered to the team uponn deployment. As of the update date of this report, 60.5% of the tokens have been put up for presale on Unicrypt. 35% of the tokens have been locked by the team for 30 and 90 days. The team currently has control over 4.7% of the token's total supply. There is a 1% fee on all transfers of the token. This fee will be activated once there is at least one NFT holder. The fees collected from this mechanism are automatically redistributed among all NFT holders via a loop. This redistribution loop will increase in cost with each additional NFT holder. As only 100 NFTs can be minted, this may become expensive but will not exceed the block's gas limt. Logic has been implemented to ensure addresses are properly removed from the _totemOwners array in the NFT contract when their balance is 0. The project team is exempt from transfer fees. No ownership-restricted functions are present. Gas can be saved via marking some functions external instead of public; and by marking some variables constant. The tokens are ERC20 compliant and the NFTs are ERC721 compliant. Utilization of SafeMath across all contracts to prevent overflows.
Audit Findings Summary:
- No security issues from outside attackers were identified.
- As with any presale, ensure trust in the team prior to investing.
- KYC: No
- Date: March 29th, 2021
- Update Date: March 31st, 2021
External Threat Results
Vulnerability Category | Notes | Result |
---|---|---|
Arbitrary Storage Write | N/A | PASS |
Arbitrary Jump | N/A | PASS |
Delegate Call to Untrusted Contract | N/A | PASS |
Dependence on Predictable Variables | N/A | PASS |
Deprecated Opcodes | N/A | PASS |
Ether Thief | N/A | PASS |
Exceptions | N/A | PASS |
External Calls | N/A | PASS |
Integer Over/Underflow | N/A | PASS |
Multiple Sends | N/A | PASS |
Suicide | N/A | PASS |
State Change External Calls | N/A | PASS |
User Supplied Assertion | N/A | PASS |
Critical Solidity Compiler | N/A | PASS |
Overall Contract Safety | PASS |
Inheritence Chart
Functions Graph
Functions Overview
($) = payable function
# = non-constant function
Int = Internal
Ext = External
Pub = Public
+ Context
- [Int] _msgSender
- [Int] _msgData
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [Lib] SafeMath
- [Int] add
- [Int] sub
- [Int] sub
- [Int] mul
- [Int] div
- [Int] div
- [Int] mod
- [Int] mod
+ [Lib] Address
- [Int] isContract
- [Int] sendValue #
- [Int] functionCall #
- [Int] functionCall #
- [Int] functionCallWithValue #
- [Int] functionCallWithValue #
- [Int] functionStaticCall
- [Int] functionStaticCall
- [Prv] _verifyCallResult
+ Ownable (Context)
- [Int] #
- [Pub] owner
- [Pub] renounceOwnership #
- modifiers: onlyOwner
- [Pub] transferOwnership #
- modifiers: onlyOwner
+ [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] IERC721Metadata (IERC721)
- [Ext] name
- [Ext] symbol
- [Ext] tokenURI
+ [Int] IERC721Enumerable (IERC721)
- [Ext] totalSupply
- [Ext] tokenOfOwnerByIndex
- [Ext] tokenByIndex
+ [Int] IERC721Receiver
- [Ext] onERC721Received #
+ ERC165 (IERC165)
- [Int] #
- [Pub] supportsInterface
- [Int] _registerInterface #
+ [Lib] EnumerableSet
- [Prv] _add #
- [Prv] _remove #
- [Prv] _contains
- [Prv] _length
- [Prv] _at
- [Int] add #
- [Int] remove #
- [Int] contains
- [Int] length
- [Int] at
- [Int] add #
- [Int] remove #
- [Int] contains
- [Int] length
- [Int] at
- [Int] add #
- [Int] remove #
- [Int] contains
- [Int] length
- [Int] at
+ [Lib] EnumerableMap
- [Prv] _set #
- [Prv] _remove #
- [Prv] _contains
- [Prv] _length
- [Prv] _at
- [Prv] _get
- [Prv] _get
- [Int] set #
- [Int] remove #
- [Int] contains
- [Int] length
- [Int] at
- [Int] get
- [Int] get
+ [Lib] Strings
- [Int] toString
+ TotemNFT (Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable)
- [Pub] #
- [Pub] mint #
- [Int] _mintWithTokenURI #
- [Pub] totemOwnersNow
- [Pub] isTotemOwner
- [Pub] gettotemOwners
- [Pub] balanceOf
- [Pub] ownerOf
- [Pub] name
- [Pub] symbol
- [Pub] tokenURI
- [Pub] baseURI
- [Pub] tokenOfOwnerByIndex
- [Pub] totalSupply
- [Pub] tokenByIndex
- [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] _setTokenURI #
- [Int] _setBaseURI #
- [Prv] _checkOnERC721Received #
- [Prv] _approve #
- [Int] _beforeTokenTransfer #
+ TotemToken (Context, IERC20, Ownable)
- [Pub] #
- [Pub] name
- [Pub] symbol
- [Pub] decimals
- [Pub] balanceOf
- [Pub] totalSupply
- [Pub] transfer #
- [Pub] allowance
- [Pub] approve #
- [Pub] transferFrom #
- [Pub] increaseAllowance #
- [Pub] decreaseAllowance #
- [Pub] accountRewards
- [Pub] totalFees
- [Prv] _approve #
- [Prv] _transfer #
- [Prv] _developtransfer #
- [Prv] _transferStandard #
- [Prv] _distFeeinRef #
- [Prv] _getValues