0.3% sushiswap contracts modify

In contrast, SushiSwap offers a 0.3% fee for swaps, 0.25% of which is given to the LP, and the remaining 0.05% is distributed to SUSHI token holders.

Community I am looking for where to change in which part of the sushiswap contracts, how can I make these changes or detect the line

As i know, Sushiswap is collecting a 0.3% fee that is then divided into two parts

  • 0.25% goes to LP providers
  • 0.05% goes to treasury for burn

note, 0.5% isn’t indicated but I suppose that’s the case after looking at code const BASE_FEE = new Percent(JSBI.BigInt(30), JSBI.BigInt(10000)) and 0.05% has to go somewhere, pancake is burning it for example

Now, As I mentioned above, the fee is defined in frontend code, JSBI.BigInt(30) . But I can’t find where are they splitting this 30 fee.

There is a code in the backend, a formula that is also stated in Uniswap whitepaper (v2), That might be doing job. They’ve mentioned 1/6 of growth in sqrt(k) that initially I didn’t understand whats how is that related to formula or this fee distribution (yeh, I’m dumb at math things).

My deduction is this - 1/6 (that is roughly 1.16) multiplied by 0.3%, their initial fee and you get 0.048 that is 0.05 right? and since the treasury fee is 0.05 as well, is this the case?

For recheck, I did the same for pancakeswap, which is collecting 0.2% JSBI.BigInt(20) fee, doing same as above you get 0.032 that is 0.03, and their treasury distribution is 0.3%.

I know, I might be looking at big coincidence or just number play that might sound a bit stupid for experienced developer, but I will take a risk to ask - In code, Where is shushiswap or uniswap 0.3% fee is divided into LP providers and treasury.