Ante v0.6

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!
Have an idea for a test? We'd love to hear about it! Message us on Twitter/Discord or drop us a line at [email protected]!