zenlinkpro/Zenlink-DEX-Module

Protocol fee inaccuracies

Closed this issue · 1 comments

I think there is a misunderstanding about how the protocol fee works, it is documented incorrectly here. There is no reason to limit the fee_point to [0, 30] and a zero value should actually give 100% of the swap fees to the protocol. If you check the Uniswap v2 whitepaper (section 2.4) the protocol fee can be derived using the equation 1/x-1=y where x is the percentage of the exchange fee - e.g. 1/(1/6)-1=5, 1/(1/2)-1=1 (50%).

Thank you very much for your Issue, the author of this document did misunderstand the fee.