forked from kilnfi/app-plugin-kiln
-
Notifications
You must be signed in to change notification settings - Fork 3
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 Liquid Restaking flows #16
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ay rather than a raw pointer
accessed in bounds.
apaillier-ledger
approved these changes
Feb 7, 2024
Don't forget to bump the version next time 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In order to support Eigenlayer Restaking flows, 3 functions of the EigenLayer StrategyManager contract have been added to the Kiln plugin (see detail below).
Interactions
Eigenlayer liquid restaking means you deposit ERC20 in Eigenlayer Strategy contracts (stETH to stETH strategy, cbETH to cbETH strategy...) through a contract called StrategyManager. You then have a shares amount in each strategy contract which is different from your ERC20 amounts in some cases (to manage ctokens and atokens on the contract side).
we have 3 functions for the flow we want to clear sign:
we think the 3 first parameters are not relevant to clearsign as they showcase share amount, which would confuse the users as everything is expressed in ERC20 in the dapp for simplicity (like what we did with the ETH pooling flow). We could only showcase the strategies user interact with, but without the erc20 amounts it feels unrelevant.
withdrawer
clearsigning has been added as it is an attack vector, as any address can be put there to claim the withdrawal once it is complete.undelegateIfPossible
is a cleanup feature in the case a user withdraw everything, which we always set to true like the eigenlayer dapp. Doing it or not does not change anything for the user position, and this will be removed in future eigenlayer versions, so we think there is no need to clearsign it.This functions takes a lot of pre-computed data for the smart contract to recompute the withdrawal position and complete it. Most of this data is not relevant to the user (like middlewareTimesIndex, withdrawalstartblocks etc)
Same issue as above, we could clear sign the shares amount but it does not seem relevant as it will confuse the user.
The msg.sender must be the withdrawer and the withdrawer must be the withdrawer set during the queueWithdrawal, so no need to clearsign it either.
Preview