From 9accc843460254d57866dff50af9d132b0ce0ed2 Mon Sep 17 00:00:00 2001 From: TAMARA LIPOWSKI Date: Wed, 26 Mar 2025 09:56:44 +0100 Subject: [PATCH] docs: Clarify validation criteria for cyclical swaps --- src/encoding/evm/tycho_encoder.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/encoding/evm/tycho_encoder.rs b/src/encoding/evm/tycho_encoder.rs index 183e215..bc8ba14 100644 --- a/src/encoding/evm/tycho_encoder.rs +++ b/src/encoding/evm/tycho_encoder.rs @@ -54,6 +54,8 @@ impl EVMTychoEncoder { /// swap's input is the chain's wrapped token. /// * If the solution is unwrapping, the checked token is the chain's native token and the last /// swap's output is the chain's wrapped token. + /// * The token cannot appear more than once in the solution unless it is the first and last + /// token (i.e. a true cyclical swap). fn validate_solution(&self, solution: &Solution) -> Result<(), EncodingError> { if solution.exact_out { return Err(EncodingError::FatalError(