Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: DFMM init now returns the totalLiquidity of the pool #75

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/DFMM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ contract DFMM is IDFMM {
pool.totalLiquidity
);

return (poolId, reserves, totalLiquidity - BURNT_LIQUIDITY);
return (poolId, reserves, totalLiquidity);
}

/// @inheritdoc IDFMM
Expand Down
3 changes: 1 addition & 2 deletions test/DFMM/unit/Init.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down
Loading