-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add restaking, ssv and steth rewards #2093
add restaking, ssv and steth rewards #2093
Conversation
The ether-fi adapter exports:
|
The ether-fi adapter exports:
|
fees/ether-fi/index.ts
Outdated
toBlock: await options.getEndBlock(), | ||
eventAbi: "event TokenRebased(uint256 indexed reportTimestamp,uint256 timeElapsed,uint256 preTotalShares,uint256 preTotalEther,uint256 postTotalShares,uint256 postTotalEther,uint256 sharesMintedAsFees)", | ||
}); | ||
for (const log of stethRebaseLogs) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not take just the first log instead of looping?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice that would be cleaner it is equivalent to what is being done right now!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make that change because the loop is misleading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
fees/ether-fi/index.ts
Outdated
const stethRebaseLogs = await options.getLogs({ | ||
target: STETH, | ||
fromBlock: await options.getStartBlock(), | ||
toBlock: await options.getEndBlock(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from & toBlock can be skipped, it is automatically pulled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*can you remove line 28 & 29?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
fees/ether-fi/index.ts
Outdated
target: SSV, | ||
eventAbi: "event Transfer(address indexed from, address indexed to, uint256 value)", | ||
topic: "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", | ||
fromBlock: await options.getStartBlock() - 30 * 86400 / 12, //claimed every 31 days |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm, if it is claimed every 31 days, it is better to leave a spike on the chart every 31st day instead of trying to average it.
So, I would remove from & toBlock here as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we report daily revenue, averaging the claimed amount of SSV over 30 days accurately reflects how much SSV was earned each day. Claiming daily is not viable, so we claim monthly, but the SSV accrues daily for running the software. I believe it makes sense to keep it averaged, as this more accurately represents the daily earnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, but it is not really revenue till it is transferred, we apply the same logic for other adapters that we have listed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@g1nt0ki any update on this pr? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
The ether-fi adapter exports:
|
fees/ether-fi/index.ts
Outdated
|
||
// add ssv revenue for running ssv validators | ||
const ssvRevenue = await getSsvRevenue(options); | ||
dailyFees.add(SSV, ssvRevenue / BigInt(30)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think the divide by 30 should go away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ur right
The ether-fi adapter exports:
|
No description provided.