Smart Contract Audit Report
Hybrid is a new ERC-20 token with an elastic supply that performs automatic liquidity adds.
For this audit, we reviewed the Hybrid contract provided to us by the project team.
Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
Date: April 8th, 2022.
Updated: April 11th, 2022 to reflect updates made to the Hybrid contract.
Finding #1 - Hybrid - Informational (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 call.
DEAD, Treasury, ZERO, feeDenominator, liquidityFee, sellFee
Resolution: The team has declared the above state variables constant.
- The initial supply of the token is set to ~1.191 million [1,191,508.81 ] $HYBRID.
- The initial maximum supply of the token is 4 billion [4,000,000,000] $HYBRID.
- No mint or burn functions are present, though the circulating supply can be reduced by sending tokens to the 0x..dead address.
- There was no token allocation for our team to analyze as the contract has yet to be deployed to the Mainnet.
- There is a Liquidity fee and a Treasury fee on all transfers via JoeSwap where neither the sender nor the recipient is excluded from fees.
- There is an additional Sell fee added on all sell transactions via JoeSwap.
- Blacklisted contracts are not permitted to transfer tokens.
- The contract features an auto-rebase mechanism that is triggered on token transfers when the following conditions are met:
- The token has not reached the maximum supply.
- The caller is not initiating a buy transaction via JoeSwap.
- The contract is not currently swapping tokens, performing a rebase, or performing an automatic liquidity add.
- 30 minutes have passed since this functionality has previously occurred.
- During a rebase, 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 to the total supply is dependent on the total supply at the time of rebasing and the time since deployment.
- The rebase function properly calls sync() on the JoeSwap Pair contract to prevent theft-of-liquidity attacks that have occurred with other rebase tokens.
- Also during transfers, an automatic liquidity add will also occur when the contract address token balance reaches the threshold number of tokens (determined by the owner).
- If the current liquidity during this process is greater than the target value, no liquidity will be added. Otherwise, the Liquidity fee is reserved for a liquidity add.
- A liquidity-add is funded by selling half of the tokens collected as liquidity 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 wallet controlled by the team. We recommend that the team lock these newly acquired LP tokens.
- The tokens collected through the Treasury fee are swapped for AVAX and sent to the team's Treasury wallet.
- The contract utilizes SafeMath libraries to prevent any overflows/underflows.
- The owner can manually decrease the rebase rate 181 days after launch and once every subsequent 180 days.
- The owner can modify the maximum supply to any value greater than the total supply 181 days after launch and once every subsequent 180 days.
- The owner can enable/disable automatic liquidity adds 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 add/remove any contract address from the transfer blacklist at any time. EOAs cannot be blacklisted.
- The owner can include/exclude accounts from transfer fees at any time.
- The owner can set the target liquidity to any value at any time.
- The owner can withdraw any AVAX and tokens from the contract at any time.
- The owner can update the JoeSwap Pair address, Liquidity wallet, and Treasury wallet 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|
|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 + [Lib] SafeMathInt - [Int] mul - [Int] div - [Int] sub - [Int] add - [Int] abs + [Int] IERC20 - [Ext] totalSupply - [Ext] balanceOf - [Ext] allowance - [Ext] transfer # - [Ext] approve # - [Ext] transferFrom # + [Lib] SafeMath - [Int] add - [Int] sub - [Int] sub - [Int] mul - [Int] div - [Int] div - [Int] mod + [Int] InterfaceLP - [Ext] sync # + ERC20Detailed (IERC20) - [Pub]
# - [Pub] name - [Pub] symbol - [Pub] decimals + [Int] IDEXRouter - [Ext] factory - [Ext] WAVAX - [Ext] addLiquidity # - [Ext] addLiquidityAVAX ($) - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens # - [Ext] swapExactAVAXForTokensSupportingFeeOnTransferTokens ($) - [Ext] swapExactTokensForAVAXSupportingFeeOnTransferTokens # + [Int] IDEXFactory - [Ext] createPair # + Ownable - [Pub] # - [Pub] owner - [Pub] isOwner - [Pub] renounceOwnership # - modifiers: onlyOwner - [Pub] transferOwnership # - modifiers: onlyOwner - [Int] _transferOwnership # + Hybrid (ERC20Detailed, Ownable) - [Pub] # - modifiers: ERC20Detailed - [Pub] updateBlacklist # - modifiers: onlyOwner - [Ext] setRebaseAndMaxSupply # - modifiers: onlyOwner - [Int] rebase # - [Int] shouldRebase - [Ext] totalSupply - [Ext] transfer # - modifiers: validRecipient - [Ext] setLP # - modifiers: onlyOwner - [Ext] allowance - [Ext] balanceOf - [Int] _basicTransfer # - [Int] _transferFrom # - [Ext] transferFrom # - modifiers: validRecipient - [Int] swapBack # - modifiers: swapping - [Int] takeFee # - [Ext] decreaseAllowance # - [Ext] increaseAllowance # - [Ext] approve # - [Ext] checkFeeExempt - [Ext] setFeeExempt # - modifiers: onlyOwner - [Int] shouldTakeFee - [Ext] setSwapBackSettings # - modifiers: onlyOwner - [Int] shouldSwapBack - [Pub] getCirculatingSupply - [Ext] setTargetLiquidity # - modifiers: onlyOwner - [Ext] isNotInSwap - [Ext] checkSwapThreshold - [Ext] manualSync # - [Ext] setFeeReceivers # - modifiers: onlyOwner - [Ext] clearStuckBalance # - modifiers: onlyOwner - [Pub] rescueToken # - modifiers: onlyOwner - [Prv] transferToAddressAVAX # - [Pub] getLiquidityBacking - [Pub] isOverLiquified - [Int] isContract - [Int] safeTransferAVAX # - [Ext] ($)
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.