SmarDex Smart Contracts: Program Info

Triaged by HackenProof
SmarDex

SMARDEX is an Automated Market Maker (AMM) that addresses the issue of Impermanent Loss (IL) and in some cases transforms it into Impermanent Gain (IG). It is an open-source Smart Contract, which is a decentralized software that runs on compatible Ethereum Virtual Machine blockchains (such as Ethereum, Binance Smart Chain, Avalanche, Polygon, etc.).

In Scope

Target Type Severity Reward
https://etherscan.io/address/0x5DE8ab7E27f6E7A1fFf3E5B337584Aa43961BEeF

Smart Contract - SmarDexToken

  • Group 1 target
Smart Contract Critical Bounty
https://etherscan.io/address/0x7753F36E711B66a0350a753aba9F5651BAE76A1D

Smart Contract - SmardexFactory

  • Group 1 target
Smart Contract Critical Bounty
https://etherscan.io/address/0xEf2f9b48d7EC80440Ab4573dF1A2aBDBE06D3f60

Smart Contract - SmardexRouter

  • Group 1 target
Smart Contract Critical Bounty
https://etherscan.io/address/0x7d85C0905a6E1Ab5837a0b57cD94A419d3a77523

Smart Contract - Farming

  • Group 1 target
Smart Contract Critical Bounty
https://etherscan.io/address/0x80497049b005Fd236591c3CD431DBD6E06eB1A31

Smart Contract - Staking

  • Group 1 target
Smart Contract Critical Bounty
https://etherscan.io/address/0xC049c7fE5EAa024095861212BD8a8E8Df88a2b1f

Smart Contract - RewardsManager

  • Group 1 target
Smart Contract Critical Bounty
https://etherscan.io/address/0x865d61582abc2CCd85549774CEe171280fE82e3e

Smart Contract - Autoswapper

  • Group 1 target
Smart Contract Critical Bounty
https://polygonscan.com/address/0x9A1e1681f6D59Ca051776410465AfAda6384398f

Smart Contract - SmardexFactory

  • Group 2 target
Smart Contract High Bounty
https://polygonscan.com/address/0xA8EF6FEa013034E62E2C4A9Ec1CDb059fE23Af33

Smart Contract - SmardexRouter

  • Group 2 target
Smart Contract High Bounty
https://polygonscan.com/address/0x7db73a1e526db36c40e508b09428420c1fa8e46b

Smart Contract - FarmingRangeL2

  • Group 2 target
Smart Contract High Bounty
https://polygonscan.com/address/0x391becc8daaf32b9ba8e602e9527bf9da04c8deb

Smart Contract - RewardManagerL2

  • Group 2 target
Smart Contract High Bounty
https://polygonscan.com/address/0x8ef71fde0681f567d241a2cb7f2ae46d6d709d30

Smart Contract - AutoSwapperL2

  • Group 2 target
Smart Contract High Bounty
https://arbiscan.io/address/0x41A00e3FbE7F479A99bA6822704d9c5dEB611F22

Smart Contract - SmardexFactory

  • Group 2 target
Smart Contract High Bounty
https://arbiscan.io/address/0xdd4536dD9636564D891c919416880a3e250f975A

Smart Contract - SmardexRouter

  • Group 2 target
Smart Contract High Bounty
https://arbiscan.io/address/0x53D165DF0414bD02E91747775450934BF2257f69

Smart Contract - FarmingRangeArbitrum

  • Group 2 target
Smart Contract High Bounty
https://arbiscan.io/address/0x5c622dcc96b6d96ac6c154f99cf081815094cbc9

Smart Contract - RewardManagerL2Arbitrum

  • Group 2 target
Smart Contract High Bounty
https://arbiscan.io/address/0xd978bb7a7ae5b01116d1bd714fedd1b77ca9e75b

Smart Contract - AutoSwapperL2

  • Group 2 target
Smart Contract High Bounty
https://bscscan.com/address/0xA8EF6FEa013034E62E2C4A9Ec1CDb059fE23Af33

Smart Contract - SmardexFactory

  • Group 2 target
Smart Contract High Bounty
https://bscscan.com/address/0x391BeCc8DAaf32b9ba8e602e9527Bf9DA04C8deb

Smart Contract - SmardexRouter

  • Group 2 target
Smart Contract High Bounty
https://bscscan.com/address/0xb891Aeb2130805171796644a2af76Fc7Ff25a0b9

Smart Contract - FarmingRange

  • Group 2 target
Smart Contract High Bounty
https://bscscan.com/address/0x8ef71fDe0681f567d241A2Cb7f2aE46d6D709D30

Smart Contract - RewardManagerL2

  • Group 2 target
Smart Contract High Bounty
https://bscscan.com/address/0x41A00e3FbE7F479A99bA6822704d9c5dEB611F22

Smart Contract - AutoSwapperL2

  • Group 2 target
Smart Contract High Bounty
https://basescan.org/address/0xdd4536dD9636564D891c919416880a3e250f975A

Smart Contract - SmardexFactory

  • Group 2 target
Smart Contract High Bounty
https://basescan.org/address/0x5C622Dcc96b6D96ac6c154f99CF081815094CBC9

Smart Contract - SmardexRouter

  • Group 2 target
Smart Contract High Bounty
https://basescan.org/address/0xa5d378c05192e3f1f365d6298921879c4d51c5a3

Smart Contract - FarmingRangeL2

  • Group 2 target
Smart Contract High Bounty
https://basescan.org/address/0xd978bb7a7ae5b01116d1bd714fedd1b77ca9e75b

Smart Contract - RewardManagerL2

  • Group 2 target
Smart Contract High Bounty
https://basescan.org/address/0x7240aac0f57fa0126c107673597ce3cd5b907e38

Smart Contract - AutoSwapperL2

  • Group 2 target
Smart Contract High Bounty

Impacts in scope

Only the following impacts are accepted within this bug bounty program. All other impacts are not considered as in-scope, even if they affect something in the assets in scope table.

Smart Contract

  • Direct theft of any user funds, whether at-rest or in-motion, other than unclaimed yield - Critical Impact
  • Permanent freezing of funds - Critical Impact
  • Predictable or manipulable RNG that results in abuse of the principal or NFT - Critical Impact
  • Protocol insolvency - Critical Impact
  • Theft of unclaimed yield - High Impact
  • Theft of unclaimed royalties - High Impact
  • Permanent freezing of unclaimed yield - High Impact
  • Permanent freezing of unclaimed royalties - High Impact
  • Temporary freezing of funds - High Impact
  • Smart contract unable to operate due to lack of token funds - Medium Impact
  • Block stuffing - Medium Impact
  • Griefing (e.g. no profit motive for an attacker, but damage to the users or the protocol) - Medium Impact
  • Theft of gas Medium Impact
  • Unbounded gas consumption - Medium Impact
  • Contract fails to deliver promised returns, but doesn't lose value - Low Impact

Out of Scope & Rules

These impacts are out of scope for this bug bounty program.

All Categories

  • Impacts requiring attacks that the reporter has already exploited themselves, leading to damage
  • Impacts caused by attacks requiring access to leaked keys/credentials
  • Impacts caused by attacks requiring access to privileged addresses (governance, strategist) except in such cases where the contracts are intended to have no privileged access to functions that make the attack possible
  • Impacts relying on attacks involving the depegging of an external stablecoin where the attacker does not directly cause the depegging due to a bug in code
  • Mentions of secrets, access tokens, API keys, private keys, etc. in Github will be considered out of scope without proof that they are in-use in production
  • Best practice recommendations
  • Feature requests
  • Impacts on test files and configuration files unless stated otherwise in the bug bounty program

Smart Contracts and Blockchain/DLT

  • Incorrect data supplied by third party oracles
  • Not to exclude oracle manipulation/flash loan attacks
  • Impacts requiring basic economic and governance attacks (e.g. 51% attack)
  • Lack of liquidity impacts
  • Impacts from Sybil attacks
  • Impacts involving centralization risks
  • Best practice recommendations

The following activities are prohibited by this bug bounty program:

  • Any testing on mainnet or public testnet deployed code; all testing should be done on local-forks of either public testnet or mainnet
  • Any testing with pricing oracles or third-party smart contracts
  • Attempting phishing or other social engineering attacks against our employees and/or customers
  • Any testing with third-party systems and applications (e.g. browser extensions) as well as websites (e.g. SSO providers, advertising networks)
  • Any denial of service attacks that are executed against project assets
  • Automated testing of services that generates significant amounts of traffic
  • Public disclosure of an unpatched vulnerability in an embargoed bounty

SmarDex provides rewards in SDEX. For more details about the payment process, please view the Rewards by Threat Level section further below.

All code of SmarDex can be found at https://github.com/SmarDex-Dev/smart-contracts.

Documentation for the assets provided in the table can be found at https://docs.smardex.io.

Other helpful links include:

Whitepaper - https://www.academia.edu/98332701/The_SMARDEX_Protocol_A_Novel_Solution_to_Impermanent_Loss_in_Decentralized_Finance

Rewards are distributed according to the impact the vulnerability could otherwise cause based on the Impacts in Scope table further below.

Reward Calculation for Critical Level Reports

This bug bounty program is divided into Group 1 and Group 2:

  • Group 1: consists of Ethereum assets
  • Group 2: consists of all other chains

Critical smart contract vulnerability payouts for Group 1 are a minimum of USD 20 000 or 5% of the value at risk at the time of report submission, with a hard cap of USD 500 000, whichever is larger. Value at risk should be calculated primarily (though not exclusively) based on concrete and demonstrable funds at risk.

Critical smart contract vulnerability payouts for Group 2 are a minimum of USD 20 000, or 5% of the value at risk at the time of report submission, with a hard cap of USD 300 000, whichever is larger. Value at risk should be calculated primarily (though not exclusively) based on concrete and demonstrable funds at risk.

Repeatable Attack Limitations

In cases of repeatable attacks for smart contract bugs, only the first attack will be counted, regardless of whether the smart contract is upgradable, pausable, or killable.

Reward Calculation for High Level Reports

The payout is determined to be 10% of the value at risk. The minimum reward is set at $15,000. The maximum rewards (hard cap) are as follows:

  • USD 50 000 for Theft of unclaimed yield (for value of USD 500 000 at risk or greater)
  • USD 50 000 for Theft of unclaimed royalties (for value of USD 500 000 at risk)
  • USD 20 000 for Permanent freezing of unclaimed yield (for value of USD 200 000 at risk)
  • USD 20 000 for Permanent freezing of unclaimed royalties (for value of USD 200 000 at risk)
  • USD 15 000 for Temporary freezing of funds (for value of USD 150 000 at risk)

Value at risk should be calculated primarily (though not exclusively) based on concrete and demonstrable funds at risk

Reward Calculation for Medium Level Reports

Medium smart contract vulnerabilities will be paid out by the following:

  • USD 10 000 for Smart contract unable to operate due to lack of token funds
  • USD 5 000 for Griefing (e.g. no profit motive for an attacker, but damage to the users or the protocol)
  • USD 5 000 for Block stuffing
  • USD 1 000 for Theft of gas
  • USD 1 000 for Unbounded gas consumption

Bug reports covering previously-discovered bugs acknowledged below are not eligible for any reward through the bug bounty program.

  • Data manipulation with very high and/or very small numbers that would be theoretically possible but not applicable in real conditions.
  • Swap with bigger amount than fictive reserves are impossible even if the contracts theoretically hold enough tokens to execute the trade.
  • Farming DOS
  • Block stuffing to avoid the 300s protection and to exploit the vulnerability described in the white paper, section III. A.
  • Any way of exploit the vulnerability described in the white paper, section III. A
  • Sandwich/frontrun attack on pair creation doing a large fictive reserve unbalance.
  • Sending token on pair that no liquidity were added on yet.
  • Farming campaign rewardInfo add & remove when still active.
  • Frontrunning permit transaction of the router, to disable permit signature (griefing)

SmarDex has provided these completed audit review reports for reference. Any fixed, unfixed or acknowledged vulnerability mentioned in these reports are not eligible for a reward. - https://smardex.io/audit-reports

A PoC is required for the following severity levels:

  • Smart Contract - Critical
  • Smart Contract - High
  • Smart Contract - Medium
  • Smart Contract - Low

Bug report submissions without a PoC when a PoC is required will not be provided with a reward.
The PoC must consists in a fork of the mainnet, using hardhat or foundry, and the potential hack must be proven to work on the mainnet contract of the fork. You may use impersonnate method. Do not impersonnate the contracts owner, unless the vulnerability involve an owner. You may choose a fix block number to start the fork with, this fix block number mustn't be older than a few days before the bug submission.

This bug bounty program is divided into Group 1 and Group 2 for the Critical Smart Contract reward

Group 1: consists of Ethereum assets
Group 2: consists of all other chains

Payouts are handled by the SmarDex team directly and are denominated in USD. However, payments are done in SDEX.

The calculation of the net amount rewarded is based on the average price between CoinMarketCap.com and CoinGecko.com at the time the bug report was submitted. No adjustments are made based on liquidity availability.

For avoidance of doubt, if the reward amount is USD 5 000 and the average price is USD 1.75 per token, then the reward will be 2857.142857 units of that token.