Remove EPosition auth requirement from FlowALP beta cap transactions#175
Open
jordanschalm wants to merge 5 commits intomainfrom
Open
Remove EPosition auth requirement from FlowALP beta cap transactions#175jordanschalm wants to merge 5 commits intomainfrom
jordanschalm wants to merge 5 commits intomainfrom
Conversation
…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
loic1
reviewed
Feb 19, 2026
Collaborator
loic1
left a comment
There was a problem hiding this comment.
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
turbolent
reviewed
Feb 19, 2026
cadence/tests/transactions/flow-alp/beta/claim_and_save_beta_cap.cdc
Outdated
Show resolved
Hide resolved
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>
jordanschalm
commented
Feb 19, 2026
cadence/tests/transactions/flow-alp/pool-management/03_grant_beta.cdc
Outdated
Show resolved
Hide resolved
Co-authored-by: Bastian Müller <bastian@turbolent.com>
Member
Author
👍 There were a few others too. Conceptually, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR removes the
FlowALPv0.EPositionauthorization 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 theEPositionentitlement; here they are changed to use aPositionresource.https://claude.ai/code/session_011G8tWcco9U7kPvNbf5kLgc