We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raydium CP's swap_base_input function calculate the fee in the following way: see: https://github.com/raydium-io/raydium-cp-swap/blob/87685cf221e7d0b06419c6c750bd963b6780dca9/programs/cp-swap/src/curve/calculator.rs#L102C13-L102C22
let trade_fee = Fees::trading_fee(source_amount, trade_fee_rate)?; let protocol_fee = Fees::protocol_fee(trade_fee, protocol_fee_rate)?; let fund_fee = Fees::fund_fee(trade_fee, fund_fee_rate)?;
If you look closely protocol_fee is some x percentage of trade_fee and fund_fee is also some percentage of trade_fee.
protocol_fee
fund_fee
Here:
autobahn/lib/dex-raydium-cp/src/edge.rs
Line 262 in f9e8f8b
We return the tuple 3rd item as trade_fee+protocol_fee+fund_fee it should be just trade_fee.
trade_fee+protocol_fee+fund_fee
trade_fee
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Raydium CP's swap_base_input function calculate the fee in the following way:
see: https://github.com/raydium-io/raydium-cp-swap/blob/87685cf221e7d0b06419c6c750bd963b6780dca9/programs/cp-swap/src/curve/calculator.rs#L102C13-L102C22
If you look closely
protocol_fee
is some x percentage of trade_fee andfund_fee
is also some percentage of trade_fee.Here:
autobahn/lib/dex-raydium-cp/src/edge.rs
Line 262 in f9e8f8b
We return the tuple 3rd item as
trade_fee+protocol_fee+fund_fee
it should be justtrade_fee
.The text was updated successfully, but these errors were encountered: