Skip to content

Remove EPosition auth requirement from FlowALP beta cap transactions#175

Open
jordanschalm wants to merge 5 commits intomainfrom
claude/fix-flowalp-beta-capability-XU9nk
Open

Remove EPosition auth requirement from FlowALP beta cap transactions#175
jordanschalm wants to merge 5 commits intomainfrom
claude/fix-flowalp-beta-capability-XU9nk

Conversation

@jordanschalm
Copy link
Member

@jordanschalm jordanschalm commented Feb 19, 2026

Description

This PR removes the FlowALPv0.EPosition authorization requirement from all FlowALP transactions. This should have been done while implementing per-position positions in #130.

This PR also re-works the AdversarialReentrancyConnectors, which are used in testing. Previously they used the EPosition entitlement; here they are changed to use a Position resource.

https://claude.ai/code/session_011G8tWcco9U7kPvNbf5kLgc

…uthorized withdrawals

The beta capability was granting both EParticipant and EPosition entitlements,
which gave any beta user direct access to pool-level withdraw, withdrawAndPull,
depositAndPush, lockPosition, unlockPosition, and borrowPosition methods. This
allowed withdrawals from any user's position by ID.

Beta users only need EParticipant (createPosition, depositToPosition) for normal
operations. This removes EPosition from both the publish and claim transactions
and their test copies.

https://claude.ai/code/session_011G8tWcco9U7kPvNbf5kLgc
@jordanschalm jordanschalm requested a review from a team as a code owner February 19, 2026 18:27
Copy link
Collaborator

@loic1 loic1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think create position tx and create position not managed tx need to be updated too
https://github.com/onflow/FlowALP/blob/main/cadence/transactions/flow-alp/position/create_position.cdc#L79

jordanschalm and others added 3 commits February 19, 2026 11:07
EPosition is an internal-only entitlement that should never be granted to
external users. Replace with EParticipant (for position creation) or
ERebalance (for rebalancing) as appropriate. Update adversarial reentrancy
test connector to use EParticipant and depositToPosition instead of
withdrawAndPull.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update AdversarialReentrancyConnectors to hold a PositionManager
capability instead of a Pool capability. The adversarial source now
attempts a reentrant withdrawal through the Position resource, which
is the realistic attack vector since external users access positions
through PositionManager, not the Pool directly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Bastian Müller <bastian@turbolent.com>
@jordanschalm
Copy link
Member Author

I think create position tx and create position not managed tx need to be updated too

👍 There were a few others too. Conceptually, EPosition should be internal-only and never granted in a transaction, so I removed all instances in **/transactions/**.

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.

4 participants

Comments