Skip to content

Gate manualLiquidation by EParticipant entitlement#313

Open
jordanschalm wants to merge 1 commit intomainfrom
claude/gate-liquidation-entitlement-DfnN6
Open

Gate manualLiquidation by EParticipant entitlement#313
jordanschalm wants to merge 1 commit intomainfrom
claude/gate-liquidation-entitlement-DfnN6

Conversation

@jordanschalm
Copy link
Copy Markdown
Member

Summary

  • Change manualLiquidation access from access(all) to access(FlowALPModels.EParticipant) so callers must hold an authorized Pool capability
  • Update the production manual_liquidation.cdc transaction and all test transactions to borrow the pool via an EParticipant-entitled capability from storage instead of the public path
  • Add admin parameter to liquidation test helpers (manualLiquidation, liquidateViaMockDex, batchManualLiquidation, batchLiquidateViaMockDex) so they grant the EParticipant cap before executing

Test plan

  • All 22 liquidation_phase1_test.cdc tests pass
  • All 39 cap_test.cdc entitlement tests pass
  • All fork liquidation tests pass (fork_liquidation_edge_cases, fork_oracle_failure, fork_multi_collateral_position, fork_multiple_positions_per_user)
  • Full test suite: 60 passed, 2 pre-existing failures (price_oracle_aggregator_test, paid_auto_balance_test — unrelated to this change)

https://claude.ai/code/session_01EScbPupCZD9LkCBWvQDaQ4

Change `manualLiquidation` access from `access(all)` to
`access(FlowALPModels.EParticipant)` so callers must hold an authorized
Pool capability. Update the production transaction and all test
transactions to borrow the pool via an EParticipant-entitled capability
from storage instead of the public path. Add `admin` parameter to
liquidation test helpers so they grant the EParticipant cap before
executing transactions.

https://claude.ai/code/session_01EScbPupCZD9LkCBWvQDaQ4
@jordanschalm jordanschalm requested a review from a team as a code owner April 9, 2026 17:51
@jordanschalm jordanschalm changed the base branch from main to v0 April 9, 2026 21:36
@jordanschalm jordanschalm changed the base branch from v0 to main April 9, 2026 22:10
@jordanschalm jordanschalm reopened this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants