Skip to content

431 almf aave leverage merkl farm contract#433

Merged
a17 merged 38 commits into
mainfrom
431-almf-aave-leverage-merkl-farm-contract
Dec 15, 2025
Merged

431 almf aave leverage merkl farm contract#433
a17 merged 38 commits into
mainfrom
431-almf-aave-leverage-merkl-farm-contract

Conversation

@omriss
Copy link
Copy Markdown
Collaborator

@omriss omriss commented Nov 14, 2025

ALMF 1.0, plasma: 0x027A98E492C6a16202914CC817fB6C3C88f834e0
ALMF 1.1, plasma: 0x96A059B23f3CA7C8685a52e6597D6398383Ea81F
ALMF 1.2, plasma: 0xe745791eA712dFB4a77274404A705664Ec6d20e0

  • deploy adapters: uniswap, erc4626, curve, balancer_v3_stable.
  • deploy ALMF 1.1
  • prepare script
    • Set router in balancer adapter
    • setStrategyImplementation for ALMF
    • add routes
    • create farms
  • create vault and strategy instance
  • setup thresholds in strategies
  • baseAsset (num 0/1)

BalancerV3Stable: 0xc73DBCFFADd43F87c0a37d39FA1460F5D80E3bca
CurvePlasma: 0xF93Ee7e1B1C5679974a004ce59DBdECEcB45475e
ERC4626: 0x63f83f6807C77FA33ccA12D9422B912C78f6F8ed
UniswapV3: 0x749D80930e0B6663c1D426dac0AA941836FDe53B

@omriss omriss linked an issue Nov 14, 2025 that may be closed by this pull request
@stability-builder
Copy link
Copy Markdown

Good luck!

Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 17, 2025

Codecov Report

❌ Patch coverage is 98.83139% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.79%. Comparing base (5205f8b) to head (5d2890b).
⚠️ Report is 40 commits behind head on main.

Files with missing lines Patch % Lines
src/strategies/libs/ALMFLib.sol 98.73% 1 Missing and 3 partials ⚠️
src/strategies/AaveLeverageMerklFarmStrategy.sol 98.46% 2 Missing ⚠️
src/strategies/libs/LeverageLendingLib.sol 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #433      +/-   ##
==========================================
+ Coverage   95.66%   95.79%   +0.13%     
==========================================
  Files         156      162       +6     
  Lines       13935    14533     +598     
  Branches     1316     1364      +48     
==========================================
+ Hits        13331    13922     +591     
- Misses        494      498       +4     
- Partials      110      113       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
Comment thread src/strategies/AaveLeverageMerklFarmStrategy.sol Fixed
@omriss omriss marked this pull request as ready for review November 19, 2025 08:18
a17
a17 previously approved these changes Nov 19, 2025
Comment on lines +44 to +65
function swap(
address atoken,
address tokenIn,
address tokenOut,
address recipient,
uint priceImpactTolerance
) external {
uint amountIn = IERC20(tokenIn).balanceOf(address(this));
uint amountOut;

IPool pool = IPool(IAToken(atoken).POOL());
if (atoken == tokenIn) {
amountOut = pool.withdraw(tokenOut, amountIn, recipient);
} else {
IERC20(tokenIn).forceApprove(address(pool), amountIn);
pool.supply(tokenIn, amountIn, recipient, 0);
// AToken is rebased token - 1:1, same decimals
amountOut = amountIn;
}

emit SwapInPool(atoken, tokenIn, tokenOut, recipient, priceImpactTolerance, amountIn, amountOut);
}
@a17 a17 merged commit 11fca7d into main Dec 15, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📜 ALMF | Aave Leverage Merkl Farm: Contract

3 participants