Skip to content

chore: remove unnecessary mutex in dodo#1249

Open
lehainam-dev wants to merge 2 commits intomainfrom
chore/dodo-remove-mutex
Open

chore: remove unnecessary mutex in dodo#1249
lehainam-dev wants to merge 2 commits intomainfrom
chore/dodo-remove-mutex

Conversation

@lehainam-dev
Copy link
Member

@lehainam-dev lehainam-dev commented Jan 8, 2026

Why did we need it?

To remove locking when simulation (seems to be unnecessary).

Related thread from previous update: https://team-kyber.slack.com/archives/C061UNZDUVC/p1724213576872309

In this previous discussion, it introduces a fix that puts AdjustedTarget in NewPoolSimulator and UpdateBalance. However, that was a non-backwards-compatible update. Scenarios: the AdjustedTarget is valid in the 1st call, then panic in the 2nd call.

  • Correct behaviour: Still allow to call 1st CalcAmountOut and UpdateBalance, fails in 2nd CalcAmountOut call.
  • Behavior in the discussion: 1st CalcAmountOut is still successful, but 1st UpdateBalance will fail.

The current PR keeps the same current behavior, by only removing the mutex (still keeps the AdjustedTarget in CalcAmountOut call). It needs to clone the state into a different object to avoid data race (even when different threads write the same data into the shared object).

Related Issue

Release Note

How Has This Been Tested?

Screenshots (if appropriate):

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Jan 8, 2026

PR Compliance Guide 🔍

(Compliance updated until commit 1aaadca)

Below is a summary of compliance checks for this PR:

Security Compliance
Concurrency data race

Description: Removing the mutex from PoolSimulator and eliminating locking in getPMMState() can
introduce concurrent read/write data races on p.PMMState (and potentially other shared
fields), which may lead to undefined behavior or panics (DoS) when the simulator is
accessed concurrently (e.g., during routing / quote computation).
storage.go [11-15]

Referred Code
func (p *PoolSimulator) getPMMState() libv2.PMMState {
	clonedState := p.PMMState
	libv2.AdjustedTarget(&clonedState)
	return clonedState
}
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: Comprehensive Audit Trails

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

Status: Passed

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

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: Security-First Input Validation and Data Handling

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

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:
Concurrency safety: Removing locking around p.PMMState access may introduce data races or inconsistent state
under concurrent reads/writes, which requires verification that all callers guarantee
single-threaded access or otherwise ensure safety.

Referred Code
clonedState := p.PMMState
libv2.AdjustedTarget(&clonedState)
return clonedState

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

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

Previous compliance checks

Compliance check up to commit 7a526f6
Security Compliance
Concurrency data race

Description: Removing the sync.RWMutex from PoolSimulator and the locking in getPMMState() introduces
potential data races on shared mutable state (p.PMMState), which could lead to
inconsistent pricing/route computation and unintended outcomes if pool simulators are
accessed concurrently (also applies to pkg/liquidity-source/dodo/dsp/storage.go and
pkg/liquidity-source/dodo/dvm/storage.go, plus the corresponding pool_simulator.go
changes).
storage.go [11-14]

Referred Code
func (p *PoolSimulator) getPMMState() libv2.PMMState {
	libv2.AdjustedTarget(&p.PMMState)
	return p.PMMState
}
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: Comprehensive Audit Trails

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

Status: Passed

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

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: Security-First Input Validation and Data Handling

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

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:
Concurrency safety risk: getPMMState() now mutates and returns p.PMMState without any synchronization, which may
introduce data races or inconsistent state if PoolSimulator is accessed concurrently.

Referred Code
func (p *PoolSimulator) getPMMState() libv2.PMMState {
	libv2.AdjustedTarget(&p.PMMState)
	return p.PMMState

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

Compliance check up to commit 4734493
Security Compliance
🔴
Panic-based DoS

Description: The intended panic recovery in NewPoolSimulator is ineffective because
libv2.AdjustedTarget(&poolState) is invoked before the defer recover is registered, so a
panic triggered by malformed/hostile pool data can crash the process (denial-of-service)
instead of being converted to an error.
pool_simulator.go [72-82]

Referred Code
libv2.AdjustedTarget(&poolState)

defer func() {
	if r := recover(); r != nil {
		if recoveredError, ok := r.(error); ok {
			err = recoveredError
		} else {
			err = shared.ErrPanicAdjustedTarget
		}
	}
}()
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: Comprehensive Audit Trails

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

Status: Passed

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

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: Security-First Input Validation and Data Handling

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

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:
Panic recovery misordered: libv2.AdjustedTarget(&poolState) is invoked before the defer-based recover() is
registered, so panics from AdjustedTarget will not be caught as intended.

Referred Code
libv2.AdjustedTarget(&poolState)

defer func() {
	if r := recover(); r != nil {
		if recoveredError, ok := r.(error); ok {
			err = recoveredError
		} else {
			err = shared.ErrPanicAdjustedTarget
		}
	}
}()

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

@qodo-code-review
Copy link
Contributor

qodo-code-review bot commented Jan 8, 2026

PR Code Suggestions ✨

Latest suggestions up to 1aaadca

CategorySuggestion                                                                                                                                    Impact
Possible issue
Deep-copy mutable state before adjustment

Deep-copy the p.PMMState struct before modification to prevent data races and
unintended mutation of the original pool state. The current shallow copy is
insufficient as PMMState contains pointer fields.

pkg/liquidity-source/dodo/dpp/storage.go [11-15]

 func (p *PoolSimulator) getPMMState() libv2.PMMState {
 	clonedState := p.PMMState
+	if p.PMMState.B != nil {
+		clonedState.B = new(uint256.Int).Set(p.PMMState.B)
+	}
+	if p.PMMState.B0 != nil {
+		clonedState.B0 = new(uint256.Int).Set(p.PMMState.B0)
+	}
+	if p.PMMState.Q != nil {
+		clonedState.Q = new(uint256.Int).Set(p.PMMState.Q)
+	}
+	if p.PMMState.Q0 != nil {
+		clonedState.Q0 = new(uint256.Int).Set(p.PMMState.Q0)
+	}
+	if p.PMMState.I != nil {
+		clonedState.I = new(uint256.Int).Set(p.PMMState.I)
+	}
+	if p.PMMState.K != nil {
+		clonedState.K = new(uint256.Int).Set(p.PMMState.K)
+	}
+
 	libv2.AdjustedTarget(&clonedState)
 	return clonedState
 }
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical data race condition introduced by the PR, where a shallow copy of a struct with pointer fields leads to unintended mutation of the original state in a concurrent environment.

High
Avoid shared pointer state mutation

Deep-copy the p.PMMState struct before modification to prevent data races and
unintended mutation of the original pool state. The current shallow copy is
insufficient as PMMState contains pointer fields.

pkg/liquidity-source/dodo/dsp/storage.go [11-15]

 func (p *PoolSimulator) getPMMState() libv2.PMMState {
 	clonedState := p.PMMState
+	if p.PMMState.B != nil {
+		clonedState.B = new(uint256.Int).Set(p.PMMState.B)
+	}
+	if p.PMMState.B0 != nil {
+		clonedState.B0 = new(uint256.Int).Set(p.PMMState.B0)
+	}
+	if p.PMMState.Q != nil {
+		clonedState.Q = new(uint256.Int).Set(p.PMMState.Q)
+	}
+	if p.PMMState.Q0 != nil {
+		clonedState.Q0 = new(uint256.Int).Set(p.PMMState.Q0)
+	}
+	if p.PMMState.I != nil {
+		clonedState.I = new(uint256.Int).Set(p.PMMState.I)
+	}
+	if p.PMMState.K != nil {
+		clonedState.K = new(uint256.Int).Set(p.PMMState.K)
+	}
+
 	libv2.AdjustedTarget(&clonedState)
 	return clonedState
 }
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical data race condition introduced by the PR, where a shallow copy of a struct with pointer fields leads to unintended mutation of the original state in a concurrent environment.

High
Make PMM state copy truly independent

Deep-copy the p.PMMState struct before modification to prevent data races and
unintended mutation of the original pool state. The current shallow copy is
insufficient as PMMState contains pointer fields.

pkg/liquidity-source/dodo/dvm/storage.go [11-15]

 func (p *PoolSimulator) getPMMState() libv2.PMMState {
 	clonedState := p.PMMState
+	if p.PMMState.B != nil {
+		clonedState.B = new(uint256.Int).Set(p.PMMState.B)
+	}
+	if p.PMMState.B0 != nil {
+		clonedState.B0 = new(uint256.Int).Set(p.PMMState.B0)
+	}
+	if p.PMMState.Q != nil {
+		clonedState.Q = new(uint256.Int).Set(p.PMMState.Q)
+	}
+	if p.PMMState.Q0 != nil {
+		clonedState.Q0 = new(uint256.Int).Set(p.PMMState.Q0)
+	}
+	if p.PMMState.I != nil {
+		clonedState.I = new(uint256.Int).Set(p.PMMState.I)
+	}
+	if p.PMMState.K != nil {
+		clonedState.K = new(uint256.Int).Set(p.PMMState.K)
+	}
+
 	libv2.AdjustedTarget(&clonedState)
 	return clonedState
 }
  • Apply / Chat
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical data race condition introduced by the PR, where a shallow copy of a struct with pointer fields leads to unintended mutation of the original state in a concurrent environment.

High
Possible issue
Deep-copy state in clones

Deep-copy the PMMState fields within CloneState() to ensure that cloned
simulators have a fully independent state from the original. This prevents state
corruption between the original and cloned pool instances during simulations.

pkg/liquidity-source/dodo/dpp/pool_simulator.go [146-150]

 func (p *PoolSimulator) CloneState() pool.IPoolSimulator {
 	cloned := *p
+
+	// Deep-copy PMMState pointer fields to avoid sharing mutable uint256.Int instances.
+	if p.PMMState.B != nil {
+		cloned.PMMState.B = new(uint256.Int).Set(p.PMMState.B)
+	}
+	if p.PMMState.B0 != nil {
+		cloned.PMMState.B0 = new(uint256.Int).Set(p.PMMState.B0)
+	}
+	if p.PMMState.Q != nil {
+		cloned.PMMState.Q = new(uint256.Int).Set(p.PMMState.Q)
+	}
+	if p.PMMState.Q0 != nil {
+		cloned.PMMState.Q0 = new(uint256.Int).Set(p.PMMState.Q0)
+	}
+	if p.PMMState.I != nil {
+		cloned.PMMState.I = new(uint256.Int).Set(p.PMMState.I)
+	}
+	if p.PMMState.K != nil {
+		cloned.PMMState.K = new(uint256.Int).Set(p.PMMState.K)
+	}
+
 	cloned.Info.Reserves = slices.Clone(p.Info.Reserves)
 	return &cloned
 }

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical bug where CloneState performs a shallow copy, causing the cloned and original simulators to share state, which would lead to incorrect simulation results.

High
Prevent shared mutable clone state

Deep-copy the PMMState fields within CloneState() to ensure that cloned
simulators have a fully independent state from the original. This prevents state
corruption between the original and cloned pool instances during simulations.

pkg/liquidity-source/dodo/dsp/pool_simulator.go [146-150]

 func (p *PoolSimulator) CloneState() pool.IPoolSimulator {
 	cloned := *p
+
+	// Deep-copy PMMState pointer fields to avoid sharing mutable uint256.Int instances.
+	if p.PMMState.B != nil {
+		cloned.PMMState.B = new(uint256.Int).Set(p.PMMState.B)
+	}
+	if p.PMMState.B0 != nil {
+		cloned.PMMState.B0 = new(uint256.Int).Set(p.PMMState.B0)
+	}
+	if p.PMMState.Q != nil {
+		cloned.PMMState.Q = new(uint256.Int).Set(p.PMMState.Q)
+	}
+	if p.PMMState.Q0 != nil {
+		cloned.PMMState.Q0 = new(uint256.Int).Set(p.PMMState.Q0)
+	}
+	if p.PMMState.I != nil {
+		cloned.PMMState.I = new(uint256.Int).Set(p.PMMState.I)
+	}
+	if p.PMMState.K != nil {
+		cloned.PMMState.K = new(uint256.Int).Set(p.PMMState.K)
+	}
+
 	cloned.Info.Reserves = slices.Clone(p.Info.Reserves)
 	return &cloned
 }

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical bug where CloneState performs a shallow copy, causing the cloned and original simulators to share state, which would lead to incorrect simulation results.

High
Make cloned state independent

Deep-copy the PMMState fields within CloneState() to ensure that cloned
simulators have a fully independent state from the original. This prevents state
corruption between the original and cloned pool instances during simulations.

pkg/liquidity-source/dodo/dvm/pool_simulator.go [146-150]

 func (p *PoolSimulator) CloneState() pool.IPoolSimulator {
 	cloned := *p
+
+	// Deep-copy PMMState pointer fields to avoid sharing mutable uint256.Int instances.
+	if p.PMMState.B != nil {
+		cloned.PMMState.B = new(uint256.Int).Set(p.PMMState.B)
+	}
+	if p.PMMState.B0 != nil {
+		cloned.PMMState.B0 = new(uint256.Int).Set(p.PMMState.B0)
+	}
+	if p.PMMState.Q != nil {
+		cloned.PMMState.Q = new(uint256.Int).Set(p.PMMState.Q)
+	}
+	if p.PMMState.Q0 != nil {
+		cloned.PMMState.Q0 = new(uint256.Int).Set(p.PMMState.Q0)
+	}
+	if p.PMMState.I != nil {
+		cloned.PMMState.I = new(uint256.Int).Set(p.PMMState.I)
+	}
+	if p.PMMState.K != nil {
+		cloned.PMMState.K = new(uint256.Int).Set(p.PMMState.K)
+	}
+
 	cloned.Info.Reserves = slices.Clone(p.Info.Reserves)
 	return &cloned
 }

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical bug where CloneState performs a shallow copy, causing the cloned and original simulators to share state, which would lead to incorrect simulation results.

High
  • More

Previous suggestions

Suggestions up to commit 4734493
CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix incorrect panic recovery logic

Move the defer block before the libv2.AdjustedTarget call to ensure that any
potential panic is correctly recovered.

pkg/liquidity-source/dodo/dpp/pool_simulator.go [72-82]

-	libv2.AdjustedTarget(&poolState)
-
 	defer func() {
 		if r := recover(); r != nil {
 			if recoveredError, ok := r.(error); ok {
 				err = recoveredError
 			} else {
 				err = shared.ErrPanicAdjustedTarget
 			}
 		}
 	}()
 
+	libv2.AdjustedTarget(&poolState)
+
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies a critical bug in the PR's new panic recovery logic, where the defer statement is placed after the function call it is supposed to protect, rendering it ineffective.

High
Add panic recovery to prevent crashes

Add a defer with recover to the UpdateBalance method to handle potential panics
from the libv2.AdjustedTarget call and prevent the application from crashing.

pkg/liquidity-source/dodo/dpp/pool_simulator.go [164-195]

 func (p *PoolSimulator) UpdateBalance(params pool.UpdateBalanceParams) {
+	defer func() {
+		_ = recover()
+	}()
+
 	input, output := params.TokenAmountIn, params.TokenAmountOut
 	var isSellBase bool
 	if input.Token == p.Info.Tokens[0] {
 		isSellBase = true
 	} else {
 		isSellBase = false
 	}
 	inputAmount := input.Amount
 	// output.Amount was already fee-deducted in CalcAmountOut above, need to add back to update balances
 	outputAmount := new(big.Int).Add(output.Amount, params.Fee.Amount)
 
 	if isSellBase {
 		// p.Info.Reserves[0] = p.Info.Reserves[0] + inputAmount
 		// p.Info.Reserves[1] = p.Info.Reserves[1] - outputAmount - mtFee
 		p.Info.Reserves[0] = new(big.Int).Add(p.Info.Reserves[0], inputAmount)
 		p.Info.Reserves[1] = new(big.Int).Sub(p.Info.Reserves[1], outputAmount)
 
 		// Update p.Storage
 		p.UpdateStateSellBase(number.SetFromBig(inputAmount), number.SetFromBig(outputAmount))
 	} else {
 		// p.Info.Reserves[0] = p.Info.Reserves[0] - outputAmount - mtFee
 		// p.Info.Reserves[1] = p.Info.Reserves[1] + inputAmount
 		p.Info.Reserves[0] = new(big.Int).Sub(p.Info.Reserves[0], outputAmount)
 		p.Info.Reserves[1] = new(big.Int).Add(p.Info.Reserves[1], inputAmount)
 
 		// Update p.Storage
 		p.UpdateStateSellQuote(number.SetFromBig(inputAmount), number.SetFromBig(outputAmount))
 	}
 
 	libv2.AdjustedTarget(&p.PMMState)
 }
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly points out that the new call to libv2.AdjustedTarget in UpdateBalance can panic, and proposes adding a recovery mechanism to prevent potential application crashes, which is a significant reliability improvement.

Medium
Possible issue
Preserve deferred error propagation

In NewPoolSimulator, the error handling for panics is flawed because the final
return statement overwrites the recovered error with nil. Use a naked return to
ensure the error is correctly propagated.

pkg/liquidity-source/dodo/dpp/pool_simulator.go [29-98]

 func NewPoolSimulator(entityPool entity.Pool) (sim *PoolSimulator, err error) {
 	if len(entityPool.StaticExtra) == 0 {
 		return nil, shared.ErrStaticExtraEmpty
 	}
 ...
-	return &PoolSimulator{
+	sim = &PoolSimulator{
 		Pool: pool.Pool{
 			Info: info,
 		},
 		PMMState: poolState,
 		Meta:     meta,
 		gas:      shared.V2DefaultGas,
-	}, nil
+	}
+	return
 }
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a bug where the error recovered from a panic is discarded because the function explicitly returns a nil error, defeating the purpose of the new defer-recover block.

Medium

@kyber-ci-bot
Copy link

kyber-ci-bot commented Jan 8, 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/bebop 40.30% 40.30% ✔️
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.60%
github.com/KyberNetwork/kyberswap-dex-lib/pkg/liquidity-source/dodo/dsp 40.30% 40.20%
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% 50.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.80% 2.80% ✔️
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 50.00% 50.30% ✔️
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.70% 16.70% ✔️
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% 70.30% ✔️
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% ✔️

@lehainam-dev lehainam-dev force-pushed the chore/dodo-remove-mutex branch from 4734493 to 7a526f6 Compare January 8, 2026 07:19
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.

2 participants