PodiumVaults non-commingled pool integration test #348

Closed
opened 2026-06-25 20:07:22 +00:00 by PlasticDigits · 6 comments
PlasticDigits commented 2026-06-25 20:07:22 +00:00 (Migrated from gitlab.com)

Parent

Transition Gap Analysis (#342) — P1 #8. Bundles H-C1.

Current codebase

  • PodiumVaults.sol supports setActivePool, setSeedPool, setFuturePool for external pool addresses (non-commingled wiring).
  • All Forge tests use default commingled wiring (address(vaults)).
  • Misconfigured production deploy could desync ledger vs ERC-20 balance, causing payout/roll failures or stranded DOUB.

Why needed

Production may use separate pool EOAs per tranche; without integration tests, roll/payout/tranche promotion with external pools is unverified.

Constraints / guardrails

  • Test-only wiring; do not change production defaults in deploy scripts unless required.
  • Full cycle: buy → roll → payout → tranche promotion with separate EOAs.
  • forge test must pass without doub.csv fork tests.

Relevant files

  • contracts/src/arena/PodiumVaults.sol
  • contracts/src/arena/TimeArena.sol
  • contracts/test/TimeArena.t.sol (reference patterns)
  • New: contracts/test/PodiumVaultsNonCommingled.t.sol (suggested)
  1. Deploy PodiumVaults with external EOAs for active/seed/future per category.
  2. Run buy routing, expired roll, winner payout, and tranche promotion.
  3. Assert ERC-20 balances match ledger accounting on each pool.
  4. Document wiring expectations in PARAMETERS.md or time-arena.md if missing.

Acceptance criteria

  • New integration test passes in forge test.
  • Covers at least one category with non-commingled pools through roll.
  • Asserts no stranded DOUB on wrong pool after promotion.

Test plan

Path Command
Contracts cd contracts && forge test --match-contract PodiumVaultsNonCommingled
Full suite cd contracts && forge test (exclude fork airdrop if no doub.csv)

Attack / abuse test plan

  • Test misconfigured pool address reverts or fails safe (document expected revert strings).
  • Payout cannot drain wrong tranche pool.

Verification criteria

  • forge test PASS for new contract test.
  • Test documents pool setup in comments for operators.
## Parent [Transition Gap Analysis (#342)](https://gitlab.com/PlasticDigits/yieldomega/-/issues/342) — P1 #8. Bundles **H-C1**. ## Current codebase - `PodiumVaults.sol` supports `setActivePool`, `setSeedPool`, `setFuturePool` for external pool addresses (non-commingled wiring). - All Forge tests use default commingled wiring (`address(vaults)`). - Misconfigured production deploy could desync ledger vs ERC-20 balance, causing payout/roll failures or stranded DOUB. ## Why needed Production may use separate pool EOAs per tranche; without integration tests, roll/payout/tranche promotion with external pools is unverified. ## Constraints / guardrails - Test-only wiring; do not change production defaults in deploy scripts unless required. - Full cycle: buy → roll → payout → tranche promotion with separate EOAs. - `forge test` must pass without `doub.csv` fork tests. ## Relevant files - `contracts/src/arena/PodiumVaults.sol` - `contracts/src/arena/TimeArena.sol` - `contracts/test/TimeArena.t.sol` (reference patterns) - New: `contracts/test/PodiumVaultsNonCommingled.t.sol` (suggested) ## Recommended direction 1. Deploy `PodiumVaults` with external EOAs for active/seed/future per category. 2. Run buy routing, expired roll, winner payout, and tranche promotion. 3. Assert ERC-20 balances match ledger accounting on each pool. 4. Document wiring expectations in `PARAMETERS.md` or `time-arena.md` if missing. ## Acceptance criteria - [ ] New integration test passes in `forge test`. - [ ] Covers at least one category with non-commingled pools through roll. - [ ] Asserts no stranded DOUB on wrong pool after promotion. ## Test plan | Path | Command | |------|---------| | Contracts | `cd contracts && forge test --match-contract PodiumVaultsNonCommingled` | | Full suite | `cd contracts && forge test` (exclude fork airdrop if no `doub.csv`) | ## Attack / abuse test plan - Test misconfigured pool address reverts or fails safe (document expected revert strings). - Payout cannot drain wrong tranche pool. ## Verification criteria - `forge test` PASS for new contract test. - Test documents pool setup in comments for operators.
PlasticDigits commented 2026-06-25 20:07:49 +00:00 (Migrated from gitlab.com)

mentioned in issue #342

mentioned in issue #342
PlasticDigits commented 2026-06-28 02:30:10 +00:00 (Migrated from gitlab.com)

We need one, consistent way to always manage podium vaults. We should not have multiple EOA, instead poriudm vaults should be managed by smart contracts with a single global admin/governance address

We need one, consistent way to always manage podium vaults. We should not have multiple EOA, instead poriudm vaults should be managed by smart contracts with a single global admin/governance address
PlasticDigits commented 2026-06-28 02:49:59 +00:00 (Migrated from gitlab.com)

mentioned in commit 9674d3b1c9

mentioned in commit 9674d3b1c9af67f4c51dceae19622862f4d38617
PlasticDigits commented 2026-06-28 02:50:16 +00:00 (Migrated from gitlab.com)

mentioned in merge request !529

mentioned in merge request !529
PlasticDigits commented 2026-06-28 04:49:47 +00:00 (Migrated from gitlab.com)

mentioned in commit 670ba249ea

mentioned in commit 670ba249ead60d58151e26412ab3a04c50da2a75
PlasticDigits commented 2026-06-28 04:57:11 +00:00 (Migrated from gitlab.com)

Verification — issue #348 (PodiumVaults non-commingled pool integration test)

Verified on main (2026-06-28). All acceptance and verification criteria PASS.

Acceptance criteria

Criterion Result How verified
New integration test passes in forge test PASS cd contracts && forge test --match-contract PodiumVaultsNonCommingled — 5/5 passed
Covers at least one category with non-commingled pools through roll PASS test_nonCommingled_lastBuy_buy_roll_payout_promotion — category 0 (Last Buy) wired to three PodiumTranchePool contracts; buy → roll → 4∶2∶1 payout → tranche promotion
Asserts no stranded DOUB on wrong pool after promotion PASS Same test asserts seed/future ledger and contract balances are zero after promotion

Test plan

Path Command Result
Targeted contract test cd contracts && forge test --match-contract PodiumVaultsNonCommingled PASS (5 tests)
Full suite (no doub.csv) cd contracts && forge test --no-match-contract DoubAirdropMegaethFork PASS (234 tests)
Fork airdrop (no doub.csv) DoubAirdropMegaethFork SKIP — gitignored airdrop/doub.csv absent (expected per issue constraints)

Attack / abuse coverage

Scenario Result Test
Misconfigured EOA pool reverts on roll PASS test_nonCommingled_misconfigured_eoa_pool_reverts_on_roll — PodiumVaults: external pool not contract
Unauthorised pool disburse PASS test_nonCommingled_pushTo_reverts_not_operator — PodiumTranchePool: not operator
Payout cannot drain wrong tranche pool PASS Full-cycle test verifies 4∶2∶1 from active pool only; seed/future empty post-promotion

Documentation & invariants

Item Result
Pool setup documented in test comments PASS — PodiumVaultsNonCommingled.t.sol header documents category-0 external pools + commingled default for categories 1–3
PARAMETERS.md pool wiring section PASS — #podiumvaults-pool-wiring-gitlab-348
time-arena.md pool custody section PASS — #podiumvaults-pool-custody-gitlab-348
Invariants INV-PODIUM-VAULTS-348-* PASS — docs/testing/invariants-and-business-logic.md §348

Notes on comment thread

The optional non-commingled path uses PodiumTranchePool smart contracts (not EOAs) with PodiumVaults as sole operator — aligned with the direction in the latest comment. DeployDev/production defaults remain commingled (address(PodiumVaults)).

Follow-ups

  • Consider a short operator runbook entry if production ever adopts per-category PodiumTranchePool wiring (deploy order, setArena, owner set*Pool calls).

Closing as verified — no repo changes required.

## Verification — issue #348 (PodiumVaults non-commingled pool integration test) Verified on `main` (2026-06-28). All acceptance and verification criteria **PASS**. ### Acceptance criteria | Criterion | Result | How verified | |-----------|--------|--------------| | New integration test passes in `forge test` | **PASS** | `cd contracts && forge test --match-contract PodiumVaultsNonCommingled` — 5/5 passed | | Covers at least one category with non-commingled pools through roll | **PASS** | `test_nonCommingled_lastBuy_buy_roll_payout_promotion` — category 0 (Last Buy) wired to three `PodiumTranchePool` contracts; buy → roll → 4∶2∶1 payout → tranche promotion | | Asserts no stranded DOUB on wrong pool after promotion | **PASS** | Same test asserts seed/future ledger and contract balances are zero after promotion | ### Test plan | Path | Command | Result | |------|---------|--------| | Targeted contract test | `cd contracts && forge test --match-contract PodiumVaultsNonCommingled` | **PASS** (5 tests) | | Full suite (no `doub.csv`) | `cd contracts && forge test --no-match-contract DoubAirdropMegaethFork` | **PASS** (234 tests) | | Fork airdrop (no `doub.csv`) | `DoubAirdropMegaethFork` | **SKIP** — gitignored `airdrop/doub.csv` absent (expected per issue constraints) | ### Attack / abuse coverage | Scenario | Result | Test | |----------|--------|------| | Misconfigured EOA pool reverts on roll | **PASS** | `test_nonCommingled_misconfigured_eoa_pool_reverts_on_roll` — `PodiumVaults: external pool not contract` | | Unauthorised pool disburse | **PASS** | `test_nonCommingled_pushTo_reverts_not_operator` — `PodiumTranchePool: not operator` | | Payout cannot drain wrong tranche pool | **PASS** | Full-cycle test verifies 4∶2∶1 from active pool only; seed/future empty post-promotion | ### Documentation & invariants | Item | Result | |------|--------| | Pool setup documented in test comments | **PASS** — `PodiumVaultsNonCommingled.t.sol` header documents category-0 external pools + commingled default for categories 1–3 | | `PARAMETERS.md` pool wiring section | **PASS** — `#podiumvaults-pool-wiring-gitlab-348` | | `time-arena.md` pool custody section | **PASS** — `#podiumvaults-pool-custody-gitlab-348` | | Invariants `INV-PODIUM-VAULTS-348-*` | **PASS** — `docs/testing/invariants-and-business-logic.md` §348 | ### Notes on comment thread The optional non-commingled path uses **`PodiumTranchePool` smart contracts** (not EOAs) with `PodiumVaults` as sole operator — aligned with the direction in the latest comment. DeployDev/production defaults remain **commingled** (`address(PodiumVaults)`). ### Follow-ups - Consider a short operator runbook entry if production ever adopts per-category `PodiumTranchePool` wiring (deploy order, `setArena`, owner `set*Pool` calls). Closing as verified — no repo changes required.
PlasticDigits (Migrated from gitlab.com) closed this issue 2026-06-28 04:57:12 +00:00
Sign in to join this conversation.
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#348
No description provided.