Skip to content

Access Control Tests Documentation

Overview

This test suite verifies the access control mechanisms and security features of the KagePool contract, ensuring that only authorized users can perform specific actions and that the contract is protected against unauthorized access.

Test Setup
  • Contracts Deployed:

    • KAGENETWORK Token
    • KagePool
  • Key Actors:

    • Owner
    • Treasury
    • User1
    • Malicious User
    • 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)

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 unpaused
  • Reward distributor configured
  • Initial pool setup

Test Coverage

The access control tests verify:

  • ✅ Owner-only function restrictions
  • ✅ Treasury access limitations
  • ✅ Reward distributor permissions
  • ✅ Malicious user attempt handling
  • ✅ Function access restrictions
  • ✅ Role-based access control
  • ✅ Permission inheritance
  • ✅ Security boundaries
  • ✅ Authorization checks