Skip to content

Incentive module remaining tests checklist #1990

Open
@toteki

Description

Required before feature testnet

Basic message execution

  • Bond
  • BeginUnbonding (and unbonding completion after time)
  • EmergencyUnbond (with fee)
  • Gov (params, program)
  • Sponsor

Basic rewards calculation, distribution

  • Rewards proportional to bonded amounts between multiple users
  • Rewards skip block when zero bonded
  • Simultaneous programs add together

Edge cases and cleanup - make during feature testnet

  • Zero unbonding duration skips unbonding struct, max unbondings param
  • Pending rewards on all basic messages (must automatically claim)
  • Rounding scenarios (high exponent asset test)
  • CLI tests for non-gov messages
  • Query tests for basic scenarios
  • Expanded coverage of basic functions (validate, error cases, etc)
  • Non funded programs complete immediately on start
  • First incentive program on a denom fetches asset exponent from leverage module
  • Max unbondings limit works even when multiple unbondings from the past are almost at completion

Genesis import/export

  • Generate some flows -> export genesis -> import genesis -> must work
  • Generate genesis json -> import genesis -> export genesis -> must be same as original json file.

Chain halt scenarios

  • Program start during halt (delayed)
  • Program complete during halt (remaining rewards are distributed)
  • Program both starts and would complete during halt (delayed start means delayed completion too)

Mock leverage hook scenario in incentive module tests

  • Liquidation with no effect (sufficient collateral)
  • Liquidation finishes some unbondings (earliest first)
  • Liquidation unbonds some collateral and finishes all unbondings

Mock incentive hook scenario in leverage module tests

  • Cannot withdraw bonded collateral
  • Cannot decollateralize bonded collateral
  • Can liquidate bonded collateral (and liquidation reduces bonded collateral)

Query edge cases

  • Account unbondings that have finished but have not yet been cleared by messages
  • Pending rewards simultaneous with pending completed unbondings

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions