-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Context
Current Gap: Limited end-to-end testing with DeFi Actions components.
Missing Test Coverage:
-
Source Failures
- topUpSource returns vault with less than requested amount
- topUpSource reverts on withdrawal
- topUpSource provides wrong token type
- Error handling and position state
-
Sink Failures
- drawDownSink rejects deposit
- drawDownSink accepts partial amount
- drawDownSink provides wrong type
- Rebalance failure handling
-
Swapper Incorrect Amounts
- Swapper returns less tokens than quoted
- Swapper returns wrong token type
- Slippage protection validation
- Transaction revert on excessive slippage
-
Flash Loan Callback Manipulation
- Flash loan callback attempts reentrancy
- Callback modifies global state unexpectedly
- Callback fails to repay loan
- Proper error handling and rollback
-
Reentrancy via DeFi Actions
- Malicious Sink calls back into protocol during deposit
- Malicious Source calls back during withdrawal
- Reentrancy guards effectiveness
- State consistency validation
-
Malicious Connector Contracts
- Connector attempts to drain funds
- Connector provides false quotes
- Connector fails to return vaults
- Protocol defensive validation
Recommended Tests:
Test: topUpSource returns 50% of requested amount
Test: drawDownSink rejects deposit, rebalance handles failure
Test: Swapper returns 10% less than quoted, slippage check
Test: Flash loan callback attempts reentrancy, guard blocks
Test: Malicious Sink calls protocol during deposit, reentrancy blocked
Test: Connector provides false quote, transaction validates and reverts
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels