UselessFurnace - Smart Contract Audit Report
Summary
Useless Crypto is creating a contract used to mantain health between the Useless-BNB liquidity pool and the total supply of Useless tokens.
For this audit, we reviewed the UselessFurnace contract using code provided by the project team.
We previously reviewed the project team's UselessToken contract here.
Notes on the Contract:Audit Findings Summary:
- The contract's purpose is to perform different functionalities based on the ratio between the Useless tokens in the liquidity pool and the circulating supply of Useless tokens.
- If at least 20% of the circulating supply of Useless tokens are stored in the liquidity pool, a portion of the Useless-BNB pair in the liquidity pool will be decoupled and pulled into the contract.
- The portion of LP tokens that are pulled into the contract is equal to the the contract's Useless token balance multiplied by the percentage referred to above. As a consequence of this, the contract is required to have a Useless token balance that is greater than 0 in order for any liquidity to be pulled.
- If this percentage is between 12.5% and 20%, a portion of the BNB in the contract will be used to purchase Useless tokens which are subsequently burned. The amount of BNB used to purchase will be the amount of BNB in the contract, up to 50 BNB. Note that this function requires the contract to have a balance of BNB greater than 0.
- If this is percentage is between 6.66% and 12.5%, half of the contract's BNB (capped at 25 BNB) will be swapped for Useless tokens and paired with the remaining BNB, which will then be added to the liquidity pool.
- If this percentage is less than 6.66%, the liquidity pool will be added to using the contract's funds.
- The function which performs these actions can be called by anyone at any time, however can only be called once per 20 blocks.
- Solidity v0.8.x is used prevent overflows.
- No external threats were identified.
- Date: September 10th, 2021.
Audit 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 |
Flash Loans | 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 |
Unchecked Retval | N/A | PASS |
User Supplied Assertion | N/A | PASS |
Critical Solidity Compiler | N/A | PASS |
Overall Contract Safety | PASS |
($) = payable function
# = non-constant function
+ [Int] IERC20
- [Ext] totalSupply
- [Ext] balanceOf
- [Ext] decimals
- [Ext] transfer #
- [Ext] allowance
- [Ext] approve #
- [Ext] transferFrom #
+ [Lib] Address
- [Int] isContract
- [Int] sendValue #
- [Int] functionCall #
- [Int] functionCall #
- [Int] functionCallWithValue #
- [Int] functionCallWithValue #
- [Prv] _functionCallWithValue #
+ [Lib] SafeMath
- [Int] add
- [Int] sub
- [Int] sub
- [Int] mul
- [Int] div
- [Int] div
- [Int] mod
- [Int] mod
+ [Int] IUniswapV2Router01
- [Ext] factory
- [Ext] WETH
- [Ext] addLiquidity #
- [Ext] addLiquidityETH ($)
- [Ext] removeLiquidity #
- [Ext] removeLiquidityETH #
- [Ext] removeLiquidityWithPermit #
- [Ext] removeLiquidityETHWithPermit #
- [Ext] swapExactTokensForTokens #
- [Ext] swapTokensForExactTokens #
- [Ext] swapExactETHForTokens ($)
- [Ext] swapTokensForExactETH #
- [Ext] swapExactTokensForETH #
- [Ext] swapETHForExactTokens ($)
- [Ext] quote
- [Ext] getAmountOut
- [Ext] getAmountIn
- [Ext] getAmountsOut
- [Ext] getAmountsIn
+ [Int] IUniswapV2Router02 (IUniswapV2Router01)
- [Ext] removeLiquidityETHSupportingFeeOnTransferTokens #
- [Ext] removeLiquidityETHWithPermitSupportingFeeOnTransferTokens #
- [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
- [Ext] swapExactETHForTokensSupportingFeeOnTransferTokens ($)
- [Ext] swapExactTokensForETHSupportingFeeOnTransferTokens #
+ UselessFurnace
- [Ext] BURN_IT_DOWN_BABY #
- modifiers: isAutomating
- [Prv] automate #
- [Prv] checkUselessStanding #
- [Prv] buyAndBurn #
- [Prv] reverseSwapAndLiquify #
- [Prv] pairLiquidity #
- [Pub] checkLPHealth
- [Prv] pairLiquidityThresholdReached
- [Int] getTokenInToken
- [Prv] buyAndBurnUseless #
- [Prv] clamp
- [Prv] justBuyBack #
- [Prv] swapTokensForBNB #
- [Prv] determineLPHealth
- [Prv] addLiquidity #
- [Prv] pullLiquidity #
- [Ext] getContractLPBalance
- [Ext] getPercentageOfLPTokensOwned
- [Ext] ($)