Skip to content

Commit 3eba332

Browse files
committed
fee fix for superOETHb
1 parent b641b79 commit 3eba332

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/templates/otoken/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,14 @@ export async function createRebaseAPY(
7474
order: { timestamp: 'DESC' },
7575
}))
7676
if (lastRebase) {
77+
// Hack solution if `lastYieldDistributionEvent` is missing.
78+
// The split should be 80:20 and this is currently only seen on superOETHb.
79+
// For any amount of yield seen we can assume we've also generated 25% of that amount as fees.
7780
// (current rebasing credits / current rcpt) - (current rebasing credits / past rcpt)
7881
_yield =
7982
(rebaseEvent.rebasingCredits * 10n ** 18n) / rebaseEvent.rebasingCreditsPerToken -
8083
(rebaseEvent.rebasingCredits * 10n ** 18n) / lastRebase.rebasingCreditsPerToken
84+
_fee = (_yield * 25n) / 100n
8185
}
8286
}
8387

0 commit comments

Comments
 (0)