diff --git a/pkg/pools/pool_cache_adapter.go b/pkg/pools/pool_cache_adapter.go index 1a202b0..60f4484 100644 --- a/pkg/pools/pool_cache_adapter.go +++ b/pkg/pools/pool_cache_adapter.go @@ -62,31 +62,38 @@ func parseProtocol(protocol string) arbcommon.Protocol { return arbcommon.ProtocolUniswapV2 case "uniswap-v3": return arbcommon.ProtocolUniswapV3 - case "sushiswap": - return arbcommon.ProtocolSushiSwap - case "camelot": - return arbcommon.ProtocolCamelot + case "sushiswap", "sushiswap-v2": + return arbcommon.ProtocolSushiSwapV2 + case "sushiswap-v3": + return arbcommon.ProtocolSushiSwapV3 + case "camelot", "camelot-v2": + return arbcommon.ProtocolCamelotV2 + case "camelot-v3": + return arbcommon.ProtocolCamelotV3 case "curve": return arbcommon.ProtocolCurve - case "balancer": - return arbcommon.ProtocolBalancer + case "balancer", "balancer-v2": + return arbcommon.ProtocolBalancerV2 + case "balancer-v3": + return arbcommon.ProtocolBalancerV3 default: - return arbcommon.ProtocolUnknown + // Default to UniswapV2 for unknown protocols + return arbcommon.ProtocolUniswapV2 } } // parsePoolType converts protocol string to PoolType enum func parsePoolType(protocol string) arbcommon.PoolType { switch protocol { - case "uniswap-v2", "sushiswap", "camelot": - return arbcommon.PoolTypeV2 - case "uniswap-v3": - return arbcommon.PoolTypeV3 + case "uniswap-v2", "sushiswap", "sushiswap-v2", "camelot", "camelot-v2": + return arbcommon.PoolTypeConstantProduct + case "uniswap-v3", "sushiswap-v3", "camelot-v3": + return arbcommon.PoolTypeConcentrated case "curve": return arbcommon.PoolTypeStableSwap - case "balancer": + case "balancer", "balancer-v2", "balancer-v3": return arbcommon.PoolTypeWeighted default: - return arbcommon.PoolTypeUnknown + return arbcommon.PoolTypeConstantProduct } }