We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 223ad66 + bc8cd1f commit d8ddb1fCopy full SHA for d8ddb1f
src/mapping/lending-pool/v3.ts
@@ -247,8 +247,10 @@ export function handleFlashLoan(event: FlashLoan): void {
247
let pool = Pool.load(poolId) as Pool;
248
249
let premium = event.params.premium;
250
+ // The event to update the flashloanPremiumToProtocol was deprecated in v3.4, and now always returns a default value of 10000
251
+ let flashloanPremiumToProtocol = pool.flashloanPremiumToProtocol || BigInt.fromI32(10000);
252
let premiumToProtocol = premium
- .times(pool.flashloanPremiumToProtocol as BigInt)
253
+ .times(flashloanPremiumToProtocol as BigInt)
254
.plus(BigInt.fromI32(5000))
255
.div(BigInt.fromI32(10000));
256
let premiumToLP = premium.minus(premiumToProtocol);
0 commit comments