Skip to content

Commit

Permalink
Merge pull request #540 from balancer/fixes
Browse files Browse the repository at this point in the history
fix: include protocol swap fee
  • Loading branch information
gmbronco authored Oct 5, 2023
2 parents 085df5f + e00a22a commit 9d245a7
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions balancer-js/src/modules/pools/apr/apr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -504,18 +504,13 @@ export class PoolApr {
}

private async protocolSwapFeePercentage(pool: Pool) {
let fee;
if (
pool.poolType == 'ComposableStable' ||
(pool.poolType == 'Weighted' && pool.poolTypeVersion == 2)
) {
fee = 0;
} else if (pool.poolType.includes('Gyro') && this.gyroConfigRepository) {
let fee = 0.5;
if (pool.poolType.includes('Gyro') && this.gyroConfigRepository) {
fee = await this.gyroConfigRepository.getGyroProtocolFee(pool.address);
} else if (pool.protocolSwapFeeCache) {
fee = parseFloat(pool.protocolSwapFeeCache);
} else {
fee = (await this.feeCollector.find('')) || 0;
fee = (await this.feeCollector.find('')) || 0.5;
}
return fee;
}
Expand Down

0 comments on commit 9d245a7

Please sign in to comment.