Skip to content

Conversation

@sunspirit99
Copy link
Contributor

@sunspirit99 sunspirit99 commented Jan 13, 2026

User description

Why did we need it?

Related Issue

Release Note

How Has This Been Tested?

Screenshots (if appropriate):


PR Type

Enhancement, Tests


Description

  • Integrated Euler Swap V2 with complete pool simulator, tracker, and pool list updater implementations

  • Refactored existing Euler Swap V1 code into versioned package structure (v1 namespace) with shared utilities

  • Created shared package containing common types, constants, utilities, and error definitions for both V1 and V2

  • Implemented comprehensive hook system for V2 swap operations with before/after swap callbacks and dynamic fee calculation

  • Added mathematical utilities for V2 curve calculations including square root, division, and curve point functions

  • Registered V1 and V2 pool simulators in msgpack serialization and pool types registry

  • Added integration tests for V2 ComputeQuote functionality validating against on-chain values

  • Included complete ABI definitions for V1 and V2 contracts (EulerSwap, EVault, EVC, Registry, Router, and Hook contracts)

  • Updated value object registry to support ExchangeEulerSwapV2 exchange type


Diagram Walkthrough

flowchart LR
  A["Euler Swap V1<br/>Original Code"] -->|"Refactor into<br/>v1 namespace"| B["V1 Package<br/>pool_simulator<br/>pool_tracker<br/>pool_list_updater"]
  C["Shared Package<br/>types, constants<br/>utilities, errors"] -->|"Used by"| B
  C -->|"Used by"| D["V2 Package<br/>pool_simulator<br/>pool_tracker<br/>pool_list_updater"]
  D -->|"Includes"| E["V2 Hooks System<br/>beforeSwap<br/>afterSwap<br/>getFee"]
  D -->|"Uses"| F["V2 Math Utils<br/>sqrt, division<br/>curve functions"]
  B -->|"Register"| G["Msgpack & Pool Types<br/>Registry"]
  D -->|"Register"| G
  H["Contract ABIs<br/>V1 & V2"] -->|"Load"| B
  H -->|"Load"| D
  D -->|"Validate with"| I["Integration Tests"]
Loading

File Walkthrough

Relevant files
Enhancement
23 files
pool_simulator.go
Euler Swap V2 Pool Simulator Implementation                           

pkg/liquidity-source/euler-swap/v2/pool_simulator.go

  • New file implementing pool simulator for Euler Swap V2 with 782 lines
    of core swap logic
  • Implements CalcAmountOut and CalcAmountIn methods for swap amount
    calculations
  • Includes solvency checking, collateral value tracking, and curve
    verification
  • Supports swap hooks with before/after swap callbacks and dynamic fee
    calculation
+782/-0 
pool_tracker.go
Euler Swap V2 Pool State Tracker                                                 

pkg/liquidity-source/euler-swap/v2/pool_tracker.go

  • New file implementing pool state tracker for Euler Swap V2 with 576
    lines
  • Fetches and updates pool data including vault states, reserves, and
    dynamic parameters
  • Handles collateral tracking and LTV (Loan-to-Value) calculations
    across multiple vaults
  • Supports hook tracking for swap operations
+576/-0 
pool_list_updater.go
Euler Swap V2 Pool List Updater                                                   

pkg/liquidity-source/euler-swap/v2/pool_list_updater.go

  • New file implementing pool discovery and initialization for Euler Swap
    V2 with 252 lines
  • Fetches pool addresses from factory and retrieves static/dynamic
    parameters
  • Initializes pool entities with token pairs and configuration data
  • Supports batch processing with metadata-based offset tracking
+252/-0 
math.go
Euler Swap V2 Mathematical Utilities                                         

pkg/liquidity-source/euler-swap/v2/math.go

  • New file with 217 lines of mathematical utility functions for curve
    calculations
  • Implements square root, division, and multiplication operations with
    rounding
  • Provides curve point calculation functions _F and _FInverse for swap
    pricing
  • Handles precision and overflow checks for uint256 arithmetic
+217/-0 
types.go
Euler Swap V2 Type Definitions                                                     

pkg/liquidity-source/euler-swap/v2/types.go

  • New file defining data structures for Euler Swap V2 with 97 lines
  • Defines StaticExtra, DynamicParams, and Extra types for pool
    configuration
  • Includes RPC response types for static/dynamic parameters and tracker
    data
  • Supports vault states, collateral tracking, and hook configuration
+97/-0   
math.go
Refactor math module for v1 versioning and shared constants

pkg/liquidity-source/euler-swap/v1/math.go

  • Changed package name from eulerswap to v1 to support versioning
  • Moved global constants and variables to shared package for reuse
    across versions
  • Updated error references to use shared.ErrDivisionByZero
  • Updated constant references to use shared.E18Int and shared.E36
+6/-16   
types.go
Add shared type definitions for euler-swap versions           

pkg/liquidity-source/euler-swap/shared/types.go

  • Created new shared types file with common data structures
  • Defined VaultInfo, ReserveRPC, VaultRPC, AccountLiquidityRPC for RPC
    interactions
  • Defined VaultState with JSON serialization tags for state management
  • Defined SwapInfo and TrackerData for swap and tracking operations
+80/-0   
pooltypes.go
Support euler-swap v1 and v2 in pool types registry           

pkg/pooltypes/pooltypes.go

  • Updated import to use versioned eulerswapv1 package instead of generic
    eulerswap
  • Added new import for eulerswapv2 package
  • Added EulerSwapV2 field to Types struct
  • Updated DexType mappings to use versioned package constants
+5/-2     
constant.go
Extract shared constants for euler-swap versions                 

pkg/liquidity-source/euler-swap/shared/constant.go

  • Created shared constants file with pool, factory, vault, and EVC
    method names
  • Defined batch size and buffer swap limit constants
  • Moved VirtualAmount, E36, MaxUint112, E18Int from v1 math module
  • Added new constant RA for calculations
+56/-0   
types.go
Add v1-specific type definitions for pool management         

pkg/liquidity-source/euler-swap/v1/types.go

  • Created v1-specific types file with pool configuration structures
  • Defined PoolExtra, StaticExtra, Extra for pool state management
  • Defined ParamsRPC for RPC parameter decoding with ABI tags
+53/-0   
exchange.go
Register euler-swap v2 exchange types in value objects     

pkg/valueobject/exchange.go

  • Added ExchangeEulerSwapV2 constant for v2 exchange type
  • Added ExchangeUniswapV4EulerV2 constant for uniswap v4 euler v2
  • Added ExchangeEulerSwapV2 to SingleSwapSourceSet map
+3/-0     
hooks.go
Implement hook system for euler-swap v2 swaps                       

pkg/liquidity-source/euler-swap/v2/hooks/hooks.go

  • Created hooks interface and factory pattern for v2 swap hooks
  • Defined hook operation flags (HookBeforeSwap, HookGetFee,
    HookAfterSwap)
  • Defined parameter types for hook operations (GetFeeParams,
    BeforeSwapParams, AfterSwapParams)
  • Implemented hook factory registration and retrieval mechanism
+83/-0   
utils.go
Add shared utility functions for vault operations               

pkg/liquidity-source/euler-swap/shared/utils.go

  • Created utility functions for vault asset conversions
  • Implemented ConvertToAssets for share-to-asset conversion with virtual
    amount
  • Implemented SubTill0 for safe subtraction clamped to zero
  • Implemented DecodeCap for decoding encoded capacity values
+46/-0   
abis.go
Add ABI loading for euler-swap v2 contracts                           

pkg/liquidity-source/euler-swap/v2/abis.go

  • Created ABI loader for v2 pool, registry, vault, EVC, and router
    contracts
  • Implemented embedded file reading for ABI JSON files
  • Initialized ABIs on package load with error handling
+44/-0   
abis.go
Add ABI loading for euler-swap v1 contracts                           

pkg/liquidity-source/euler-swap/v1/abis.go

  • Created ABI loader for v1 pool, factory, vault, EVC, and router
    contracts
  • Implemented ABI initialization from embedded JSON data
  • Added error handling for ABI parsing failures
+36/-0   
base_hook.go
Implement base hook for v2 swap operations                             

pkg/liquidity-source/euler-swap/v2/hooks/base_hook.go

  • Created base hook implementation with default no-op behavior
  • Defined hook error types (ErrHookNotSupported, ErrHookCallFailed)
  • Implemented Hook interface methods with default implementations
+38/-0   
errors.go
Define shared error types for euler-swap                                 

pkg/liquidity-source/euler-swap/shared/errors.go

  • Created shared error definitions for euler-swap operations
  • Defined errors for validation, swap execution, and solvency checks
+18/-0   
embed.go
Add hook ABI embedding for euler-swap v2                                 

pkg/liquidity-source/euler-swap/v2/hooks/embed.go

  • Created embedded ABI file loader for v2 hook contracts
  • Initialized hook ABI from embedded JSON on package load
+21/-0   
constant.go
Add v2-specific constants and configuration                           

pkg/liquidity-source/euler-swap/v2/constant.go

  • Created v2-specific constants file
  • Defined DexType as "euler-swap-v2"
  • Set default gas limit to 400000 for v2 operations
+7/-0     
config.go
Move config to shared package for version reuse                   

pkg/liquidity-source/euler-swap/shared/config.go

  • Moved config file from eulerswap package to shared package
  • Changed package declaration from eulerswap to shared
+1/-1     
constant.go
Add v1-specific constants and configuration                           

pkg/liquidity-source/euler-swap/v1/constant.go

  • Created v1-specific constants file
  • Defined DexType as "euler-swap"
  • Set default gas limit to 640910 for v1 operations
+7/-0     
embed.go
Add ABI file embedding for euler-swap v2                                 

pkg/liquidity-source/euler-swap/v2/embed.go

  • Created embedded file system for v2 ABI files
  • Embedded all JSON files from abis/ directory
+6/-0     
embed.go
Update v1 embed package declaration                                           

pkg/liquidity-source/euler-swap/v1/embed.go

  • Updated package name from eulerswap to v1
+1/-1     
Refactoring
4 files
pool_simulator.go
Euler Swap V1 Package Restructuring and Refactoring           

pkg/liquidity-source/euler-swap/v1/pool_simulator.go

  • Refactored package from eulerswap to v1 namespace
  • Migrated error handling and constants to shared package
    (shared.ErrSwapIsPaused, shared.BufferSwapLimit)
  • Updated SwapInfo struct field names to use PascalCase (e.g., reserves
    Reserves)
  • Fixed fee calculation to use bignumber.ZeroBI instead of
    integer.Zero()
+69/-78 
pool_tracker.go
Euler Swap V1 Pool Tracker Package Restructuring                 

pkg/liquidity-source/euler-swap/v1/pool_tracker.go

  • Refactored package from eulerswap to v1 namespace
  • Updated imports to use shared package for types and constants
  • Changed method name references to use shared constants (e.g.,
    shared.VaultMethodCash)
  • Updated field names in tracker data structures to match shared types
+53/-72 
pool_list_updater.go
Euler Swap V1 Pool List Updater Package Restructuring       

pkg/liquidity-source/euler-swap/v1/pool_list_updater.go

  • Refactored package from eulerswap to v1 namespace
  • Updated Config type reference to use shared.Config
  • Replaced hardcoded method names with shared constants (e.g.,
    shared.PoolMethodGetAssets)
  • Updated batch size references to use shared.BatchSize
+11/-10 
pool_list_updater_test.go
Euler Swap V1 Pool List Updater Test Refactoring                 

pkg/liquidity-source/euler-swap/v1/pool_list_updater_test.go

  • Refactored package from eulerswap to v1 namespace
  • Updated test to use shared.Config type instead of local Config
  • Added import for shared package
+3/-2     
Tests
3 files
integration_test.go
Euler Swap V2 Integration Tests                                                   

pkg/liquidity-source/euler-swap/v2/integration_test.go

  • New integration test file with 109 lines for Euler Swap V2
  • Tests ComputeQuote functionality against on-chain values
  • Validates simulator output matches on-chain results within 10 basis
    points
  • Supports multiple test amounts and pool addresses
+109/-0 
pool_simulator_test.go
Update v1 pool simulator tests for package refactoring     

pkg/liquidity-source/euler-swap/v1/pool_simulator_test.go

  • Updated package name from eulerswap to v1
  • Added import for shared package
  • Updated error references to use shared.ErrSwapLimitExceeded
+4/-3     
pool_list_updater_test.go
Add tests for euler-swap v2 pool list updater                       

pkg/liquidity-source/euler-swap/v2/pool_list_updater_test.go

  • Created test file for v2 pool list updater functionality
  • Tests pool discovery and state tracking from factory
  • Validates pool state retrieval for multiple pools
+40/-0   
Configuration changes
3 files
register_pool_types.gen.go
Msgpack Registration for Euler Swap V1 and V2                       

pkg/msgpack/register_pool_types.gen.go

  • Updated imports to split Euler Swap into separate v1 and v2 packages
  • Changed from single pkg_liquiditysource_eulerswap to
    pkg_liquiditysource_eulerswap_v1 and pkg_liquiditysource_eulerswap_v2
  • Registered both v1 and v2 PoolSimulator types for msgpack
    serialization
+4/-2     
EthereumVaultConnector.json
EthereumVaultConnector ABI definition for Euler Swap v1   

pkg/liquidity-source/euler-swap/v1/abis/EthereumVaultConnector.json

  • Added complete ABI definition for EthereumVaultConnector smart
    contract
  • Includes 20 view and pure functions for account management, collateral
    handling, and controller operations
  • Functions cover account ownership, nonce management, operator
    authorization, and status checks
+411/-0 
EulerSwapHook.json
EulerSwapHook ABI definition for Euler Swap v2                     

pkg/liquidity-source/euler-swap/v2/hooks/abis/EulerSwapHook.json

  • Added ABI definition for EulerSwapHook smart contract with 3 core
    functions
  • Includes beforeSwap hook for pre-swap validation and afterSwap hook
    for post-swap processing
  • Includes getFee function to calculate dynamic fees based on reserve
    ratios and input direction
+103/-0 
Configuration
4 files
EulerSwap.json
Add v2 EulerSwap pool contract ABI                                             

pkg/liquidity-source/euler-swap/v2/abis/EulerSwap.json

  • Added comprehensive ABI for v2 EulerSwap pool contract
  • Includes swap, liquidity management, and hook-related functions
  • Defines error types and events for pool operations
+1681/-0
EVault.json
Add EVault contract ABI for v1                                                     

pkg/liquidity-source/euler-swap/v1/abis/EVault.json

  • Added comprehensive ABI for EVault contract
  • Includes vault operations, LTV management, and account liquidity
    functions
+974/-0 
EulerSwapRegistry.json
Add v2 EulerSwapRegistry contract ABI                                       

pkg/liquidity-source/euler-swap/v2/abis/EulerSwapRegistry.json

  • Added comprehensive ABI for v2 EulerSwapRegistry contract
  • Includes pool registration, challenge mechanism, and pool discovery
    functions
+740/-0 
EulerRouter.json
Add EulerRouter contract ABI for v1                                           

pkg/liquidity-source/euler-swap/v1/abis/EulerRouter.json

  • Added ABI for EulerRouter contract with oracle and quote functions
+192/-0 
Formatting
2 files
EulerSwap.json
Fix JSON file formatting                                                                 

pkg/liquidity-source/euler-swap/v1/abis/EulerSwap.json

  • Removed trailing newline from JSON file
+1/-1     
EulerSwapFactory.json
Fix JSON file formatting                                                                 

pkg/liquidity-source/euler-swap/v1/abis/EulerSwapFactory.json

  • Removed trailing newline from JSON file
+1/-1     
Additional files
6 files
abis.go +0/-46   
constant.go +0/-58   
types.go +0/-124 
EVault.json [link]   
EthereumVaultConnector.json [link]   
EulerRouter.json [link]   

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Jan 13, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
Startup panic DoS

Description: The package init() panics if ABI parsing fails (panic(err)), which can crash the entire
service at startup and create a denial-of-service condition if the embedded ABI JSON
becomes corrupted/mismatched during build or release.
embed.go [15-20]

Referred Code
func init() {
	var err error
	HookABI, err = abi.JSON(strings.NewReader(string(hookABIJson)))
	if err != nil {
		panic(err)
	}
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

🔴
Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Nil vault handling: Several new code paths assume vault pointers are non-nil (e.g., dereferencing
supplyIn.MaxDeposit, supplyOut.Cash, and p.SupplyVault[from]/p.SupplyVault[to]) which can
panic if SupplyVault entries are absent in Extra.

Referred Code
func (p *PoolSimulator) calcLimits(isZeroForOne bool, fee *uint256.Int) (*uint256.Int, *uint256.Int, error) {
	var inLimit, outLimit uint256.Int

	inLimit.Set(shared.MaxUint112)
	outLimit.Set(shared.MaxUint112)

	supplyIn := lo.Ternary(isZeroForOne, p.SupplyVault[0], p.SupplyVault[1])
	borrowIn := lo.Ternary(isZeroForOne, p.BorrowVault[0], p.BorrowVault[1])

	// Supply caps on input: maxDeposit + debt(if borrow vault exists)
	maxDeposit := new(uint256.Int).Set(supplyIn.MaxDeposit)
	if borrowIn != nil && borrowIn.Debt != nil {
		maxDeposit.Add(maxDeposit, borrowIn.Debt)
	}
	if maxDeposit.Lt(&inLimit) {
		inLimit.Set(maxDeposit)
	}

	var reserveLimit uint256.Int
	if isZeroForOne {
		if p.reserves[1].Gt(p.MinReserve1) {


 ... (clipped 284 lines)

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
Audit scope unclear: The new tracker/simulator code does not clearly indicate whether it performs any “critical
actions” requiring audit trails (user/permission/sensitive data events), so compliance
cannot be fully verified from the diff alone.

Referred Code
func (d *PoolTracker) GetNewPoolState(
	ctx context.Context,
	p entity.Pool,
	params pool.GetNewPoolStateParams,
) (entity.Pool, error) {
	return d.getNewPoolState(ctx, p, params, nil)
}

func (d *PoolTracker) GetNewPoolStateWithOverrides(
	ctx context.Context,
	p entity.Pool,
	params pool.GetNewPoolStateWithOverridesParams,
) (entity.Pool, error) {
	return d.getNewPoolState(ctx, p, pool.GetNewPoolStateParams{Logs: params.Logs}, params.Overrides)
}

func (d *PoolTracker) getNewPoolState(
	ctx context.Context,
	p entity.Pool,
	_ pool.GetNewPoolStateParams,
	overrides map[common.Address]gethclient.OverrideAccount,


 ... (clipped 11 lines)

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Address validation gap: The new tracker constructs addresses from strings (common.HexToAddress, strings.ToLower
comparisons) without explicit validation that inputs like staticExtra.Vault,
staticExtra.EVC, and staticExtra.EulerAccount are well-formed hex addresses, which may be
acceptable if guaranteed elsewhere but cannot be confirmed from the diff.

Referred Code
if staticExtra.BorrowVault0 != "" && staticExtra.BorrowVault0 != staticExtra.SupplyVault0 && staticExtra.BorrowVault0 != valueobject.ZeroAddress {
	vaults = append(vaults, shared.VaultInfo{
		VaultAddress: staticExtra.BorrowVault0,
		AssetAddress: p.Tokens[0].Address,
		QuoteAmount:  bignumber.TenPowInt(p.Tokens[0].Decimals),
	})
}
if staticExtra.BorrowVault1 != "" && staticExtra.BorrowVault1 != staticExtra.SupplyVault1 && staticExtra.BorrowVault1 != valueobject.ZeroAddress {
	vaults = append(vaults, shared.VaultInfo{
		VaultAddress: staticExtra.BorrowVault1,
		AssetAddress: p.Tokens[1].Address,
		QuoteAmount:  bignumber.TenPowInt(p.Tokens[1].Decimals),
	})
}

rpcData, blockNumber, err := d.getPoolData(ctx, p.Address, staticExtra.EulerAccount,
	staticExtra.EVC, vaults, overrides)
if err != nil {
	l.Error("failed to getPoolData")
	return p, err
}


 ... (clipped 66 lines)

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Jan 13, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix invalid vault address references

Replace references to non-existent fields p.BorrowVault0 and p.BorrowVault1 with
the correct fields from the static extra data, p.StaticExtra.BorrowVault0 and
p.StaticExtra.BorrowVault1.

pkg/liquidity-source/euler-swap/v2/pool_simulator.go [216-236]

 // controller vault selection
 if p.BorrowVault[0] != nil && p.BorrowVault[0].IsControllerEnabled {
     controllerVault = p.BorrowVault[0]
-    debtVaultAddr = p.BorrowVault0
+    debtVaultAddr = p.StaticExtra.BorrowVault0
     debtVaultIdx = 0
 } else if p.BorrowVault[1] != nil && p.BorrowVault[1].IsControllerEnabled {
     controllerVault = p.BorrowVault[1]
-    debtVaultAddr = p.BorrowVault1
+    debtVaultAddr = p.StaticExtra.BorrowVault1
     debtVaultIdx = 1
 }
 ...
-sellBorrowVaultAddr := lo.Ternary(zeroForOne, p.BorrowVault0, p.BorrowVault1)
+sellBorrowVaultAddr := lo.Ternary(zeroForOne, p.StaticExtra.BorrowVault0, p.StaticExtra.BorrowVault1)

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 10

__

Why: The suggestion correctly identifies that the code is referencing non-existent fields (p.BorrowVault0, p.BorrowVault1), which would cause a compilation error, and provides the correct fix.

High
Reference fee recipient correctly

Correct the reference to the fee recipient in depositAssets from the
non-existent p.FeeRecipient to p.StaticExtra.FeeRecipient.

pkg/liquidity-source/euler-swap/v2/pool_simulator.go [746-762]

 func (p *PoolSimulator) depositAssets(
     amount,
     fee,
     debt *uint256.Int,
     isControllerEnabled bool,
 ) (vaultDeposit, reserveDeposit, repaid, feeAmount *uint256.Int, _ bool) {
     ...
     vaultDeposit = amount.Clone()
-    if p.FeeRecipient != "" {
+    if p.StaticExtra.FeeRecipient != "" {
         vaultDeposit.Sub(vaultDeposit, feeAmount)
     }
     ...
 }

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 10

__

Why: The suggestion correctly points out a compilation error where the code references a non-existent field p.FeeRecipient and provides the correct path p.StaticExtra.FeeRecipient.

High
Fix incorrect balance update logic

Fix an incorrect balance update by calling the Add method directly on
sellVault.EulerAccountAssets to ensure the value is modified in place.

pkg/liquidity-source/euler-swap/v1/pool_simulator.go [291-292]

 	addedAssets := shared.SubTill0(swapInfo.VaultDepositAmount, swapInfo.RepayAmount)
-	sellVault.EulerAccountAssets = new(uint256.Int).Add(sellVault.EulerAccountAssets, addedAssets)
+	sellVault.EulerAccountAssets.Add(sellVault.EulerAccountAssets, addedAssets)
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion identifies a critical bug where sellVault.EulerAccountAssets is not updated correctly due to improper use of the Add method, leading to incorrect state calculations.

High
Prevent division by zero panics

Add checks to prevent division-by-zero panics when normalizing prices, which can
occur if a token's QuoteAmount is zero.

pkg/liquidity-source/euler-swap/v2/pool_tracker.go [418-441]

 	for i := range uniqueVaultAddresses {
 		for j, v := range fullVaultList {
 			for k, q := range data.VaultPrices[j][i] {
-				if q != nil {
+				if q != nil && v.QuoteAmount.Cmp(bignumber.ZeroBI) != 0 {
 					data.VaultPrices[j][i][k] = new(big.Int).Div(q, v.QuoteAmount)
 				} else {
 					data.VaultPrices[j][i][k] = big.NewInt(0)
 				}
 			}
 		}
 		for j, collatAddr := range collaterals {
 			if idx, ok := fullVaultAddrMap[collatAddr]; ok {
 				data.CollatPrices[j][i] = data.VaultPrices[idx][i]
 				continue
 			}
 			for k, q := range data.CollatPrices[j][i] {
-				if q != nil {
+				if q != nil && collatQuoteAmts[j].Cmp(bignumber.ZeroBI) != 0 {
 					data.CollatPrices[j][i][k] = new(big.Int).Div(q, collatQuoteAmts[j])
 				} else {
 					data.CollatPrices[j][i][k] = big.NewInt(0)
 				}
 			}
 		}
 	}
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a potential division-by-zero panic if a token has 0 decimals, which would crash the service, and provides a correct fix to improve robustness.

Medium
Fix subtest loop variable capture

Fix a test loop variable capture issue by re-declaring the loop variable p
inside the loop body to ensure each subtest uses the correct value.

pkg/liquidity-source/euler-swap/v2/integration_test.go [46-48]

 for _, p := range pools {
+    p := p
     t.Run(p.Address, func(t *testing.T) {
         updatedPool, err := tracker.GetNewPoolState(ctx, p, pool.GetNewPoolStateParams{})
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies a common Go pitfall with loop variable capture in subtests, which could lead to incorrect test behavior. Fixing this improves test correctness and reliability.

Medium
Prevent division by zero

Add a guard to prevent a division-by-zero panic in the test by checking if
amountOutOnChain is zero before the division.

pkg/liquidity-source/euler-swap/v2/integration_test.go [100-101]

+if amountOutOnChain.Sign() == 0 {
+    t.Skip("on-chain quote is zero, skipping division")
+}
 diff := new(big.Int).Abs(new(big.Int).Sub(res.TokenAmountOut.Amount, amountOutOnChain))
 bps := new(big.Int).Div(new(big.Int).Mul(diff, big.NewInt(10000)), amountOutOnChain)
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies a potential division-by-zero panic in the test, which would cause it to crash. Adding this guard makes the test more robust.

Low
High-level
Re-evaluate the V2 pool tracker's data fetching strategy

The V2 pool tracker's data fetching in pool_tracker.go is overly complex, using
numerous sequential RPC calls which can cause high latency and unreliability.
This process should be simplified to improve performance and robustness.

Examples:

pkg/liquidity-source/euler-swap/v2/pool_tracker.go [121-456]
func (d *PoolTracker) getPoolData(
	ctx context.Context,
	poolAddress,
	eulerAccountAddr string,
	evcAddr string,
	vaultList []shared.VaultInfo,
	overrides map[common.Address]gethclient.OverrideAccount,
) (*TrackerData, uint64, error) {
	uniqueVaultAddresses := lo.Map(lo.UniqBy(vaultList, func(v shared.VaultInfo) string {
		return strings.ToLower(v.VaultAddress)

 ... (clipped 326 lines)

Solution Walkthrough:

Before:

func getPoolData(ctx, poolAddress, eulerAccountAddr, evcAddr, vaultList, overrides) (*TrackerData, uint64, error) {
    // 1st RPC batch: Get base pool data, controller, collaterals, and state for all unique vaults
    // This can be dozens of calls in one aggregation.
    req1 := ethrpc.NewRequest()
    // ... add many calls for pool, EVC, and each unique vault
    resp, err := req1.TryBlockAndAggregate()
    if err != nil { return ... }

    // 2nd RPC batch (conditional): If a new controller vault is found, fetch its data
    if newController {
        req2 := ethrpc.NewRequest()
        // ... add calls for the controller vault
        resp, err = req2.TryBlockAndAggregate()
        if err != nil { return ... }
    }

    // 3rd RPC batch (conditional): Fetch data for new collaterals
    req3 := ethrpc.NewRequest()
    // ... add calls for each new collateral
    if len(req3.Calls) > 0 {
        req3.TryAggregate()
    }

    // 4th RPC batch: Fetch prices and LTVs in nested loops
    // This can be a very large number of calls.
    req4 := ethrpc.NewRequest()
    // for each unique vault...
    //   for each full vault...
    //     ... add getQuotes and LTVBorrow calls
    //   for each collateral...
    //     ... add getQuotes and LTVBorrow calls
    req4.TryAggregate()

    // ... process and return all fetched data
}

After:

func getPoolData(ctx, poolAddress, eulerAccountAddr, evcAddr, vaultList, overrides) (*TrackerData, uint64, error) {
    // Option 1: Use a custom multicall contract to bundle logic
    // This would require deploying a new contract but would be most efficient.
    // result, err := customMulticall.GetEulerV2PoolData(poolAddress, eulerAccountAddr)

    // Option 2: Reduce the scope and combine requests
    // Fetch only the most critical data in a single, larger batch.
    // Defer fetching of less critical data (e.g., detailed LTVs for all collaterals)
    // or cache it more aggressively.
    req := ethrpc.NewRequest()

    // Batch 1: Get essential pool, vault, and controller data
    // ... add calls for reserves, dynamic params, key vault states
    // ... add calls for primary collateral values

    // Batch 2 (if needed): Get secondary data like LTVs for less common assets
    // ... add calls for LTVs and less critical prices

    // Minimize sequential batches and the total number of calls per update.
    // For example, fetch all prices in one go if possible, rather than in nested loops.
    resp, err := req.TryBlockAndAggregate()
    if err != nil { return ... }

    // ... process data, potentially using cached/stale values for non-critical fields
}
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a significant performance and reliability risk in the getPoolData function, which makes numerous sequential and aggregated RPC calls, leading to high latency and fragility.

High
General
Prevent in-place mutation

Prevent the DecodeCap function from mutating its input parameter amountCap by
creating a local copy to work on, thus avoiding unexpected side effects for the
caller.

pkg/liquidity-source/euler-swap/shared/utils.go [34-46]

 func DecodeCap(amountCap *uint256.Int) *uint256.Int {
-    if amountCap.IsZero() {
+    result := new(uint256.Int).Set(amountCap)
+    if result.IsZero() {
         return new(uint256.Int).Set(big256.UMax)
     }
 
     var powerBits, tenToPower, multiplier uint256.Int
-    powerBits.And(amountCap, sixtyThree)
+    powerBits.And(result, sixtyThree)
     tenToPower.Exp(big256.U10, &powerBits)
-    multiplier.Rsh(amountCap, 6)
-    amountCap.Mul(&tenToPower, &multiplier)
-    return amountCap.Div(amountCap, big256.U100)
+    multiplier.Rsh(result, 6)
+    result.Mul(&tenToPower, &multiplier)
+    return result.Div(result, big256.U100)
 }
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly points out that the function mutates its input parameter, which is a bad practice that can lead to subtle bugs. The fix makes the function pure and safer to use.

Medium
Remove arbitrary reduction of outLimit

Remove the line that subtracts 1 from outLimit in calcLimits as it seems
arbitrary and may unnecessarily restrict swap amounts.

pkg/liquidity-source/euler-swap/v2/pool_simulator.go [543-545]

 	if outLimit.Sign() > 0 {
-		outLimit.SubUint64(&outLimit, 1)
+		// outLimit.SubUint64(&outLimit, 1) // This line is removed
 	}
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies a suspicious line of code that arbitrarily reduces outLimit, which could be a bug or an unnecessary restriction not present in the v1 implementation.

Low
Add a trailing newline to file

Add a trailing newline to
pkg/liquidity-source/euler-swap/v2/abis/EulerSwapRegistry.json to adhere to
standard file formatting conventions.

pkg/liquidity-source/euler-swap/v2/abis/EulerSwapRegistry.json [737-740]

+    ...
+        "stateMutability": "view",
+        "type": "function"
+    }
+]
 
-

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 2

__

Why: The suggestion correctly points out that the new file EulerSwapRegistry.json is missing a trailing newline, which is a good practice for text files. This is a minor style improvement.

Low
  • Update

@kyber-ci-bot
Copy link

kyber-ci-bot commented Jan 13, 2026

Test coverage changes:
Package Before After Diff
github.com/KyberNetwork/kyberswap-dex-lib/pkg/entity 18.50% 18.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/aave-v3 3.90% 3.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/algebra/integral 36.50% 36.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/algebra/v1 13.30% 13.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ambient 17.60% 17.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/angle-transmuter 38.10% 38.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/arbera/den 41.10% 41.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/arbera/zap 44.60% 44.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/arena-bc 64.10% 64.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer/v1 42.90% 42.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer/v2/composable-stable 46.30% 46.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer/v2/math 36.90% 36.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer/v2/stable 26.80% 26.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer/v2/weighted 26.50% 26.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer/v3/eclp 27.20% 27.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer/v3/math 29.90% 29.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer/v3/quant-amm 34.10% 34.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer/v3/reclamm 27.10% 27.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer/v3/stable 20.20% 20.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer/v3/vault 13.90% 13.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/balancer/v3/weighted 25.60% 25.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/bancor-v21 31.60% 31.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/bancor-v3 52.00% 52.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/bedrock/unibtc 22.20% 22.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/bedrock/unieth 18.30% 18.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/beets-ss 26.10% 26.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/brownfi 16.00% 16.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/brownfi/v2 36.50% 36.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/clear 20.00% 20.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/clipper 49.40% 49.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/compound/v2 4.20% 4.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/compound/v3 3.50% 3.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/curve/llamma 70.10% 70.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/curve/plain 60.30% 60.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/curve/stable-meta-ng 56.10% 56.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/curve/stable-ng 39.90% 39.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/curve/tricrypto-ng 62.00% 62.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/curve/twocrypto-ng 64.90% 64.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dai-usds 21.90% 21.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/deltaswap-v1 46.40% 46.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dexalot 44.30% 44.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dodo/classical 57.80% 57.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dodo/dpp 37.80% 37.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dodo/dsp 40.30% 40.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dodo/dvm 47.50% 47.50% ✔️
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 38.40% 38.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ekubo 16.90% 16.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ekubo/math 74.10% 74.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ekubo/math/twamm 97.20% 97.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ekubo/pools 48.00% 48.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/erc4626 45.00% 45.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ethena/susde 27.90% 27.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ether-vista 2.30% 2.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/etherfi/ebtc 36.40% 36.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/etherfi/eeth 16.00% 16.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/etherfi/vampire 27.10% 27.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/etherfi/weeth 12.10% 12.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/euler-swap 50.00% 0.00%
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/euler-swap/v1 0.00% 50.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/euler-swap/v2 0.00% 1.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/fluid/dex-lite 66.20% 66.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/fluid/dex-t1 71.50% 71.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/fluid/dex-v2 2.70% 2.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/fluid/vault-t1 17.90% 17.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/frax/sfrxeth 18.00% 18.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/frax/sfrxeth-convertor 37.50% 37.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/generic-arm 24.10% 24.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/generic-simple-rate 32.90% 32.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/gsm-4626 48.70% 48.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/gyroscope/2clp 42.50% 42.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/gyroscope/3clp 43.40% 43.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/gyroscope/eclp 58.90% 58.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/gyroscope/math 2.50% 2.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/hashflow-v3 63.90% 63.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/honey 5.20% 5.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/hyeth 38.80% 38.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/infinifi/gateway 52.00% 52.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/integral 37.40% 37.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/kelp/rseth 11.70% 11.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/kelp/rseth-l2 16.30% 16.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/kuru-ob 3.10% 3.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/lgl-clob 48.40% 48.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/lo1inch 64.20% 64.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/lo1inch/helper 66.90% 66.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/maker/savingsdai 30.50% 30.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/maker/sky-psm 46.60% 46.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/mantle/meth 28.10% 28.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/maverick/v1 66.50% 66.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/maverick/v2 48.60% 48.40%
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/midas 50.00% 50.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/mkr-sky 29.20% 29.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/nabla 36.30% 36.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/nad-fun 3.70% 3.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/nomiswap/nomiswapstable 83.10% 83.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ondo-usdy 23.90% 23.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/order-book 83.20% 83.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/overnight-usdp 29.20% 29.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/pancake/infinity/bin 36.30% 36.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/pancake/infinity/cl 16.20% 16.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/pancake/v3 14.80% 14.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/puffer/pufeth 22.80% 22.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/renzo/ezeth 30.10% 30.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/ringswap 10.60% 10.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/rocketpool/reth 25.50% 25.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/smardex 47.70% 47.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/solidly-v2 32.70% 32.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/staderethx 28.00% 28.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/swell/rsweth 6.20% 6.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/swell/sweth 6.20% 6.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/syncswapv2/aqua 24.00% 24.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/syncswapv2/classic 41.10% 41.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/syncswapv2/stable 48.60% 48.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/tessera 3.70% 3.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap/lo 51.20% 51.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap/v1 12.70% 12.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap/v2 8.40% 8.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap/v3 14.70% 14.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap/v4 10.90% 10.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap/v4/hooks/bunni-v2 48.90% 48.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap/v4/hooks/bunni-v2/hooklet 16.10% 16.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap/v4/hooks/clanker 17.10% 17.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap/v4/hooks/deli 89.40% 89.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap/v4/hooks/flaunch 75.00% 75.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap/v4/hooks/idle 100.00% 100.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/uniswap/v4/hooks/renzo 62.50% 62.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/usd0pp 27.30% 27.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/velocore-v2/cpmm 54.50% 54.50% ✔️
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 30.60% 30.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/velodrome-v1 32.80% 32.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/velodrome-v2 40.60% 40.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/virtual-fun 39.20% 39.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/wildcat 16.30% 16.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/woofi-v2 52.30% 52.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/woofi-v21 55.60% 55.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/camelot 40.30% 40.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/aave 66.20% 66.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/base 43.50% 43.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/compound 75.40% 75.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/meta 85.50% 85.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/plain-oracle 38.50% 38.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/tricrypto 70.30% 74.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/curve/two 29.20% 29.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/dmm 30.80% 30.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/equalizer 29.00% 29.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/fraxswap 25.20% 25.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/fulcrom 31.10% 31.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/fxdx 20.70% 20.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/gmx 27.70% 27.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/gmx-glp 26.10% 26.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/iziswap 25.70% 25.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/iziswap/swap 64.20% 64.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/kokonut-crypto 55.60% 55.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/lido 22.80% 22.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/lido-steth 33.30% 33.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/limitorder 51.30% 51.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/liquiditybookv20 25.90% 25.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/liquiditybookv21 38.80% 38.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/madmex 24.90% 24.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/makerpsm 38.40% 38.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/mantisswap 53.10% 53.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/metavault 28.10% 28.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/nuriv2 13.30% 13.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/platypus 26.00% 26.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/pol-matic 19.20% 19.20% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/pool 26.70% 26.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/quickperps 23.70% 23.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/ramsesv2 15.70% 15.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/saddle 63.80% 63.80% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/slipstream 17.60% 17.60% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/solidly-v3 20.70% 20.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/swapbased-perp 31.10% 31.10% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/syncswap/syncswapclassic 67.40% 67.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/syncswap/syncswapstable 81.40% 81.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/synthetix 37.90% 37.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/uniswap 16.50% 16.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/usdfi 45.00% 45.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/velocimeter 46.90% 46.90% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/vooi 37.30% 37.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/wombat/wombatlsd 55.30% 55.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/source/wombat/wombatmain 56.50% 56.50% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/util 3.40% 3.40% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/util/abi 80.00% 80.00% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/util/big256 21.70% 21.70% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/util/bignumber 13.30% 13.30% ✔️
github.com/KyberNetwork/kyberswap-dex-lib/pkg/util/graphql 56.20% 56.20% ✔️

@sunspirit99 sunspirit99 merged commit 6729a51 into main Jan 14, 2026
8 checks passed
@sunspirit99 sunspirit99 deleted the integrate-eulerswap-v2 branch January 14, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants