[CL-VALUE] fix(contracts) remediation b3: H5 BridgeLZ + H2 YieldVault timelock-gates #963

Closed
andrei wants to merge 4 commits from feature/claude-remediation-b3 into master
Owner

Что сделано

Batch-3 self-audit remediation (TDD, без редеплоя):

  • H5 (HIGH) EuropaBridgeLZ.withdrawReserves timelock-gated (propose/execute, parity с EuropaBridge). Прямой вызов → revert. 33 passing.
  • H2 (HIGH) EuropaYieldVault.setManagementFee timelock-gated (propose/execute, fee-bound up-front). Front-run комиссии закрыт. 39 passing.

Зачем

Закрыть admin-key timelock-gaps на money-move (parity с остальными контрактами).

План тестирования

hardhat: BridgeLZ 33 passing, YieldVault 39 passing. RED→GREEN на обоих (direct-revert + propose/execute round-trip + solvency/fee guards).

Где могу ошибаться

Редеплой на Base = CEO (связка с tier-1). H1 adminResolve (dispute UX trade-off) — отдельно.

## Что сделано Batch-3 self-audit remediation (TDD, без редеплоя): - **H5 (HIGH)** EuropaBridgeLZ.withdrawReserves timelock-gated (propose/execute, parity с EuropaBridge). Прямой вызов → revert. 33 passing. - **H2 (HIGH)** EuropaYieldVault.setManagementFee timelock-gated (propose/execute, fee-bound up-front). Front-run комиссии закрыт. 39 passing. ## Зачем Закрыть admin-key timelock-gaps на money-move (parity с остальными контрактами). ## План тестирования hardhat: BridgeLZ 33 passing, YieldVault 39 passing. RED→GREEN на обоих (direct-revert + propose/execute round-trip + solvency/fee guards). ## Где могу ошибаться Редеплой на Base = CEO (связка с tier-1). H1 adminResolve (dispute UX trade-off) — отдельно.
Self-audit 2026-07 H5 (HIGH): BridgeLZ.withdrawReserves был прямой DEFAULT_ADMIN_ROLE
(в EuropaBridge — за timelock). Компрометация admin → слив резервов 1 tx.

- disable direct withdrawReserves → revert; add proposeWithdrawReserves/executeWithdrawReserves
  через timelock (24h), solvency-guard сохранён на execute // AUDIT: self-audit H5
- event WithdrawReservesProposed
- tests: direct reverts + propose/execute round-trip + drain-guard (RED→GREEN), 33 passing
[CL-VALUE] fix(contracts) H2: YieldVault setManagementFee timelock-gated
Some checks failed
CI / Contracts (pull_request) Failing after 2m38s
PR Janitor / janitor (pull_request) Successful in 11s
CI / App (pull_request) Has been cancelled
CI / API (pull_request) Has been cancelled
CI / Telegram Mini App (pull_request) Has been cancelled
CI / Python SDK (pull_request) Has been cancelled
CI / Prisma Migrate Gate (pull_request) Has been cancelled
CI / Secrets Scan (pull_request) Has been cancelled
4754363f4e
Self-audit 2026-07 H2 (HIGH): setManagementFee был мгновенный DEFAULT_ADMIN_ROLE → admin
front-run'ил pending прямой withdrawal, извлекая до MAX_FEE 5%.

- disable direct setManagementFee → revert; add proposeManagementFee/executeManagementFee
  через timelock (24h), fee-bound валидируется up-front // AUDIT: self-audit H2
- event ManagementFeeProposed
- tests: direct reverts + propose/execute + fee>5% guard + non-admin; setup-callsites переведены; 39 passing
[CL-VALUE] fix(contracts) b3 review: executeManagementFee whenNotPaused + stale NatSpec
Some checks failed
CI / Contracts (pull_request) Failing after 2m38s
CI / Python SDK (pull_request) Successful in 28s
CI / Telegram Mini App (pull_request) Successful in 1m31s
CI / Secrets Scan (pull_request) Successful in 26s
PR Janitor / janitor (pull_request) Successful in 10s
CI / Prisma Migrate Gate (pull_request) Successful in 1m47s
CI / API (pull_request) Successful in 19m40s
CI / App (pull_request) Successful in 21m12s
f846eda252
Reviewer #963 findings:
- MEDIUM: executeManagementFee += whenNotPaused (parity с executeWithdrawReserves — не менять параметры во время pause)
- LOW: убран stale NatSpec (solvency/nonReentrant) над disabled withdrawReserves stub
72 passing (YieldVault 39 + BridgeLZ 33), 0 regressions.
andrei scheduled this pull request to auto merge when all checks succeed 2026-07-01 15:22:36 +00:00

⚠️ Конфликт с master — ветку нужно перебазировать вручную. Изменения в master перекрыли затронутые строки.

<!-- janitor-conflict --> ⚠️ Конфликт с master — ветку нужно перебазировать вручную. Изменения в master перекрыли затронутые строки.
[CL-VALUE] fix(contracts) b3 CI: SC-SecurityFixes setManagementFee→proposeManagementFee
All checks were successful
CI / Contracts (pull_request) Successful in 2m25s
CI / Telegram Mini App (pull_request) Successful in 1m35s
CI / Python SDK (pull_request) Successful in 25s
CI / Secrets Scan (pull_request) Successful in 18s
CI / Prisma Migrate Gate (pull_request) Successful in 1m38s
PR Janitor / janitor (pull_request) Successful in 8s
CI / API (pull_request) Successful in 18m46s
CI / App (pull_request) Successful in 20m32s
1ce19fc74a
CI Contracts fail на #963: SC-SecurityFixes.test.ts ждал FeeTooHigh на прямой setManagementFee,
но H2-фикс отключил прямой setter (timelock-gated). fee-bound теперь валидируется в
proposeManagementFee up-front. Тест обновлён на proposeManagementFee(600) → FeeTooHigh.
Полный hardhat suite: 769 passing, 0 failing.
Author
Owner

Закрываю как superseded: master уже содержит H5 (proposeWithdrawReserves) и H2 (proposeManagementFee) из параллельной remediation-работы. Дубль. Фиксы в проде через другой PR.

Закрываю как superseded: master уже содержит H5 (proposeWithdrawReserves) и H2 (proposeManagementFee) из параллельной remediation-работы. Дубль. Фиксы в проде через другой PR.
andrei closed this pull request 2026-07-01 17:21:35 +00:00
All checks were successful
CI / Contracts (pull_request) Successful in 2m25s
CI / Telegram Mini App (pull_request) Successful in 1m35s
CI / Python SDK (pull_request) Successful in 25s
CI / Secrets Scan (pull_request) Successful in 18s
CI / Prisma Migrate Gate (pull_request) Successful in 1m38s
PR Janitor / janitor (pull_request) Successful in 8s
CI / API (pull_request) Successful in 18m46s
CI / App (pull_request) Successful in 20m32s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
europa-tech-srl/europatech!963
No description provided.