Skip to content

FLO-21: Mandatory drawDownSink in createPosition() Contradicts Optional Design #230

@liobrasil

Description

@liobrasil

Severity: Low

Files Affected

  • cadence/contracts/FlowALPv1.cdc

Description

The createPosition() function within the Pool resource strictly requires callers to supply a non-optional issuanceSink parameter of type {DeFiActions.Sink}. However, the protocol's underlying architecture treats this draw-down sink as a completely optional feature. Both the internal setDrawDownSink() function and the user-facing provideSink() function accept an optional type ( {DeFiActions.Sink}?), explicitly permitting users to remove the sink by passing nil. Forcing users to supply a valid sink during position creation creates unnecessary friction, especially since the repaymentSource is correctly implemented as optional.

Recommendation

Update the createPosition() function signature to make the issuanceSink parameter optional, matching the behavior of the repaymentSource and the underlying state setters.


Parent Issue: #209

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions