Skip to content

feat: fl aave v3 carry debt#584

Open
rajko-z wants to merge 6 commits into
mainfrom
feat/fl-aave-v3-carry-debt
Open

feat: fl aave v3 carry debt#584
rajko-z wants to merge 6 commits into
mainfrom
feat/fl-aave-v3-carry-debt

Conversation

@rajko-z

@rajko-z rajko-z commented May 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

Move from deprecated folder and refactor it

Running tests:
npx hardhat test ./test/actions/flashloan/aavev3-carry-debt.js --network hardhat

Type of change

  • New Feature - A change that adds functionality.
  • Bugfix - A change that resolves an issue.
  • Tweak - A change that modifies existing features.
  • Refactor - Code improvements without changing behavior.
  • Performance - Optimizations for gas or execution efficiency.
  • Documentation - Updates to docs, comments, or NatSpec.
  • Tests - Adding or updating test coverage.
  • Chore - Maintenance, dependencies, CI/CD, deployments or tooling updates.

Checks

For New Contracts

  • Does the new contract have tests?
  • Does the contract contain all the NatSpec needed (@title, @notice, @param, etc.)?
  • Is the contract deployed and the address added to the JSON file?
  • If the contract is registered, is the waitPeriod set correctly?
  • Is the contract verified and added to the Tenderly dashboard?
  • Is documentation written for the corresponding DFS action and added to GitBook?

@rajko-z rajko-z self-assigned this May 22, 2026
@octane-security-app

Copy link
Copy Markdown

Summary by Octane

New Contracts

  • FLAaveV3CarryDebt.sol: The FLAaveV3CarryDebt contract utilizes Aave V3 flash loans to generate debt for a user without returning funds, leveraging credit delegation.

Updated Contracts

  • FLAction.sol: The key change was adding @dev annotations for improved documentation clarity.

🔗 Commit Hash: bf6021e

@octane-security-app

Copy link
Copy Markdown

Overview

Vulnerabilities found: 3                                                                                
Severity breakdown: 1 High, 2 Low
Warnings found: 2                                                                                

Detailed findings

contracts/actions/flashloan/FLAaveV3CarryDebt.sol

  • Incomplete post-flashloan credit delegation check in FLAaveV3CarryDebt causes attacker to open Aave V3 debt on victim and receive borrowed funds. See more
  • Single-value FL return and variable-only delegation post-check in FLAaveV3CarryDebt cause multi-asset dynamic carry-debt reverts and incorrect allowance enforcement. See more
  • Missing repayment accounting and guardrails in FLAaveV3CarryDebt causes user funds to be stranded on action contract while debt is opened. See more

Warnings

contracts/actions/flashloan/FLAaveV3CarryDebt.sol

  • Missing on-chain mode enforcement and repayment handling in FLAaveV3CarryDebt causes deterministic reverts on mode-0/1 use. See more
  • Deferred debt minting during Aave V3 flash-loan callback in FLAaveV3CarryDebt causes unsound or unusable in-recipe Aave V3 checks. See more

🔗 Commit Hash: bf6021e
🛡️ Octane Dashboard: All vulnerabilities

@rajko-z rajko-z requested review from majkic99 and milosdjurica May 26, 2026 10:35
Comment thread contracts/actions/flashloan/FLAaveV3CarryDebt.sol Outdated
Comment thread contracts/actions/flashloan/FLAaveV3CarryDebt.sol
majkic99
majkic99 previously approved these changes May 27, 2026

@majkic99 majkic99 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small changes needed, but all in all lgtm

Comment thread contracts/actions/flashloan/FLAaveV3CarryDebt.sol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants