The swap base output function returns the `source_amount_swapped`, which already includes the fees. https://github.com/raydium-io/raydium-cp-swap/blob/87685cf221e7d0b06419c6c750bd963b6780dca9/programs/cp-swap/src/curve/calculator.rs#L150C13-L150C34 see: https://github.com/raydium-io/raydium-cp-swap/blob/87685cf221e7d0b06419c6c750bd963b6780dca9/programs/cp-swap/src/curve/calculator.rs#L140 We are adding correct fee here: https://github.com/blockworks-foundation/autobahn/blob/f9e8f8bf7cbdb886c23b72fb9ba67d700bd6f91f/lib/dex-raydium-cp/src/edge.rs#L260
The swap base output function returns the
source_amount_swapped, which already includes the fees.https://github.com/raydium-io/raydium-cp-swap/blob/87685cf221e7d0b06419c6c750bd963b6780dca9/programs/cp-swap/src/curve/calculator.rs#L150C13-L150C34
see:
https://github.com/raydium-io/raydium-cp-swap/blob/87685cf221e7d0b06419c6c750bd963b6780dca9/programs/cp-swap/src/curve/calculator.rs#L140
We are adding correct fee here:
autobahn/lib/dex-raydium-cp/src/edge.rs
Line 260 in f9e8f8b