From 80407890eb22f61f54e7b69fe1af71a1771510af Mon Sep 17 00:00:00 2001 From: clemlak Date: Tue, 19 Mar 2024 11:25:00 +0400 Subject: [PATCH] fix: DFMM init now returns the totalLiquidity of the pool --- src/DFMM.sol | 2 +- test/DFMM/unit/Init.t.sol | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/DFMM.sol b/src/DFMM.sol index ea727b3e..7251bb4e 100644 --- a/src/DFMM.sol +++ b/src/DFMM.sol @@ -136,7 +136,7 @@ contract DFMM is IDFMM { pool.totalLiquidity ); - return (poolId, reserves, totalLiquidity - BURNT_LIQUIDITY); + return (poolId, reserves, totalLiquidity); } /// @inheritdoc IDFMM diff --git a/test/DFMM/unit/Init.t.sol b/test/DFMM/unit/Init.t.sol index 07625d3f..695d967d 100644 --- a/test/DFMM/unit/Init.t.sol +++ b/test/DFMM/unit/Init.t.sol @@ -31,8 +31,7 @@ contract DFMMInit is DFMMSetUp, Script { function test_DFMM_init_ReturnsStrategyInitialReserves() public { (, uint256[] memory reserves, uint256 totalLiquidity) = dfmm.init(getDefaultPoolParams(defaultData)); - // A bit of the liquidity is burnt - assertEq(initialLiquidity - 1000, totalLiquidity); + assertEq(initialLiquidity, totalLiquidity); assertEq(initialReserveX, reserves[0]); assertEq(initialReserveY, reserves[1]); }