Caesar Token

Smart Contract Audit Report

Audit Summary

Caesar Token Audit Report Caesar Token is a new ERC20 token with an elastic supply and automatic LP adds.

For this audit, we reviewed the project team's Caesar contract at 0x42d047534eef46FD68fAD3d74726Fe51be4eeb8F on the Avalanche blockchain.

Audit Findings

Please ensure trust in the team prior to investing as they have substantial control in the ecosystem.
Date: February 22nd, 2022.

Contract Overview

  • The maximum allowed supply of $CAESAR is 340,282,366,920,938,463,463,374,607,431,768,211,455 tokens.
  • Authorized addresses are able to mint any number of tokens up to the maximum supply.
  • The owner may trigger a manual rebase; this serves as a frictionless token redistribution which automatically adds or removes tokens for all token holders at the time of each total supply change.
  • The rebase function properly calls sync() on the JoeSwap Pair contract to prevent theft-of-liquidity attacks which have occurred with other rebase tokens.
  • Users may not burn their tokens, though the circulating supply can be reduced by sending tokens to the 0x..dead address, if desired.
  • Ownership is transferred to the Treasury wallet upon deployment.
  • The current supply of the token is 338,501,502 tokens.
  • 17.90% of the total supply is held in the Treasury wallet.
  • 17.05% is held in the Risk Free Value Receiver address.
  • 15.05% is held in JoeSwap liquidity.

  • There is a Liquidity fee, Treasury fee, and Risk Free Value fee on all buys and sells where the recipient is not excluded from fees. A Sell fee can be set by the team to apply an additional fee when users are selling.
  • Addresses on the whitelist are exempt from fees. The Treasury wallet and the contract are set as fee exempt on deployment.
  • Addresses on the blacklist are unable to transfer or receive tokens.
  • During an initial distribution period, only the owner and users on a separate "allow transfer" whitelist are able to transfer tokens.
  • During transfers, a "swapback" is performed under the following conditions:
    • The contract's token balance has met a threshold.
    • The transfer is not a purchase.
    • Swapping functionality is enabled.
  • If the liquidity during the swapback is greater than the target value, initially 50% of the circulating supply, no liquidity will be added. Otherwise the liquidity fee is used for a liquidity-add.
  • A liquidity-add is funded by selling the tokens collected as fees, pairing the received AVAX with the tokens collected as liquidity fees, and adding it as liquidity to the AVAX pair.
  • The LP tokens received are sent to a specified Auto Liquidity Receiver address. These tokens have been locked in line with our recommendation.
  • The remaining contract balance is distributed where the Treasury fee is sent to the Treasury address and Risk Free Value fee is sent to the Risk Free Value address.
  • Also during transfers, if a "next rebase" time has passed and auto rebase is enabled, tokens are automatically added to the total supply. The newly added tokens are distributed proportionally amongst holders in a frictionless manner.
  • The amount 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.042% of the current total supply.

  • The owner may adjust the fees to any value, up to 25%, at any time.
  • The owner may change the Treasury, Risk Free Value, and Auto Liquidity Receiver addresses at any time.
  • The owner may add or remove an address from the blacklist, whitelist, and allow transfer whitelist at any time.
  • The owner may end the initial distribution period at any time.
  • The owner may change the LP pair address at any time.
  • The owner may toggle swapback functionality at any time.
  • The owner may change the target liquidity value and the contract threshold required to swapback at any time.
  • The owner may add and remove an address as a valid minter at anytime.
  • The owner may withdraw all AVAX and tokens in the contract at any time.
  • The owner may toggle the auto rebase functionality and update the rebase frequency and the new rebase timestamp at any time.
  • The owner may update the reward yield and the reward yield denominator at any time.
  • The owner may manually sync the LP pair contract at any time.
  • The contracts utilize ReentrancyGuard to prevent against reentrancy attacks in applicable functions.
  • The contracts utilize SafeMath to prevent overflow/underflow in applicable functions.

Audit Results

Vulnerability CategoryNotesResult
Arbitrary Jump/Storage WriteN/APASS
Centralization of Control
  • Any address with the Minter role may mint any amount of tokens.
  • The owner may trigger a positive or negative rebase.
  • The owner may add and remove any address from the blacklist.
  • The owner may withdraw any tokens and AVAX from the contract.
  • Please be aware of the amount of liquidity available in proportion to the owner's/largest wallets
  • 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

    Inheritence Chart

    Smart Contract Audit - Inheritance

    Function Graph

    Smart Contract Audit - Graph

    Functions Overview

    
     ($) = 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 #
    
     + [Lib] Roles 
        - [Int] add #
        - [Int] remove #
        - [Int] has
    
     +  MinterRole 
        - [Pub] Constructor #
        - [Pub] isMinter
        - [Pub] renounceMinter #
        - [Int] _addMinter #
        - [Int] _removeMinter #
    
     +  ERC20Detailed (IERC20)
        - [Pub] Constructor #
        - [Pub] name
        - [Pub] symbol
        - [Pub] decimals
    
     + [Int] IJoeFactory 
        - [Ext] feeTo
        - [Ext] feeToSetter
        - [Ext] migrator
        - [Ext] getPair
        - [Ext] allPairs
        - [Ext] allPairsLength
        - [Ext] createPair #
        - [Ext] setFeeTo #
        - [Ext] setFeeToSetter #
        - [Ext] setMigrator #
    
     + [Int] IJoeRouter 
        - [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
        - [Ext] removeLiquidityAVAXSupportingFeeOnTransferTokens #
        - [Ext] removeLiquidityAVAXWithPermitSupportingFeeOnTransferTokens #
        - [Ext] swapExactTokensForTokensSupportingFeeOnTransferTokens #
        - [Ext] swapExactAVAXForTokensSupportingFeeOnTransferTokens ($)
        - [Ext] swapExactTokensForAVAXSupportingFeeOnTransferTokens #
    
     + [Int] IJoePair 
        - [Ext] name
        - [Ext] symbol
        - [Ext] decimals
        - [Ext] totalSupply
        - [Ext] balanceOf
        - [Ext] allowance
        - [Ext] approve #
        - [Ext] transfer #
        - [Ext] transferFrom #
        - [Ext] DOMAIN_SEPARATOR
        - [Ext] PERMIT_TYPEHASH
        - [Ext] nonces
        - [Ext] permit #
        - [Ext] MINIMUM_LIQUIDITY
        - [Ext] factory
        - [Ext] token0
        - [Ext] token1
        - [Ext] getReserves
        - [Ext] price0CumulativeLast
        - [Ext] price1CumulativeLast
        - [Ext] kLast
        - [Ext] mint #
        - [Ext] burn #
        - [Ext] swap #
        - [Ext] skim #
        - [Ext] sync #
        - [Ext] initialize #
    
     + [Int] IWAVAX 
        - [Ext] deposit ($)
        - [Ext] transfer #
        - [Ext] withdraw #
    
     +  Ownable 
        - [Pub] Constructor #
        - [Pub] owner
        - [Pub] isOwner
        - [Pub] renounceOwnership #
           - modifiers: onlyOwner
        - [Pub] transferOwnership #
           - modifiers: onlyOwner
        - [Int] _transferOwnership #
    
     +  Caesar (ERC20Detailed, Ownable, MinterRole)
        - [Pub] Constructor #
           - modifiers: ERC20Detailed
        - [Pub] updateBlacklist #
           - modifiers: onlyOwner
        - [Ext] setNextRebase #
           - modifiers: onlyOwner
        - [Ext] setRewardYield #
           - modifiers: onlyOwner
        - [Ext] setAutoRebase #
           - modifiers: onlyOwner
        - [Ext] setRebaseFrequency #
           - modifiers: onlyOwner
        - [Pub] shouldRebase
        - [Ext] swipe #
           - modifiers: onlyOwner
        - [Prv] coreRebase #
        - [Prv] _rebase #
        - [Ext] rebase #
           - modifiers: onlyOwner
        - [Ext] totalSupply
        - [Ext] transfer #
           - modifiers: validRecipient,initialDistributionLock
        - [Ext] setLP #
           - modifiers: onlyOwner
        - [Ext] allowance
        - [Ext] balanceOf
        - [Ext] scaledBalanceOf
        - [Int] _basicTransfer #
        - [Int] _transferFrom #
        - [Ext] transferFrom #
           - modifiers: validRecipient
        - [Int] swapBack #
           - modifiers: swapping
        - [Int] takeFee #
        - [Ext] decreaseAllowance #
           - modifiers: initialDistributionLock
        - [Ext] increaseAllowance #
           - modifiers: initialDistributionLock
        - [Ext] approve #
           - modifiers: initialDistributionLock
        - [Ext] checkFeeExempt
        - [Ext] setInitialDistributionFinished #
           - modifiers: onlyOwner
        - [Ext] enableTransfer #
           - modifiers: onlyOwner
        - [Ext] setFeeExempt #
           - modifiers: onlyOwner
        - [Int] shouldTakeFee
        - [Ext] mint #
           - modifiers: onlyMinter
        - [Ext] setSwapBackSettings #
           - modifiers: onlyOwner
        - [Int] shouldSwapBack
        - [Pub] getCirculatingSupply
        - [Ext] setTargetLiquidity #
           - modifiers: onlyOwner
        - [Pub] addMinter #
           - modifiers: onlyOwner
        - [Pub] removeMinter #
           - modifiers: onlyOwner
        - [Ext] isNotInSwap
        - [Ext] checkSwapThreshold
        - [Ext] manualSync #
        - [Ext] setFeeReceivers #
           - modifiers: onlyOwner
        - [Ext] setFees #
           - modifiers: onlyOwner
        - [Ext] clearStuckBalance #
           - modifiers: onlyOwner
        - [Pub] rescueToken #
           - modifiers: onlyOwner
        - [Prv] transferToAddressAVAX #
        - [Pub] getLiquidityBacking
        - [Pub] isOverLiquified
        - [Ext] Receive Ether ($)