100 Days Ventures
Smart Contract Audit Report
100 Days Ventures is a new ERC-20 token with an elastic supply that performs automatic liquidity adds.
For this audit, we reviewed the project team's AstroToken contract at 0x6d2f5dBf3a7396FCe32CfE406Aef7a8AFF812Fbb on the Avalanche Mainnet.
Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
Date: May 1st, 2022.
Updated: June 22nd, 2022 to reflect the contract's newly deployed mainnet address.
Finding #1 - AstroToken - Informational (Partially Resolved)Description: Several state variables can never be modified, but are not declared constant.Recommendation: These state variables should be declared constant for additional gas savings on each reference.
DEAD, ZERO, feeDenominator
Resolution: The team has declared the DEAD and ZERO state variables constant.
Finding #2 - AstroToken - InformationalDescription: Although the SafeMath library is utilized, the contract is deployed with Solidity v0.8.9 which has built-in overflow checks.
Recommendation: SafeMath could be safely removed to reduce contract size and deployment costs.
- The total supply of the token is currently 2,312,573,491 $ASTRO.
- The maximum supply of is 340,282,366,920,938,463,463,374,607,431,768,211,455 tokens.
- No mint or burn functions exist, though the circulating supply can be decreased by sending tokens to the 0x..dead address.
- At the time of writing this report, there are 2,426 total token holders. The token allocation is as follows:
- 32.94% of the total supply is stored in an upgradeable proxy contract.
- 10.08% of the total supply is stored in an upgradeable proxy contract.
- 6.26% of the total supply is in JoeSwap liquidity.
- Of that liquidity, 90.91% of the LP tokens belong to the owner.
- 9.01% of the LP tokens belong to the team's Liquidity wallet.
- The next five holders own a cumulative 0.95% of the total supply.
- The initial distribution period of the contract must be manually disabled by the owner in order for all trading to take place on the platform. Only users excluded by the owner are able to transfer tokens while the initial distribution period is enabled.
- The contract enforces a maximum sell amount on sell transactions if the USDC equivalent of the number of tokens a user is attempting to sell within the set purchase period exceeds the limit value (both determined by the owner).
- The contract features an Anti-whale mechanism on sell transactions that taxes users at a separate rate if the number of tokens they are selling is greater than the Whale sell limit value.
- Blacklisted accounts are prohibited from participating in transfers.
- There is a Liquidity fee, Treasury fee, RFV fee, Ecosystem fee, Operations fee, and xASTRO fee on all transfers via JoeSwap where neither the sender nor the recipient is excluded from fees. A separate fee structure can be set by the team to apply different fee percentages on sell transactions.
- A third fee structure can be set by the team to apply different fee percentages on sell transactions if the number of tokens a user is selling is greater than the normal sell limit value set by the team.
- The fees charged during transfers are stored in the contract address. The tokens are swapped for AVAX for the purpose of funding JoeSwap liquidity when the following conditions are met:
- The automatic liquidity add functionality is enabled by the team.
- The threshold number of tokens in the contract address (determined by the owner) has been reached.
- The contract is not currently performing an automatic liquidity add.
- The caller is not initiating a buy transaction via JoeSwap.
- The current total fee percentage is greater than 0.
- If the Liquidity during the swap is greater than the target value set by the team, no liquidity will be added. Otherwise, the Liquidity fee is used for an automatic Liquidity-add.
- Liquidity-adds are automatically performed by selling the tokens collected as fees, pairing the received AVAX with the token, and adding it as liquidity to the AVAX pair.
- The LP tokens received through this process are sent to the Liquidity address set by the team. We recommend that the team lock these newly acquired LP tokens.
- The tokens collected from the Treasury fee, RFV fee, Ecosystem fee, Operations fee, and xASTRO fee are swapped for AVAX and sent to the team's Treasury wallet, RFV wallet, Ecosystem wallet, Operations wallet, and xASTRO wallet respectively.
- Also during transfers, if the "next-rebase" time has passed, auto rebase is enabled, and the transaction is not a buy or a sell, tokens are automatically added to the total supply. The newly added tokens are distributed proportionally amongst holders in a frictionless manner.
- The number of tokens added is dependent on the current total supply, and the ratio between the "reward yield" and the "reward yield denominator"; this ratio defaults to ~0.039% of the current total supply.
- The rebase function calls sync() on the Pair contracts to prevent theft-of-liquidity attacks that have occurred with other rebase tokens.
- Users can call the claimAllottedSell() function once per week to swap 1% of their current token balance for USDC. The user must first call the updateAllottedSellTimer() function to initially be eligible for this functionality.
- The contract utilizes SafeMath libraries to prevent any overflows/underflows.
- The owner can set the total fee percentage for each fee structure to any values at any time.
- The owner can exclude accounts from transfer fees.
- The owner can add/remove addresses from the transfer blacklist.
- The owner can pause/unpause trading at any time.
- The owner can update the rebase frequency and update the next rebase timestamp at any time.
- The owner can update the reward yield and the reward yield denominator to any values at any time.
- The owner or the rebaser can manually trigger a rebase at any time.
- The owner can enable/disable automatic liquidity adds and the auto-rebase mechanism at any time.
- The owner can set the target liquidity to any value at any time.
- The owner can airdrop any number of tokens to any addresses at any time.
- The owner can update the threshold number of tokens that triggers an automatic liquidity add to any value at any time.
- The owner can withdraw any AVAX or tokens from the contract at any time.
- The owner can update the JoeSwap Router and Pair address at any time.
- The owner can update the allotted sell interval and percentage to any values at any time.
- The owner can set the whale sell limit, normal sell limit, and maximum sell limit to any values at any time.
- The owner can update the purchase period to any value at any time.
- The owner can enable/disable fees on peer-to-peer transfers.
- The owner can enable/disable the claimAllottedSell functionality at any time.
- The owner or rebaser can trigger a manual swapback at any time.
- The owner can set the rebaser address to any address at any time.
- The owner can update the team's Liquidity wallet, Treasury wallet, RFV wallet, Ecosystem wallet, Operations wallet, xASTRO wallet, and Burn wallet to any addresses at any time.
|Arbitrary Jump/Storage Write||N/A||PASS|
|Centralization of Control||WARNING|
|Delegate Call to Untrusted Contract||N/A||PASS|
|Dependence on Predictable Variables||N/A||PASS|
|Front Running||The automatic token swapping functionality may be susceptible to front-running; The team must monitor and if suspicious activity is detected, the team should lower the ||PASS|
|Improper Authorization Scheme||N/A||PASS|
|Outdated Compiler Version||N/A||PASS|
|Overall Contract Safety||PASS|
($) = payable function # = non-constant function Int = Internal Ext = External Pub = Public + [Int] InterfaceLP - [Ext] sync # + [Int] IJoeRouter01 - [Ext] factory - [Ext] WAVAX - [Ext] addLiquidity # - [Ext] addLiquidityAVAX ($) - [Ext] removeLiquidity # - [Ext] removeLiquidityAVAX # - [Ext] removeLiquidityWithPermit # - [Ext] removeLiquidityAVAXWithPermit # - [Ext] swapExactTokensForTokens # - [Ext] swapTokensForExactTokens # - [Ext] swapExactAVAXForTokens ($) - [Ext] swapTokensForExactAVAX # - [Ext] swapExactTokensForAVAX # - [Ext] swapAVAXForExactTokens ($) - [Ext] quote - [Ext] getAmountOut - [Ext] getAmountIn - [Ext] getAmountsOut - [Ext] getAmountsIn + [Int] IDEXRouter (IJoeRouter01) - [Ext] removeLiquidityAVAXSupportingFeeOnTransferTokens # - [Ext] removeLiquidityAVAXWithPermitSupportingFeeOnTransferTokens # - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens # - [Ext] swapExactAVAXForTokensSupportingFeeOnTransferTokens ($) - [Ext] swapExactTokensForAVAXSupportingFeeOnTransferTokens # + [Int] IDEXFactory - [Ext] createPair # + [Int] IERC20 - [Ext] totalSupply - [Ext] balanceOf - [Ext] transfer # - [Ext] allowance - [Ext] approve # - [Ext] transferFrom # + ERC20Detailed (IERC20) - [Pub]
# - [Pub] name - [Pub] symbol - [Pub] decimals + [Lib] SafeMathInt - [Int] mul - [Int] div - [Int] sub - [Int] add - [Int] abs + [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 + AstroToken (ERC20Detailed) - [Pub] # - modifiers: ERC20Detailed - [Ext] totalSupply - [Ext] allowance - [Pub] balanceOf - [Pub] initialBalanceOf - [Ext] checkFeeExempt - [Ext] checkSwapThreshold - [Ext] getOwner - [Int] shouldRebase - [Int] shouldTakeFee - [Int] shouldSwapBack - [Pub] getCirculatingSupply - [Pub] getLiquidityBacking - [Pub] isOverLiquified - [Ext] setOwner # - modifiers: onlyOwner - [Ext] setRebaseDuration # - modifiers: onlyOwner - [Pub] manualSync # - [Ext] claimAllottedSell # - [Ext] transfer # - modifiers: validRecipient,paused - [Int] _basicTransfer # - [Int] _transferFrom # - [Ext] transferFrom # - modifiers: validRecipient - [Prv] _swapAndLiquify # - [Prv] _addLiquidity # - [Prv] _swapTokensForAVAX # - [Prv] _swapTokensForUSDC # - [Int] swapBack # - modifiers: swapping - [Int] takeFee # - [Pub] getUSDCFromASTRO - [Ext] decreaseAllowance # - [Ext] increaseAllowance # - [Ext] approve # - [Prv] _rebase # - [Prv] coreRebase # - [Ext] manualRebase # - modifiers: onlyOwner - [Pub] setAutomatedMarketMakerPair # - modifiers: onlyOwner - [Ext] setInitialDistributionFinished # - modifiers: onlyOwner - [Ext] setFeeExempt # - modifiers: onlyOwner - [Ext] setBlacklisted # - modifiers: onlyOwner - [Ext] pauseTrading # - modifiers: onlyOwner - [Ext] adjustAllottedSell # - modifiers: onlyOwner - [Ext] setTargetLiquidity # - modifiers: onlyOwner - [Ext] setSwapBackSettings # - modifiers: onlyOwner - [Ext] setFeeReceivers # - modifiers: onlyOwner - [Ext] setFees # - modifiers: onlyOwner - [Ext] clearStuckBalance # - modifiers: onlyOwner - [Ext] rescueToken # - modifiers: onlyOwner - [Ext] setRouterAddress # - modifiers: onlyOwner - [Ext] setAutoRebase # - modifiers: onlyOwner - [Ext] setRebaseFrequency # - modifiers: onlyOwner - [Ext] setRewardYield # - modifiers: onlyOwner - [Ext] setFeesOnNormalTransfers # - modifiers: onlyOwner - [Ext] setNextRebase # - modifiers: onlyOwner - [Ext] setMaxSellTransaction # - modifiers: onlyOwner - [Ext] setNormalSellLimit # - modifiers: onlyOwner - [Ext] setWhaleSellLimit # - modifiers: onlyOwner - [Ext] setPurchasePeriod # - modifiers: onlyOwner - [Ext] setAirdropAddress # - modifiers: onlyOwner - [Ext] setAirdropAmount # - modifiers: onlyOwner - [Ext] airdrop # - modifiers: onlyOwner - [Ext] ($) - [Ext] ($)
SourceHat (formerly Solidity Finance - founded in 2020) has quickly grown to have one of the most experienced and well-equipped smart contract auditing teams in the industry. Our team has conducted 1700+ 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!
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 SourceHat Audit?
Typically, a smart contract audit is a comprehensive review process designed to discover logical errors, security vulnerabilities, and optimization opportunities within code. A SourceHat 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.