Skip to content

KagePool Core Tests Documentation

Overview

This test suite contains the core functionality tests for the KagePool contract, focusing on the fundamental staking, reward distribution, and pool management features.

Test Setup
  • Contracts Deployed:
  • KAGENETWORK Token
  • KagePool

  • Key Actors:

  • Owner
  • Treasury
  • User1, User2
  • Reward Distributor
Key Constants
  • MONTH: 30 days (in seconds)
  • POOL_CAP: 1,000,000 tokens
  • MIN_STAKE: 100 tokens
  • LOCK_DURATION: 1 month
  • PENALTY_BPS: 20% (2000 basis points)
  • COOLDOWN_PERIOD: 1 day (in seconds)

Test Configuration

The test environment is set up with:

KAGE Token Configuration

  • Buy/Sell Tax: 5% (500 basis points)
  • Max Wallet Division: 100
  • Max Transaction Division: 100
  • Max Swap Divisor: 10

KagePool Configuration

  • Contract deployment
  • Token integration
  • Treasury configuration
  • Reward distributor setup

Test Coverage

The core tests verify:

Basic Staking Functionality

  • ✅ Deposit and withdrawal
  • ✅ Lock period enforcement
  • ✅ Minimum stake requirements
  • ✅ Pool capacity management

Reward Distribution

  • ✅ Reward calculation accuracy
  • ✅ Distribution timing
  • ✅ Reward claim process
  • ✅ Distribution rate management

Pool Management

  • ✅ Pool parameters configuration
  • ✅ Fee calculations
  • ✅ Emergency procedures
  • ✅ Contract upgrades

User Operations

  • ✅ Balance tracking
  • ✅ User limits
  • ✅ Cooldown periods
  • ✅ Penalty enforcement