solana-program-library/token-swap/program
Jon Cinque 75acddc100
Fix zero fee calculation (#813)
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.
2020-11-09 19:01:21 +01:00
..
inc Reorganize crates based on program 2020-08-08 15:25:47 -07:00
src Fix zero fee calculation (#813) 2020-11-09 19:01:21 +01:00
Cargo.toml Bump solana version to v1.4.5 2020-11-06 21:29:04 -08:00
Xargo.toml Reorganize crates based on program 2020-08-08 15:25:47 -07:00
cbindgen.toml Reorganize crates based on program 2020-08-08 15:25:47 -07:00