mirror of
https://github.com/grassrootseconomics/erc20-pool.git
synced 2024-12-04 16:46:47 +01:00
fix: include fees in public liquidity
This commit is contained in:
parent
78844169c5
commit
4931ef1d70
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -140,7 +140,6 @@ contract SwapPool {
|
|||||||
uint256 balance;
|
uint256 balance;
|
||||||
uint256 fee;
|
uint256 fee;
|
||||||
uint256 outValue;
|
uint256 outValue;
|
||||||
uint256 trueBalance;
|
|
||||||
|
|
||||||
outValue = getQuote(_outToken, _inToken, _value);
|
outValue = getQuote(_outToken, _inToken, _value);
|
||||||
|
|
||||||
@ -148,9 +147,6 @@ contract SwapPool {
|
|||||||
require(r, "ERR_TOKEN");
|
require(r, "ERR_TOKEN");
|
||||||
balance = abi.decode(v, (uint256));
|
balance = abi.decode(v, (uint256));
|
||||||
|
|
||||||
// unwithdrawn fees should remain untouched
|
|
||||||
trueBalance = balance - fees[_outToken];
|
|
||||||
|
|
||||||
// deduct the fees from the quoted outValue
|
// deduct the fees from the quoted outValue
|
||||||
fee = getFee(outValue);
|
fee = getFee(outValue);
|
||||||
outValue -= fee;
|
outValue -= fee;
|
||||||
|
Loading…
Reference in New Issue
Block a user