/**
 * AUTO-GENERATED FILE — DO NOT EDIT
 *
 * Generated by scripts/sync-tax-rates.mjs from onchain/src/Stake.sol.
 * Run `node scripts/sync-tax-rates.mjs` after modifying the contract TAX_RATES array.
 */

export interface TaxRateOption {
  index: number;
  year: number;
  daily: number;
  decimal: number;
}

export const TAX_RATE_OPTIONS: TaxRateOption[] = [
  { index: 0, year: 1, daily: 0.00274, decimal: 0.01 },
  { index: 1, year: 3, daily: 0.00822, decimal: 0.03 },
  { index: 2, year: 5, daily: 0.0137, decimal: 0.05 },
  { index: 3, year: 8, daily: 0.02192, decimal: 0.08 },
  { index: 4, year: 12, daily: 0.03288, decimal: 0.12 },
  { index: 5, year: 18, daily: 0.04932, decimal: 0.18 },
  { index: 6, year: 24, daily: 0.06575, decimal: 0.24 },
  { index: 7, year: 30, daily: 0.08219, decimal: 0.3 },
  { index: 8, year: 40, daily: 0.10959, decimal: 0.4 },
  { index: 9, year: 50, daily: 0.13699, decimal: 0.5 },
  { index: 10, year: 60, daily: 0.16438, decimal: 0.6 },
  { index: 11, year: 80, daily: 0.21918, decimal: 0.8 },
  { index: 12, year: 100, daily: 0.27397, decimal: 1 },
  { index: 13, year: 130, daily: 0.35616, decimal: 1.3 },
  { index: 14, year: 180, daily: 0.49315, decimal: 1.8 },
  { index: 15, year: 250, daily: 0.68493, decimal: 2.5 },
  { index: 16, year: 320, daily: 0.87671, decimal: 3.2 },
  { index: 17, year: 420, daily: 1.15068, decimal: 4.2 },
  { index: 18, year: 540, daily: 1.47945, decimal: 5.4 },
  { index: 19, year: 700, daily: 1.91781, decimal: 7 },
  { index: 20, year: 920, daily: 2.52055, decimal: 9.2 },
  { index: 21, year: 1200, daily: 3.28767, decimal: 12 },
  { index: 22, year: 1600, daily: 4.38356, decimal: 16 },
  { index: 23, year: 2000, daily: 5.47945, decimal: 20 },
  { index: 24, year: 2600, daily: 7.12329, decimal: 26 },
  { index: 25, year: 3400, daily: 9.31507, decimal: 34 },
  { index: 26, year: 4400, daily: 12.05479, decimal: 44 },
  { index: 27, year: 5700, daily: 15.61644, decimal: 57 },
  { index: 28, year: 7500, daily: 20.54795, decimal: 75 },
  { index: 29, year: 9700, daily: 26.57534, decimal: 97 }
];

/**
 * Checksum of the contract TAX_RATES array (first 16 chars of SHA-256).
 * Used for runtime validation to ensure kraiken-lib is in sync with deployed contracts.
 *
 * To validate at runtime:
 * 1. Read TAX_RATES array from the Stake contract
 * 2. Compute checksum: sha256(values.join(',')).slice(0, 16)
 * 3. Compare with TAX_RATES_CHECKSUM
 *
 * If mismatch: Run `node scripts/sync-tax-rates.mjs` and rebuild kraiken-lib.
 */
export const TAX_RATES_CHECKSUM = '1e37f2312ef082e9';

/**
 * Array of raw year values (matches contract uint256[] TAX_RATES exactly).
 * Used for runtime validation without needing to parse options.
 */
export const TAX_RATES_RAW = [1, 3, 5, 8, 12, 18, 24, 30, 40, 50, 60, 80, 100, 130, 180, 250, 320, 420, 540, 700, 920, 1200, 1600, 2000, 2600, 3400, 4400, 5700, 7500, 9700];

