TermMax / TermMax


Within a single platform, TermMax simplifies DeFi borrowing, lending, and leveraging with one-click token trading, enabling predictable borrowing costs and stable returns. By reinventing the Uniswap V3 AMM with innovative fixed-rate mechanisms and customizable pricing curves, TermMax eliminates the need for multiple complicated transactions across different protocols, making these core DeFi functions more accessible and potentially more profitable for a wider audience.

Prize Distribution and Scoring

  • Total Prize Pool: $23,000

Please note that high and medium severity findings have a separate pot for this competition and are distributed as follows:

High Severity Findings:

  • Total Pot: $18,000
  • Unique Reward: If 6 or fewer unique vulnerabilities are found, each valid unique vulnerability receives $3,000. If more than 6 unique vulnerabilities are found, then the standard scoring formula applies.
  • Duplicates: In case of duplicates the standard scoring formula applies.

Medium Severity Findings:

  • Total Pot: $5,000
  • Unique Reward: If 5 or fewer unique vulnerabilities are found, each valid unique vulnerability receives $1,000. If more than 5 unique vulnerabilities are found, then the standard scoring formula applies.
  • Duplicates: In case of duplicates the standard scoring formula applies.

Findings Severities described in detail on our docs page

Documentation

Scope

  • Repository: https://github.com/cantina-competitions/termmax-contracts
  • Total LOC: 5816
  • Files:
    • contracts/
      • errors

        • FactoryErrors.sol
        • GearingTokenErrors.sol
        • MarketErrors.sol
        • OrderErrors.sol
        • RouterErrors.sol
        • VaultErrors.sol
      • events

        • FactoryEvents.sol
        • GearingTokenEvents.sol
        • MarketEvents.sol
        • OrderEvents.sol
        • RouterEvents.sol
        • VaultEvents.sol
      • factory

        • ITermMaxFactory.sol
        • IVaultFactory.sol
        • TermMaxFactory.sol
        • VaultFactory.sol
      • IFlashLoanReceiver.sol

      • ISwapCallback.sol

      • ITermMaxMarket.sol

      • ITermMaxOrder.sol

      • lib

        • ArrayUtils.sol
        • MarketConstants.sol
        • PendingLib.sol
        • TermMaxCurve.sol
        • VaultConstants.sol
      • router

        • ITermMaxRouter.sol
        • swapAdapters
          • KyberswapV2Adapter.sol
          • OdosV2Adapter.sol
        • TermMaxRouter.sol
      • storage

        • TermMaxStorage.sol
      • TermMaxMarket.sol

      • TermMaxOrder.sol

      • vault

        • IOrderManager.sol
        • ITermMaxVault.sol
        • OrderManager.sol
        • TermMaxVault.sol
        • VaultStorage.sol

Build Instructions

For build instructions, please refer to the README file in the repo.

Basic POC Test

Mandatory POC rule applies for this competition.

For POC test, you can refer to unit test in test folder as the Basic POC test framework

  • test/TermMaxTestBase.t.sol

Out of scope

Code Walkthrough

Contact Us

For any issues or concerns regarding this competition, please reach out to the Cantina core team through the Cantina Discord.

Summary

Status

Completed

Total reward:

$23,000

Findings submitted:

150

Start date:

6 Feb 2025 8:00pm (local time)

End date:

23 Feb 2025 8:00pm (local time)