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
Severity: Low
Files Affected
cadence/contracts/FlowALPv1.cdcDescription
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