If a swap has a trading fee and a zero owner fee, when calculating the owner fee to pool token conversion, the simulated trading fee will be non-zero because we floor the trading fee to 1 token. If the input to trading fee calculation is 0, then we will try to do `0 - 1` on an unsigned int, which causes an underflow error. The fix is to simply return a 0 fee for a 0 input. |
||
---|---|---|
.. | ||
curve | ||
constraints.rs | ||
entrypoint.rs | ||
error.rs | ||
instruction.rs | ||
lib.rs | ||
processor.rs | ||
state.rs |