Skip to content

FLO-17: Refund Destination Changes After Recurring Config Updates #226

@liobrasil

Description

@liobrasil

Severity: Medium

Files Affected

  • cadence/contracts/FlowALPRebalancerv1.cdc

Description

FlowALPRebalancerv1.Rebalancer.setRecurringConfig(_:) assigns self.recurringConfig = config and then calls cancelAllScheduledTransactions(). cancelScheduledTransaction(id:) refunds fees into self.recurringConfig.txFunder. However, because the config is overwritten before cancellation, refunds for transactions originally funded by the previous txFunder will be deposited into the new txFunder. This breaks the invariant that fees are refunded to the party that originally paid them and can also cause cancellation to revert if the new funder’s sink constraints differ. This could lead to misrouting of funds between funders, confusing accounting for operators, and bricking cancellation/removal flows.

Recommendation

Consider canceling the existing scheduled transactions using the old funder before replacing the config.


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