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: integrate 1inch limit order v4 #616

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

feat: integrate 1inch limit order v4 #616

wants to merge 1 commit into from

Conversation

piavgh
Copy link
Member

@piavgh piavgh commented Nov 26, 2024

Why did we need it?

Related Issue

Release Note

How Has This Been Tested?

Screenshots (if appropriate):

@kyber-ci-bot
Copy link

kyber-ci-bot commented Nov 26, 2024

Test coverage changes:
Package Before After Diff
github.com/KyberNetwork/kyberswap-dex-lib/pkg/entity 27.40% 27.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ambient 11.80% 11.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer-v1 29.60% 32.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer-v2/composable-stable 36.50% 38.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer-v2/math 49.00% 49.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer-v2/stable 21.20% 24.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer-v2/weighted 28.90% 32.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/bancor-v21 25.10% 25.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/bancor-v3 34.90% 37.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/bebop 21.90% 21.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/bedrock/unieth 6.00% 6.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/clipper 23.60% 23.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/curve/plain 21.00% 21.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/curve/stable-meta-ng 9.00% 10.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/curve/stable-ng 11.40% 12.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/curve/tricrypto-ng 23.60% 24.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/curve/twocrypto-ng 22.90% 23.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dai-usds 10.50% 17.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/deltaswap-v1 36.20% 36.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dexalot 29.80% 29.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dodo/classical 25.50% 28.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dodo/dpp 10.80% 14.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dodo/dsp 11.20% 14.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dodo/dvm 11.70% 15.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dodo/libv1 73.30% 73.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dodo/libv2 37.60% 37.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ethena/susde 9.10% 9.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ether-vista 2.00% 2.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/etherfi/eeth 7.70% 7.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/etherfi/vampire 4.50% 4.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/etherfi/weeth 6.20% 6.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/fluid/dex-t1 53.10% 53.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/fluid/vault-t1 9.40% 9.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/frax/sfrxeth 9.00% 9.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/frax/sfrxeth-convertor 17.00% 17.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/generic-simple-rate 17.30% 21.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/gyroscope/2clp 30.30% 30.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/gyroscope/3clp 32.60% 32.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/gyroscope/eclp 50.10% 50.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/gyroscope/math 14.30% 14.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/hashflow-v3 34.80% 34.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/integral 21.90% 26.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/kelp/rseth 6.90% 6.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/lo1inch 0.00% 48.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/mantle/meth 14.20% 14.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/mkr-sky 14.30% 21.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/native-v1 31.00% 31.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/nomiswap/nomiswapstable 6.60% 7.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ondo-usdy 13.60% 13.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/puffer/pufeth 10.70% 10.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/renzo/ezeth 5.70% 5.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ringswap 11.00% 12.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/rocketpool/reth 10.40% 10.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/staderethx 15.50% 15.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/swaap-v2 19.90% 26.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/swell/rsweth 4.30% 4.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/swell/sweth 4.30% 4.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap-v1 8.60% 12.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap-v2 7.60% 9.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/usd0pp 13.70% 13.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/velocore-v2/cpmm 40.40% 42.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/velocore-v2/math 16.80% 16.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/velocore-v2/math/sd59x18 51.90% 51.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/velocore-v2/wombat-stable 19.10% 23.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/velodrome-v1 26.40% 29.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/velodrome-v2 28.50% 31.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/woofi-v2 37.40% 41.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/woofi-v21 36.40% 39.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/algebrav1 17.20% 18.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/balancer-composable-stable 40.00% 42.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/balancer/stable 29.50% 33.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/balancer/weighted 29.60% 32.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/camelot 27.50% 31.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/aave 19.00% 20.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/base 11.80% 13.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/compound 11.30% 12.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/meta 19.10% 20.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/plain-oracle 10.00% 11.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/tricrypto 25.00% 26.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/two 11.10% 12.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/dmm 19.40% 24.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/dodo 28.50% 31.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/equalizer 18.00% 22.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/fraxswap 13.40% 18.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/fulcrom 22.70% 26.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/fxdx 17.60% 19.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/gmx 22.90% 24.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/gmx-glp 22.70% 23.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/iziswap 19.40% 23.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/kokonut-crypto 19.90% 21.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/kyber-pmm 27.70% 31.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/lido 15.60% 21.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/lido-steth 12.70% 18.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/limitorder 27.40% 29.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/liquiditybookv20 24.90% 27.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/liquiditybookv21 33.10% 35.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/madmex 21.70% 23.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/makerpsm 23.30% 28.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/mantisswap 32.90% 36.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/maverickv1 49.00% 50.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/metavault 24.00% 25.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/nuriv2 14.60% 17.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/pancakev3 30.40% 32.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/platypus 18.70% 21.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/pol-matic 7.70% 15.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/quickperps 18.20% 20.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/ramsesv2 14.40% 17.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/saddle 46.70% 49.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/slipstream 14.00% 14.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/smardex 29.90% 34.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/solidly-v3 16.80% 19.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/swapbased-perp 24.00% 25.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/syncswap/syncswapclassic 20.10% 24.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/syncswap/syncswapstable 28.60% 32.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/synthetix 31.10% 32.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/traderjoev20 2.60% 2.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/traderjoev21 2.60% 2.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/uniswap 15.50% 16.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/uniswapv3 29.60% 31.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/usdfi 28.60% 33.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/velocimeter 29.80% 34.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/velodrome 29.40% 34.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/velodromev2 29.40% 34.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/vooi 22.00% 26.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/wombat/wombatlsd 20.20% 23.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/wombat/wombatmain 20.40% 23.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/woofiv2 36.10% 40.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/util 4.50% 4.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/util/abi 75.00% 75.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/util/bignumber 21.10% 16.70%

Comment on lines 14 to 15
limitOrderPoolReserve = "10000000000000000000"
LimitOrderPoolReserveUSD = 1000000000
Copy link
Member

Choose a reason for hiding this comment

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

reduce this so it's smaller than our LO

Copy link
Member

Choose a reason for hiding this comment

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

actually can we just use the actual reserve?

Copy link
Member Author

Choose a reason for hiding this comment

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

good point, I updated pool-service to use the real reserve

@piavgh piavgh force-pushed the feature/lo1inch branch 3 times, most recently from ee8db7d to d11324a Compare December 2, 2024 10:03
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.

3 participants