Skip to content

Commit

Permalink
empty liquidityProviderFeesV3 for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
liu-zhipeng committed Aug 4, 2022
1 parent 7a178a7 commit 6a9aab4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ export interface TradeContext {
// A portion of each trade goes to
// liquidity providers as a protocol of incentive
// length must be routePath.length - 1
// v2 always = (0.3%) ex [0.003, 0.003]
// v2 always = []
// v3 depends on the fee amount sent on that pool
// - low = 0.05%
// - medium = 0.3%
Expand All @@ -448,7 +448,7 @@ export interface TradeContext {
liquidityProviderFeesV3: string[];
// A portion of each trade goes to
// liquidity providers as a protocol of incentive
// v2 always = (0.3%)
// v2 always = []
// v3 depends on the fee amount sent on that pool
// - low = 0.05%
// - medium = 0.3%
Expand Down Expand Up @@ -983,7 +983,7 @@ console.log(trade);
],
uniswapVersion: 'v2',
liquidityProviderFee: 0.003,
liquidityProviderFeesV3: [0.003, 0.003],
liquidityProviderFeesV3: [],
},
{
expectedConvertQuote: '0.014606303273323544',
Expand Down Expand Up @@ -1272,7 +1272,7 @@ console.log(trade);
],
uniswapVersion: 'v2',
liquidityProviderFee: 0.003,
liquidityProviderFeesV3: [0.003]
liquidityProviderFeesV3: []
},
{
expectedConvertQuote: '446400.4834047',
Expand Down Expand Up @@ -2756,7 +2756,7 @@ console.log(trade);
],
uniswapVersion: 'v2',
liquidityProviderFee: 0.003,
liquidityProviderFeesV3: [0.003, 0.003, 0.003]
liquidityProviderFeesV3: []
},
{
expectedConvertQuote: '0.00022151807282109',
Expand Down
8 changes: 4 additions & 4 deletions src/factories/router/uniswap-router.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,7 @@ export class UniswapRouterFactory {
routes.push({
route: [fromTokenRoutes.token, toTokenRoutes.token],
liquidityProviderFee: this.LIQUIDITY_PROVIDER_FEE_V2,
liquidityProviderFeesV3: [this.LIQUIDITY_PROVIDER_FEE_V2],
liquidityProviderFeesV3: [],
});
}

Expand All @@ -1405,7 +1405,7 @@ export class UniswapRouterFactory {
routes.push({
route: [fromTokenRoutes.token, tokenRoute.token, toTokenRoutes.token],
liquidityProviderFee: this.LIQUIDITY_PROVIDER_FEE_V2,
liquidityProviderFeesV3: new Array(2).fill(this.LIQUIDITY_PROVIDER_FEE_V2),
liquidityProviderFeesV3: [],
});

for (let f = 0; f < fromTokenRoutes.pairs.fromTokenPairs!.length; f++) {
Expand All @@ -1431,7 +1431,7 @@ export class UniswapRouterFactory {
routes.push({
route: workedOutFromRoute,
liquidityProviderFee: this.LIQUIDITY_PROVIDER_FEE_V2,
liquidityProviderFeesV3: new Array(3).fill(this.LIQUIDITY_PROVIDER_FEE_V2),
liquidityProviderFeesV3: [],
});
}
}
Expand Down Expand Up @@ -1460,7 +1460,7 @@ export class UniswapRouterFactory {
routes.push({
route: workedOutToRoute,
liquidityProviderFee: this.LIQUIDITY_PROVIDER_FEE_V2,
liquidityProviderFeesV3: new Array(3).fill(this.LIQUIDITY_PROVIDER_FEE_V2),
liquidityProviderFeesV3: [],
});
}
}
Expand Down

0 comments on commit 6a9aab4

Please sign in to comment.