Skip to content

FLOW-1: Double-refund on failed CREATE/DEPOSIT operations #16

@liobrasil

Description

@liobrasil

Severity: High

Files Affected

  • cadence/contracts/FlowYieldVaultsEVM.cdc
  • solidity/src/FlowYieldVaultsRequests.sol

Description

When a CREATE/DEPOSIT request fails after funds have been moved to Cadence, the returnFundsAndFail() function bridges funds directly back to the user's EVM address via bridgeFundsToEVMUser(), then calls completeProcessing() with success: false.

The EVM contract then credits the same amount to pendingUserBalances, allowing the user to claim via claimRefund(). The user receives funds twice: once via direct bridge, once via refund claim.

This is exploitable whenever the COA holds sufficient balance of the refund token (operational funding, dust accumulation, residual balances).

Recommendation

Implement single-path refund semantics. Either bridge directly to user OR credit pendingUserBalances, never both.


Parent Issue: #15

Metadata

Metadata

Assignees

Labels

HighHigh severity security finding⎈ QuantStampQuantStamp audit finding

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions