Etherstones

Smart Contract Audit Report

Audit Summary

Etherstones Audit Report Etherstones is releasing a new ERC20 token with the ability to earn and compound rewards through Nodes.

For this audit, we reviewed the contracts folder at commit 5e3007431533653056de4d01edd4662d78d943dc on the team's private GitHub repository.

Audit Findings

Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
Date: March 21st, 2022.
Updated: March 22nd, 2022 to support changes from commit 0ba7e25d576e4e6c3c18073d6fa47034d3601aa9 to commit 5e3007431533653056de4d01edd4662d78d943dc.

Finding #1 - VaultDistributor - High (Resolved)

Description: Within the setShares() function, the user's shares are set to the amount value prior to the Deposit info being pushed, as a result the amount value in the shareholderDeposits mapping will always be 0.
shares[shareholder].amount = amount;
shares[shareholder].totalExcluded = getCumulativeDividends(shareholder) - unpaid; // carry unpaid over

shareholderDeposits[shareholder].push(Deposit({
	amount: (amount - shares[shareholder].amount),
	dividendPerShareSnapshot: dividendsPerShare
}));
Risk/Impact: A user's excludedAtUpdates amount will not be decremented when their shares are decreased within the setShare() function. This will prevent users from claiming rewards until they have accumulated past the incorrectly large previous excludedAtUpdates amount.
Recommendation: The difference between the user's initial share and their new share should be stored before their balance is set to maintain a proper record of the change in amounts.
Resolution: The team has implemented the solution described above.

Finding #2 - ETHSToken - High (Resolved)

Description: Users are minted the total amount in the vaultWithdrawTransfer() function, rather than the amount after fees.
Risk/Impact: Users will be able to inflate their ETHS balance through repeated calls to the vaultWithdrawTransfer() function.
Recommendation: The user should be minted amountWithdrawn number of tokens, and their localVault balance should be decremented by amount number of tokens.
Resolution: The team has implemented the solution described above.

Finding #3 - ETHSToken - Low (Resolved)

Description: The _burn() and _mint() function do not properly decrease the total supply or emit an event.
Risk/Impact: The ETHS tokenomics will become increasingly skewed on blockchain explorers over time.
Recommendation: Decrease the total supply by the amount being burned in the _burn() function and increase the total supply by the amount being minted in the _mint() function. Additionally, a Transfer event should be emitted to the 0x0 address on a burn and from the 0x0 address on a mint.
Resolution: The team has implemented the solution described above.

Finding #4 - ETHSToken - Low (Resolved)

Description: The _basicTransfer() function does not emit an event.
Risk/Impact: The ETHS tokenomics will become increasingly skewed on blockchain explorers over time.
Recommendation: A Transfer event should be in the _basicTransfer() function to ensure proper tokenomics.
Resolution: The team has implemented the solution described above.

Finding #5 - VaultDistributor - Informational (Resolved)

Description: The claimDividend() function does not properly restrict users' input when calling the function.
Recommendation: Restrict the users' input to only allow for valid parameters.
Resolution: The team has implemented the solution described above.

Finding #6 - ETHSToken - Informational (Resolved)

Description: The getCirculatingSupply() function is inaccurate.
Risk/Impact: The getCirculatingSupply() function will return very misleading tokenomics results to users regarding the actual amount of tokens that are burned/inaccessible.
Recommendation: The Reward Pool balance and totalLocked variable should not be deducted from the circulating supply as these tokens are not actually locked.
Resolution: The team has adjusted the getCirculatingSupply() function to return the current total balance - the Reward Pool balance.

Finding #7 - ETHSToken - Informational (Resolved)

Description: The isMaxWalletExempt mapping is never used within any of the contract's functionality.
Risk/Impact: There is dead code within the contract as well as unnecessary additional deployment costs.
Recommendation: The isMaxWalletExempt mapping should be implemented within the contract's functionality or safely be removed.

Contracts Overview

  • As the contracts are implemented with Solidity v0.8.11, they are safe from any possible overflows/underflows.
ETHSPresaleToken Contract:
  • Whitelisted users may use this contract to mint pETHS tokens.
  • Users may mint up to 1500 pETHS tokens per mint.
  • The minting cost is 80% of the amount of pETHS being minted in DAI.
  • All DAI collected from minting is transferred to the Liquidity Wallet address.
  • Once a user mints, they are removed from the whitelist.
  • The contract is paused upon deployment.
  • The owner may mint any amount of pETHS to any user at any time at no cost.
  • The owner may pause and unpause the contract, preventing mints, burns, and transfers, at any time.
  • The owner may update the ETHSPresaleCrystal address at any time.
ETHSPresaleCrystal Contract:
  • Whitelisted users may use this contract to mint pMAXCRYSTAL and pETHS tokens.
  • Users specify the amount of pETHS they would like to mint between 1000 and 1500.
  • The first 1000 pETHS are used to mint a pMAXCRYSTAL token.
  • The remaining pETHS are minted to the user.
  • The minting cost is 60% of the specified amount of pETHS in DAI.
  • All DAI collected from minting is transferred to the Liquidity Wallet address.
  • Once a user mints, they are removed from the whitelist.
  • The contract is paused upon deployment.
  • The owner may mint one pMAXCRYSTAL to any user at any time at no cost.
  • The owner may pause and unpause the contract, preventing mints, burns, and transfers, at any time.
ETHSToken Contract:
  • This contract defines the ETHS token.
  • The owner is minted 4,484,639 ETHS upon deployment.
  • The Treasury Fee Receiver address is transferred 19,200 ETHS from the owner upon deployment.
  • The Reward Pool address is transferred 2,903,600 ETHS from the owner upon deployment.
  • The Liquidity Fee Receiver address is transferred 1,311,838 ETHS from the owner upon deployment.
  • Users may convert all of their pETHS tokens to ETHS tokens, up to the "presale max" amount.
  • Users may not burn their tokens, though the circulating supply can be reduced by sending tokens to the 0x..dead address, if desired.
  • Blacklisted addresses are unable to send tokens.
  • Non-exempt addresses are subject to a fee on peer-to-peer transfers and sells; this fee will be elevated upon deployment and decrease over time until a "launch tax end timestamp" has passed, after which it will remain a flat percentage tax.
  • The owner, the contract, and the Treasury Fee Receiver address are added to the fee exempt list upon deployment.
  • During an initial distribution period, users may not transfer tokens unless:
    • The transfer involves the owner.
    • The transfer involves an address on the transaction limit exempt list.
    • The transfer is to the 0x..dead address.
    • The transfer is to the 0x0 address.
    • The transfer is from the contract.
  • The owner, the Liquidity Fee Receiver, Marketing Fee Receiver, and Treasury Fee Receiver addresses are set as transaction limit exempt upon deployment.
  • Addresses not on the transaction limit exempt list are not able to transfer tokens until a "sniper timestamp threshold period" has elapsed; all non-exempt transfers during this period will revert.
  • Addresses not on the transaction limit exempt list are not able to buy or sell more tokens than the max transaction amount in any one given transaction.
  • Addresses that are not on both the transaction limit exempt list and max wallet exempt list may not possess more than the "max wallet" amount of tokens.
  • During transfers, a "swapback" is performed under the following conditions:
    • The "swap interval" period since the last swapback has passed.
    • The owner has set "liquidity added" as true.
    • The contract's token balance has met a threshold.
    • The transfer is not a purchase.
  • A swapback performs a liquidity-add by selling the tokens collected as fees, pairing the received ETH with the tokens collected as liquidity fees, and adding it as liquidity to the ETH pair.
  • The team should ensure that the swapback limit remains fairly low to prevent potential frontrunning.
  • The LP tokens received are sent to the Liquidity Receiver address. We recommend the team lock these tokens.
  • The remaining contract balance is split between the Marketing Fee Receiver, Treasury Fee Receiver, and Distributor addresses.
  • The owner may mint any address any number of tokens at any time.
  • The owner may update the Reward Manager Address at any time.
  • The owner may add and remove an address as a valid LP pair at any time.
  • The owner may update the max wallet and max transfer limit at any time.
  • The owner may add and remove any address from the blacklist, fee exempt, transaction exempt, and max wallet exempt lists at any time.
  • The owner may set the liquidity, reflection, marketing, and treasury fees to any value at any time.
  • The owner may set the claim, compound, vault deposit, and vault withdrawal fee denominators to any value, up to 1/3, at any time.
  • The owner may set the sell fee and sell fee denominator to any value, up to 1/3, at any time.
  • The owner may update the swap interval period and token swap threshold to any value at any time.
  • The owner may update liquidity added as true and set the sniper timestamp threshold to any value at any time.
  • The owner may decrease a users local vault cooldown to any value at any time.
  • The owner may set the vault withdraw cooldown to any value at any time.
  • The owner may set the minimum amount of tokens for distribution at any time.
  • The owner may set the launch tax timestamp at any time.
  • The owner may update the presale token address at any time.
EtherstonesRewardManager Contract:
  • This contract is used to compound and distribute rewards earned from Nodes.
  • When minting is enabled, any user may use this contract to mint a Node of a certain level from 0 to 3.
  • A Node's level when minting is determined by the amount of ETHS tokens used to mint.
  • The ETHS used to mint the Node is credited to the Node balance and used to compound rewards.
  • The ETHS are then transferred to the ETHSToken contract where they are split between a burn, treasury and reward pool fee.
  • The treasury fee is sent to the Treasury Fee Receiver address, the reward pool fee is sent to the Reward Pool address, and the burn fee is burned.
  • Users may convert a pMAXCRYSTAL to a Node. Only one pMAXCRYSTAL may be converted at a time and users' balance must be 0 after the conversion.
  • pMAXCRYSTAL tokens are converted to a type 3 Node and credited with 1000 ETHS in the Node balance.
  • Users may claim a Node's etherstone rewards if the "node cooldown" has passed since the last interaction with the node and the node is not in the auto compounder.
  • Rewards are earned once per day based on the amount of ETH tokens locked, the Node tier and type, the number of times the Node was compounded, and the Node "daily interest".
  • Claiming etherstone rewards will transfer the Node's due rewards, after a claim fee is taken, from the Reward Pool to the user.
  • Claiming ethersone rewards will reset the number of times a Node has been compounded to 0.
  • Users may also claim rewards from all of their nodes at once.
  • Users may compound a Node's etherstone rewards if the node cooldown has passed since the last interaction with the Node.
  • Compounding rewards will transfer the Node's due rewards from the Reward Pool for the user.
  • A compound fee is taken from the rewards and the remaining tokens are credited to the user's "local vault" balance within the ETHSToken contract. A user's local vault balance corresponds with their distributor balance.
  • The remaining tokens after fees are burned.
  • Rewards tokens must be supplied to the Rewards Pool, otherwise users will be unable to claim rewards.
  • Users may compound their nodes up to the maximum amount allowed based on the Node tier.
  • Users may also compound all of their Nodes at once.
  • Users may also add and remove their Nodes from the autocompounder.
  • When Nodes are in the autocompounder, they will automatically be compounded, if their cooldown period has passed, when the autocompound functionality is triggered.
  • The owner may update the daily interest and compound boost for each Node tier to any value at any time.
  • The owner may set the range of ETHS tokens required to mint each Node tier at any time.
  • The owner may toggle Node minting at any time.
  • The owner may set the maximum number of compounds and the associated compound multiplier for each tier to any value at any time.
  • The owner may update the pMAXCRYSTAL address at any time.
VaultDistributor Contract:
  • This contract is used to manage user's staked balances and accumulated rewards.
  • A user's balance is updated whenever they compound or claim their rewards within the EtherstonesRewardManager contract.
  • Deposited AVAX is swapped for WETH and distributed amongst token holders as rewards to users with the minimum required share balance.
  • User may claim their rewards at any time. Claimed rewards may be claimed as WETH or compounded to their local vault.
  • The owner may update the minimum balance required to collect rewards to any value at any time.

Audit Results

Vulnerability CategoryNotesResult
Arbitrary Jump/Storage WriteN/APASS
Centralization of Control
  • The team retains ownership controls outlined above.
  • An address where users funds are sent may be updated.
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

VaultDistributor Contract

Smart Contract Audit - Inheritance

Smart Contract Audit - Graph


 ($) = 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

 + [Int] IBEP20 
    - [Ext] totalSupply
    - [Ext] decimals
    - [Ext] symbol
    - [Ext] name
    - [Ext] getOwner
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Int] IETHSToken (IBEP20)
    - [Ext] nodeMintTransfer #
    - [Ext] depositAll #
    - [Ext] nodeClaimTransfer #
    - [Ext] vaultDepositNoFees #
    - [Ext] vaultCompoundFromNode #
    - [Ext] setInSwap #

 + [Int] IDEXRouter 
    - [Ext] factory
    - [Ext] WAVAX
    - [Ext] addLiquidity #
    - [Ext] addLiquidityAVAX ($)
    - [Ext] swapExactTokensForAVAX #
    - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
    - [Ext] swapExactAVAXForTokensSupportingFeeOnTransferTokens ($)
    - [Ext] swapExactTokensForAVAXSupportingFeeOnTransferTokens #

 + [Int] IVaultDistributor 
    - [Ext] setShare #
    - [Ext] deposit ($)
    - [Ext] setMinDistribution #

 +  VaultDistributor (IVaultDistributor)
    - [Pub] Constructor #
    - [Ext] setShare #
       - modifiers: onlyToken
    - [Ext] deposit ($)
       - modifiers: onlyToken
    - [Ext] claimDividend #
    - [Pub] getUnpaidEarnings
    - [Int] getCumulativeDividends
    - [Ext] getNumberOfShareholders
    - [Ext] setMinDistribution #
       - modifiers: onlyToken

ETHSPresale Contract

Smart Contract Audit - Inheritance

Smart Contract Audit - Graph


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public
 
 + [Int] IERC20 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Int] IERC20Metadata (IERC20)
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals

 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 +  ERC20 (Context, IERC20, IERC20Metadata)
    - [Pub] Constructor #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Int] _transfer #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] _approve #
    - [Int] _beforeTokenTransfer #
    - [Int] _afterTokenTransfer #

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

 +  ERC20Pausable (ERC20, Pausable)
    - [Int] _beforeTokenTransfer #

 + [Int] IERC20 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Int] IERC20Metadata (IERC20)
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals

 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 +  ERC20 (Context, IERC20, IERC20Metadata)
    - [Pub] Constructor #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Int] _transfer #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] _approve #
    - [Int] _beforeTokenTransfer #
    - [Int] _afterTokenTransfer #

 + [Int] IPresaleWhitelist 
    - [Ext] isWhitelisted #
    - [Ext] removeFromWhitelist #
    - [Ext] getLiquidityWalletAddress #
    - [Ext] getStablecoin #

 + [Int] IPresaleToken 
    - [Ext] mintTokensOption2 #

 +  Auth 
    - [Pub] Constructor #
    - [Pub] authorize #
       - modifiers: onlyOwner
    - [Pub] unauthorize #
       - modifiers: onlyOwner
    - [Pub] isOwner
    - [Pub] isAuthorized
    - [Pub] transferOwnership #
       - modifiers: onlyOwner

 +  ETHSPresaleWhitelist (Auth)
    - [Pub] Constructor #
       - modifiers: Auth
    - [Ext] setWhitelist #
       - modifiers: onlyOwner
    - [Ext] addToWhitelist #
       - modifiers: onlyOwner
    - [Ext] removeFromWhitelist #
       - modifiers: authorized
    - [Ext] isWhitelisted
       - modifiers: authorized
    - [Ext] setLiquidityWallet #
       - modifiers: onlyOwner
    - [Ext] getLiquidityWalletAddress
    - [Ext] getStablecoin
    - [Ext] setStablecoin #
       - modifiers: onlyOwner

 +  ETHSPresaleToken (ERC20, ERC20Pausable, Auth)
    - [Pub] Constructor #
       - modifiers: ERC20,Auth
    - [Ext] setPresaleCrystalAddress #
       - modifiers: onlyOwner
    - [Ext] mintTokensOption1 #
    - [Ext] mintTokensOption2 #
       - modifiers: authorized
    - [Int] _beforeTokenTransfer #
    - [Ext] setPaused #
       - modifiers: onlyOwner
    - [Ext] mintForUser #
       - modifiers: onlyOwner

 +  ETHSPresaleCrystal (ERC20, ERC20Pausable, Auth)
    - [Pub] Constructor #
       - modifiers: ERC20,Auth
    - [Ext] mintCrystalAndPresaleToken #
    - [Int] _beforeTokenTransfer #
    - [Ext] setPaused #
       - modifiers: onlyOwner
    - [Ext] mintOneForUser #
       - modifiers: onlyOwner

EtherstonesRewardManager Contract

Smart Contract Audit - Inheritance

Smart Contract Audit - Graph


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public
 
 + [Int] IBEP20 
    - [Ext] totalSupply
    - [Ext] decimals
    - [Ext] symbol
    - [Ext] name
    - [Ext] getOwner
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Int] IETHSToken (IBEP20)
    - [Ext] nodeMintTransfer #
    - [Ext] depositAll #
    - [Ext] nodeClaimTransfer #
    - [Ext] vaultDepositNoFees #
    - [Ext] vaultCompoundFromNode #
    - [Ext] setInSwap #

 +  Auth 
    - [Pub] Constructor #
    - [Pub] authorize #
       - modifiers: onlyOwner
    - [Pub] unauthorize #
       - modifiers: onlyOwner
    - [Pub] isOwner
    - [Pub] isAuthorized
    - [Pub] transferOwnership #
       - modifiers: onlyOwner

 + [Int] IERC20 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Int] IERC20Metadata (IERC20)
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals

 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 +  ERC20 (Context, IERC20, IERC20Metadata)
    - [Pub] Constructor #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Int] _transfer #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] _approve #
    - [Int] _beforeTokenTransfer #
    - [Int] _afterTokenTransfer #

 +  EtherstonesRewardManager (Auth)
    - [Pub] Constructor #
       - modifiers: Auth
    - [Pub] mintNode #
    - [Ext] compoundAllAvailableEtherstoneReward #
    - [Ext] compoundEtherstoneReward #
    - [Ext] claimAllAvailableEtherstoneReward #
    - [Ext] claimEtherstoneReward #
    - [Pub] calculateRewards
    - [Prv] updateNodeInteraction #
    - [Prv] getTierByCompoundTimes
    - [Pub] getEtherstoneNodeById
    - [Pub] getOwnedNodes
    - [Pub] getNumberOfNodes
    - [Ext] getDailyNodeEmission
    - [Ext] setBaseDailyNodeInterest #
       - modifiers: onlyOwner
    - [Ext] setBaseCompoundBoost #
       - modifiers: onlyOwner
    - [Ext] setPebbleMinMax #
       - modifiers: onlyOwner
    - [Ext] setShardMinMax #
       - modifiers: onlyOwner
    - [Ext] setStoneMinMax #
       - modifiers: onlyOwner
    - [Ext] setCrystalMinMax #
       - modifiers: onlyOwner
    - [Ext] setNodeMintingEnabled #
       - modifiers: onlyOwner
    - [Ext] setTierCompoundTimes #
       - modifiers: onlyOwner
    - [Ext] setTierMultipliers #
       - modifiers: onlyOwner
    - [Pub] transferNode #
       - modifiers: authorized
    - [Ext] massTransferNodes #
       - modifiers: authorized
    - [Int] utfStringLength
    - [Ext] setPresaleCrystal #
       - modifiers: onlyOwner
    - [Ext] convertPresaleCrystalToReal #
    - [Pub] addToCompounder #
    - [Pub] removeFromCompounder #
    - [Prv] removeCompounderUser #
    - [Ext] addAllToCompounder #
    - [Ext] removeAllFromCompounder #
    - [Ext] autoCompound #
    - [Prv] compoundAllForUserInCompounder #
    - [Ext] getOwnedNodesInCompounder
    - [Ext] getUsersInCompounder


ETHSToken Contract

Smart Contract Audit - Inheritance

Smart Contract Audit - Graph


 ($) = payable function
 # = non-constant function
 
 Int = Internal
 Ext = External
 Pub = Public
 
 + [Int] IERC20 
    - [Ext] totalSupply
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Lib] Address 
    - [Int] isContract
    - [Int] sendValue #
    - [Int] functionCall #
    - [Int] functionCall #
    - [Int] functionCallWithValue #
    - [Int] functionCallWithValue #
    - [Int] functionStaticCall
    - [Int] functionStaticCall
    - [Int] functionDelegateCall #
    - [Int] functionDelegateCall #
    - [Int] verifyCallResult

 + [Lib] SafeERC20 
    - [Int] safeTransfer #
    - [Int] safeTransferFrom #
    - [Int] safeApprove #
    - [Int] safeIncreaseAllowance #
    - [Int] safeDecreaseAllowance #
    - [Prv] _callOptionalReturn #

 +  Context 
    - [Int] _msgSender
    - [Int] _msgData

 +  PaymentSplitter (Context)
    - [Pub] Constructor ($)
    - [Ext] Receive Ether ($)
    - [Pub] totalShares
    - [Pub] totalReleased
    - [Pub] totalReleased
    - [Pub] shares
    - [Pub] released
    - [Pub] released
    - [Pub] payee
    - [Pub] release #
    - [Pub] release #
    - [Prv] _pendingPayment
    - [Prv] _addPayee #

 + [Int] IBEP20 
    - [Ext] totalSupply
    - [Ext] decimals
    - [Ext] symbol
    - [Ext] name
    - [Ext] getOwner
    - [Ext] balanceOf
    - [Ext] transfer #
    - [Ext] allowance
    - [Ext] approve #
    - [Ext] transferFrom #

 + [Int] IDEXFactory 
    - [Ext] createPair #

 +  Auth 
    - [Pub] Constructor #
    - [Pub] authorize #
       - modifiers: onlyOwner
    - [Pub] unauthorize #
       - modifiers: onlyOwner
    - [Pub] isOwner
    - [Pub] isAuthorized
    - [Pub] transferOwnership #
       - modifiers: onlyOwner

 + [Int] IETHSToken (IBEP20)
    - [Ext] nodeMintTransfer #
    - [Ext] depositAll #
    - [Ext] nodeClaimTransfer #
    - [Ext] vaultDepositNoFees #
    - [Ext] vaultCompoundFromNode #
    - [Ext] setInSwap #

 + [Int] IERC20Metadata (IERC20)
    - [Ext] name
    - [Ext] symbol
    - [Ext] decimals

 +  ERC20 (Context, IERC20, IERC20Metadata)
    - [Pub] Constructor #
    - [Pub] name
    - [Pub] symbol
    - [Pub] decimals
    - [Pub] totalSupply
    - [Pub] balanceOf
    - [Pub] transfer #
    - [Pub] allowance
    - [Pub] approve #
    - [Pub] transferFrom #
    - [Pub] increaseAllowance #
    - [Pub] decreaseAllowance #
    - [Int] _transfer #
    - [Int] _mint #
    - [Int] _burn #
    - [Int] _approve #
    - [Int] _beforeTokenTransfer #
    - [Int] _afterTokenTransfer #

 +  EtherstonesRewardManager (Auth)
    - [Pub] Constructor #
       - modifiers: Auth
    - [Pub] mintNode #
    - [Ext] compoundAllAvailableEtherstoneReward #
    - [Ext] compoundEtherstoneReward #
    - [Ext] claimAllAvailableEtherstoneReward #
    - [Ext] claimEtherstoneReward #
    - [Pub] calculateRewards
    - [Prv] updateNodeInteraction #
    - [Prv] getTierByCompoundTimes
    - [Pub] getEtherstoneNodeById
    - [Pub] getOwnedNodes
    - [Pub] getNumberOfNodes
    - [Ext] getDailyNodeEmission
    - [Ext] setBaseDailyNodeInterest #
       - modifiers: onlyOwner
    - [Ext] setBaseCompoundBoost #
       - modifiers: onlyOwner
    - [Ext] setPebbleMinMax #
       - modifiers: onlyOwner
    - [Ext] setShardMinMax #
       - modifiers: onlyOwner
    - [Ext] setStoneMinMax #
       - modifiers: onlyOwner
    - [Ext] setCrystalMinMax #
       - modifiers: onlyOwner
    - [Ext] setNodeMintingEnabled #
       - modifiers: onlyOwner
    - [Ext] setTierCompoundTimes #
       - modifiers: onlyOwner
    - [Ext] setTierMultipliers #
       - modifiers: onlyOwner
    - [Ext] setNodeCooldown #
       - modifiers: onlyOwner
    - [Ext] setEtherstoneLastInteract #
       - modifiers: onlyOwner
    - [Ext] setEtherstoneNodeData #
       - modifiers: onlyOwner
    - [Pub] transferNode #
       - modifiers: authorized
    - [Ext] massTransferNodes #
       - modifiers: authorized
    - [Int] utfStringLength
    - [Ext] setPresaleCrystal #
       - modifiers: onlyOwner
    - [Ext] convertPresaleCrystalToReal #
    - [Pub] addToCompounder #
    - [Pub] removeFromCompounder #
    - [Prv] removeCompounderUser #
    - [Ext] addAllToCompounder #
    - [Ext] removeAllFromCompounder #
    - [Ext] autoCompound #
    - [Prv] compoundAllForUserInCompounder #
    - [Ext] getOwnedNodesInCompounder
    - [Ext] getUsersInCompounder

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

 + [Int] IDEXRouter 
    - [Ext] factory
    - [Ext] WAVAX
    - [Ext] addLiquidity #
    - [Ext] addLiquidityAVAX ($)
    - [Ext] swapExactTokensForAVAX #
    - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
    - [Ext] swapExactAVAXForTokensSupportingFeeOnTransferTokens ($)
    - [Ext] swapExactTokensForAVAXSupportingFeeOnTransferTokens #

 + [Int] IVaultDistributor 
    - [Ext] setShare #
    - [Ext] deposit ($)
    - [Ext] setMinDistribution #

 +  VaultDistributor (IVaultDistributor)
    - [Pub] Constructor #
    - [Ext] setShare #
       - modifiers: onlyToken
    - [Ext] deposit ($)
       - modifiers: onlyToken
    - [Ext] claimDividend #
    - [Pub] getUnpaidEarnings
    - [Int] getCumulativeDividends
    - [Ext] getNumberOfShareholders
    - [Ext] setMinDistribution #
       - modifiers: onlyToken

 +  ETHSToken (IBEP20, Auth)
    - [Pub] Constructor #
       - modifiers: Auth
    - [Ext] setEtherstonesRewardManager #
       - modifiers: authorized
    - [Ext] setLpPair #
       - modifiers: onlyOwner
    - [Ext] Receive Ether ($)
    - [Ext] totalSupply
    - [Ext] decimals
    - [Ext] symbol
    - [Ext] name
    - [Ext] getOwner
    - [Pub] balanceOf
    - [Ext] allowance
    - [Pub] approve #
    - [Ext] transfer #
    - [Ext] transferFrom #
    - [Int] _transferFrom #
    - [Prv] hasLimits
    - [Ext] nodeMintTransfer #
       - modifiers: onlyRewardsManager
    - [Ext] nodeClaimTransfer #
       - modifiers: onlyRewardsManager
    - [Ext] vaultDepositTransfer #
    - [Ext] vaultDepositNoFees #
       - modifiers: onlyVaultDistributor
    - [Ext] vaultCompoundFromNode #
       - modifiers: onlyRewardsManager
    - [Ext] vaultWithdrawTransfer #
    - [Pub] getPersonalVaultCooldown
    - [Pub] getPersonalAmountInVault
    - [Prv] _mint #
    - [Prv] _burn #
    - [Int] _basicTransfer #
    - [Int] takeSellFee #
    - [Int] shouldSwapBack
    - [Int] swapBack #
       - modifiers: swapping
    - [Ext] setMaxWallet #
       - modifiers: onlyOwner
    - [Ext] setTxLimit #
       - modifiers: onlyOwner
    - [Ext] setIsFeeExempt #
       - modifiers: onlyOwner
    - [Ext] setIsTxLimitExempt #
       - modifiers: onlyOwner
    - [Ext] setMaxWalletExempt #
       - modifiers: onlyOwner
    - [Ext] setWalletFees #
       - modifiers: onlyOwner
    - [Ext] setVaultFees #
       - modifiers: onlyOwner
    - [Ext] setSellFees #
       - modifiers: onlyOwner
    - [Ext] setFeeReceivers #
       - modifiers: onlyOwner
    - [Ext] getCirculatingSupply
    - [Ext] setSwapBackSettings #
       - modifiers: onlyOwner
    - [Ext] setTransferEnabled #
       - modifiers: onlyOwner
    - [Pub] setVaultUserCooldown #
       - modifiers: onlyOwner
    - [Ext] mintUser #
       - modifiers: onlyOwner
    - [Ext] setVaultWithdrawCooldown #
       - modifiers: onlyOwner
    - [Ext] setVaultMinDistribution #
       - modifiers: onlyOwner
    - [Ext] setInSwap #
       - modifiers: onlyVaultDistributor
    - [Ext] setPresaleToken #
       - modifiers: onlyOwner
    - [Ext] convertPresaleToReal #

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 $50 billion U.S. dollars in on-chain value across 1500 projects!.
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 occurring 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.