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

Feat/delta params #19

Merged
merged 79 commits into from
Feb 28, 2024
Merged
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
2c44aef
fix: stack too deep issue in GeometricMean strategy
clemlak Feb 22, 2024
5229d6b
feat: revamp G3MExtendedLib to solve stack too deep issues
clemlak Feb 22, 2024
c353233
feat: remove deltaL from allocate and deallocate
clemlak Feb 23, 2024
73a307f
chore: add terminology to README
clemlak Feb 23, 2024
20aaf26
feat: allocate and deallocate are using delta params
clemlak Feb 23, 2024
a62ec59
feat: add extra functions to compute deltas
clemlak Feb 23, 2024
ee29260
feat: allocate / deallocate validation funcs are now using deltaLiqui…
clemlak Feb 23, 2024
349ff7e
test: update MockStrategy to new IStrategy interface
clemlak Feb 23, 2024
63ceb04
feat: IStrategy now passes pool struct, splits liquidity validation
clemlak Feb 23, 2024
3378309
feat: updates ConstantSum to new IStrategy pattern
clemlak Feb 23, 2024
b96e20f
feat: update ConstantSumSolver
clemlak Feb 23, 2024
3fde14c
feat: updates LogNormal to new IStrategy pattern
clemlak Feb 23, 2024
d6739bf
feat: solve stack too deep issues
clemlak Feb 23, 2024
2431874
feat: update LogNormalSolver
clemlak Feb 23, 2024
e160d83
test: update ConstantSumTest
clemlak Feb 23, 2024
c7225b0
test: fix G3M allocate test
clemlak Feb 23, 2024
fbed68c
test: fix G3M init test
clemlak Feb 23, 2024
af27a1b
feat: fix deltaLiquidity in G3M
clemlak Feb 23, 2024
f14a4d2
feat: add allocateGivenDeltaX in G3MSolver
clemlak Feb 23, 2024
5114cc0
feat: rename returned variables in IStrategy
clemlak Feb 23, 2024
fbf5acd
feat: add allocateGivenDeltaY to G3MSolver
clemlak Feb 23, 2024
16b9c1a
test: fix G3M allocate tests
clemlak Feb 23, 2024
b8b034f
feat: fix deallocate in G3M strategy
clemlak Feb 23, 2024
94206c0
build: remove strategies deployment for now
clemlak Feb 23, 2024
8896e8a
test: fix G3M deallocate tests
clemlak Feb 23, 2024
f2e9205
feat: update validateAllocate and validateDeallocate in LogNormal str…
clemlak Feb 23, 2024
a5d0b0b
feat: add allocateGivenDeltaX and DeltaY to LogNormalSolver
clemlak Feb 23, 2024
fb6de61
test: update LogNormal allocate tests
clemlak Feb 23, 2024
2b715d1
test: check multiple allocations in a row in a G3M pool
clemlak Feb 23, 2024
ee8dc25
test: add revert check when maxDeltaX is reached in G3M strategy
clemlak Feb 23, 2024
0d3c003
test: add revert check when maxDeltaY is reached in G3M strategy
clemlak Feb 23, 2024
e15dec7
feat: rename returned variables of MockStrategy
clemlak Feb 23, 2024
85c97b4
feat: add new functions to compute deltas
clemlak Feb 23, 2024
bfd4244
feat: simplify G3M allocate and deallocate calculations
clemlak Feb 23, 2024
e34275e
feat: simplify LogNormal allocate and deallocate calculations
clemlak Feb 23, 2024
f1b309c
feat: small trick to fix stack too deep
clemlak Feb 23, 2024
78a4392
test: simplify allocate LogNormal test
clemlak Feb 23, 2024
e63cea8
feat: fix stack too deep errors
clemlak Feb 23, 2024
103208f
build: no more --via-ir, hell yeah
clemlak Feb 23, 2024
d0c6544
test: fix LogNormal allocate test
clemlak Feb 23, 2024
29b0aa8
feat: add computeDeltaLGivenDeltaY
clemlak Feb 23, 2024
e64e222
test: update deallocate LogNormal tests
clemlak Feb 23, 2024
de67775
chore: use named imports in DFMM contract
clemlak Feb 26, 2024
581403c
chore: use named imports in ScalingLib
clemlak Feb 26, 2024
a9522ce
chore: use named imports in DynamicParamLib
clemlak Feb 26, 2024
b74b536
feat: add InvalidTransfer error to IDFMM
clemlak Feb 26, 2024
3a74921
test: add deallocate scenario to MockStrategy
clemlak Feb 26, 2024
76a7e16
feat: move token balance checks after transfers into dedicated function
clemlak Feb 26, 2024
5d69908
chore: use named import for LPToken in DFMM
clemlak Feb 26, 2024
6d6a431
test: add slippage to deallocate in LogNormal tests
clemlak Feb 26, 2024
7c07c2f
chore: wip contribution guidelines
clemlak Feb 26, 2024
5013430
test: add token X and Y to DFMM setup
clemlak Feb 26, 2024
f69deac
test: update MockStrategy
clemlak Feb 26, 2024
8f5e4f3
test: update deallocate tests in DFMM
clemlak Feb 26, 2024
ea99cb0
test: update init tests for DFMM
clemlak Feb 26, 2024
7349792
test: remove duplicate test tokens
clemlak Feb 26, 2024
67a3cb0
test: update DFMM general setup
clemlak Feb 27, 2024
52a02c0
test: update DFMM setup
clemlak Feb 27, 2024
641fa4d
test: fix some DFMM init tests
clemlak Feb 27, 2024
fe27670
test: fix DFMM init reverts when not valid test
clemlak Feb 27, 2024
ad52810
test: fix DFMM init event check
clemlak Feb 27, 2024
3d8f5d0
test: fix DFMM init reserves check
clemlak Feb 27, 2024
9060465
forge install: forge-std
clemlak Feb 27, 2024
42e2a04
build: remove useless Forge remapping
clemlak Feb 27, 2024
fe2158b
test: skip broken test in ConstantSum tests
clemlak Feb 27, 2024
634bd15
Merge branch 'main' into feat/delta-params
clemlak Feb 27, 2024
8004319
chore: fix conflicts merge error
clemlak Feb 27, 2024
7c62c99
test: add WETH, fix wrong constructor param for DFMM
clemlak Feb 27, 2024
ef054f0
test: add WETH address check in DFMM
clemlak Feb 27, 2024
9672182
test: add skipped test for DFMM allocate
clemlak Feb 27, 2024
79141cf
fix: cleanup arb logic
kinrezC Feb 27, 2024
886a62c
fix optimalArbRaise signature
kinrezC Feb 27, 2024
c27b6bc
fmt
kinrezC Feb 27, 2024
9a98eb9
test: add DFMM receive revert check
clemlak Feb 28, 2024
fb38c0f
test: add DFMM receive ETH from WETH check
clemlak Feb 28, 2024
49fa6be
chore: add missing NatSpec for weth function
clemlak Feb 28, 2024
2f3cdb5
test: change test tokens metadata
clemlak Feb 28, 2024
6d4bc54
test: add LPToken metadata check
clemlak Feb 28, 2024
4480404
test: add DFMM lp tokens mint in init
clemlak Feb 28, 2024
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
Prev Previous commit
Next Next commit
fix optimalArbRaise signature
  • Loading branch information
kinrezC committed Feb 27, 2024
commit 886a62c95f7a64817511e758e199002ca9c0d77b
1 change: 0 additions & 1 deletion src/LogNormal/LogNormalExtendedLib.sol
Original file line number Diff line number Diff line change
@@ -463,7 +463,6 @@ function computeOptimalLower(

function computeOptimalRaise(
int256 S,
int256 rX,
int256 rY,
int256 L,
uint256 vUpper,
4 changes: 2 additions & 2 deletions src/LogNormal/LogNormalSolver.sol
Original file line number Diff line number Diff line change
@@ -363,7 +363,7 @@ contract LogNormalSolver {
uint256 vUpper
) public view returns (uint256) {
LogNormal.LogNormalParams memory params = fetchPoolParams(poolId);
(uint256 rx, uint256 ry, uint256 L) = getReservesAndLiquidity(poolId);
return computeOptimalRaise(int256(S), int256(rx), int256(ry), int256(L), vUpper, params);
(, uint256 ry, uint256 L) = getReservesAndLiquidity(poolId);
return computeOptimalRaise(int256(S), int256(ry), int256(L), vUpper, params);
}
}
Loading