docs(arena): CHARM-scaled XP invariants and verification (#304) #452

Merged
PlasticDigits merged 1 commit from local1/304-impl-xp-charm-scale into main 2026-06-10 10:59:14 +00:00
PlasticDigits commented 2026-06-10 09:20:47 +00:00 (Migrated from gitlab.com)

Summary

Documents and verifies end-to-end CHARM-weight XP scaling (#304). Onchain, frontend, and indexer already use ArenaXp.xpForCharm(charmWad); this MR adds INV-TIME-ARENA-XP-CHARM-SCALE, product/skill crosslinks, PARAMETERS table row, mid-band frontend test, and test_xp_min_vs_max_charm_single_buy.

Test plan

  • cd contracts && forge test --match-contract ArenaXp -vv
  • cd contracts && forge test --match-test test_xp_ -vv
  • cd frontend && npm test -- --run src/lib/arenaXpMath.test.ts src/pages/arena/arenaBuyProjectedEffects.test.ts
  • cd indexer && cargo test arena_wallet_stats

Closes #304 verification checklist (implementation was pre-existing; this MR completes docs/invariants).


Note

Low Risk
Documentation and test-only changes; no modifications to TimeArena XP or buy paths.

Overview
This MR documents and verifies GitLab #304: Time Arena XP per buy scales with CHARM weight cleared via ArenaXp.xpForCharm(charmWad) (1 at min band → 10 at max), with DOUB and CRED paths treated the same. It does not change onchain buy logic; it closes the verification checklist for behavior that was already wired in _finishBuy.

Docs & invariants: Adds INV-TIME-ARENA-XP-CHARM-SCALE plus a dedicated §304 detail block (min/max, onchain XpGained, CRED parity, indexer xp_gained, checkout +Xxp preview). Product docs (arena-v2, time-arena), PARAMETERS.md, and play-time-arena-doub now cross-link #304 explicitly.

Tests: New Forge test_xp_min_vs_max_charm_single_buy (1 vs 10 XP, 10× ratio) and a mid-band assertion in arenaXpMath.test.ts (#304 label).

Reviewed by Cursor Bugbot for commit f0a6a6a90f. Bugbot is set up for automated code reviews on this repo. Configure here.

## Summary Documents and verifies end-to-end CHARM-weight XP scaling ([#304](https://gitlab.com/PlasticDigits/yieldomega/-/issues/304)). Onchain, frontend, and indexer already use `ArenaXp.xpForCharm(charmWad)`; this MR adds **`INV-TIME-ARENA-XP-CHARM-SCALE`**, product/skill crosslinks, PARAMETERS table row, mid-band frontend test, and `test_xp_min_vs_max_charm_single_buy`. ## Test plan - [x] `cd contracts && forge test --match-contract ArenaXp -vv` - [x] `cd contracts && forge test --match-test test_xp_ -vv` - [x] `cd frontend && npm test -- --run src/lib/arenaXpMath.test.ts src/pages/arena/arenaBuyProjectedEffects.test.ts` - [x] `cd indexer && cargo test arena_wallet_stats` Closes #304 verification checklist (implementation was pre-existing; this MR completes docs/invariants). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Documentation and test-only changes; no modifications to TimeArena XP or buy paths. > > **Overview** > This MR **documents and verifies** GitLab **#304**: Time Arena XP per buy scales with **CHARM weight cleared** via `ArenaXp.xpForCharm(charmWad)` (**1** at min band → **10** at max), with **DOUB and CRED** paths treated the same. It does **not** change onchain buy logic; it closes the verification checklist for behavior that was already wired in `_finishBuy`. > > **Docs & invariants:** Adds **`INV-TIME-ARENA-XP-CHARM-SCALE`** plus a dedicated §304 detail block (min/max, onchain `XpGained`, CRED parity, indexer `xp_gained`, checkout **`+Xxp`** preview). Product docs (`arena-v2`, `time-arena`), **`PARAMETERS.md`**, and **`play-time-arena-doub`** now cross-link #304 explicitly. > > **Tests:** New Forge **`test_xp_min_vs_max_charm_single_buy`** (1 vs 10 XP, 10× ratio) and a mid-band assertion in **`arenaXpMath.test.ts`** (#304 label). > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit f0a6a6a90f70bd183c90d8853649817707ce7dcf. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
PlasticDigits commented 2026-06-10 09:20:54 +00:00 (Migrated from gitlab.com)

mentioned in issue #304

mentioned in issue #304
project_80561744_bot_5118c68a88bff95eacb6ab1c47c19cae commented 2026-06-10 09:20:57 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
project_80561744_bot_5118c68a88bff95eacb6ab1c47c19cae commented 2026-06-10 09:21:06 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits (Migrated from gitlab.com) merged commit cd85e51056 into main 2026-06-10 10:59:14 +00:00
PlasticDigits commented 2026-06-10 10:59:16 +00:00 (Migrated from gitlab.com)

mentioned in commit cd85e51056

mentioned in commit cd85e51056df5616d4199f99df0e0e76d46b0b98
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/yieldomega!452
No description provided.