Ante
Ante v0.6
Ante v0.6
  • Introduction to Ante
  • Why use Ante?
  • What's new in Ante v0.6?
  • FAQ
  • Security & Trust
  • Getting Started
    • How Ante works
      • Staking
      • Challenging
      • The Decentralized Trust Score
      • Decentralized Trust Tiers
      • Supported assets
    • User Guides
      • Navigating the app
      • Stake an Ante Test
      • Challenge an Ante Test
      • Withdraw funds
      • Check an Ante Test
      • Claim rewards
      • Using Antegen
  • For Developers
    • Community test repo
    • Writing Ante Tests
      • What to test?
      • Interfaces
      • Ante Test Examples
      • Writing and Testing an Ante Test
    • Integrating Ante
      • Integrate Ante using React
      • Integrate Ante using HTML
    • Deploying an Ante Test
      • Deploy an Ante Test
      • Create an Ante Pool
    • Deployed contracts
Powered by GitBook
On this page
  1. For Developers
  2. Writing Ante Tests

What to test?

Can't think of any tests? Maybe one of these will spark some inspiration!

Ante Tests are single-failure tests of on-chain guarantees.

Here are some ideas for tests:

  • "Rug" test – check that contract-controlled assets are not drained

  • Plunge protection test – check that contract assets do not drop below some threshold

  • Peg test – check to see that two pegged assets stay pegged in price

    • Note: in order to avoid flash loan manipulation of the Ante Test, this should be implemented against time-weighted average prices (TWAP) rather than spot prices

  • Solvency test – Collateral asset value exceeds liabilities by some factor

  • Token vesting test — check that tokens are vested following the publicized schedule

  • Bonding curve test – check that the bonding curve calculation (e.g. x*y=k) holds for an automated market maker (AMM) protocol

  • APY guarantee test – check that actual rewards issued by a contract over a given time period exceeds the APY rate advertised by the protocol

  • DAO implementation test – check that a proposal passed by a DAO was actually implemented

    • Checking outcomes can be tricky given the complexity and heterogeneity of outcomes. Defining a narrow test can help manage some of the complexity

    • Alternatively, this can be made generalized by having the DAO vote again on their satisfaction with the implementation outcome and having the Ante Test check the vote result

  • Access test – check that funds can be withdrawn from contract in an expected manner

  • Market cap test – check that the total value of contract assets exceeds some threshold

  • Volume test – check that at least X unique wallets/transactions/etc. use a given protocol over a given time period

These are just some of the many possible Ante Tests that could be written. Happy writing!

PreviousWriting Ante TestsNextInterfaces

Last updated 2 years ago

Have an idea for a test? We'd love to hear about it! Message us on / or drop us a line at !

Twitter
Discord
hello@ante.finance