Skip to content
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

feat(tangle-dapp): Implement stake & unstake liquifier functionality for EVM-based liquid staking #2500

Merged
merged 43 commits into from
Aug 26, 2024

Conversation

yurixander
Copy link
Member

@yurixander yurixander commented Aug 4, 2024

Summary of changes

Provide a detailed description of proposed changes.

  • ➕ Users can now liquid stake and unstake assets for EVM-based chains: Polygon, Livepeer, and Chainlink. More ERC20-based tokens can be easily added and integrated as needed.
  • ➕ On development, Sepolia Testnet is used to interact with some dummy/skeleton liquifier contracts that I deployed. These contracts have the same signature as the actual contracts but with dummy data. This allows for easier testing and development of the liquifier interface.
  • ➕ Added useful step indicator for the processing notification (ex. (1/2)), since the liquid staking process for EVM-based chains is composed of two steps (approve ERC20 for spending, then call liquifier contract).
  • 🔧 Re-organized liquid staking page structure, since now it is no longer a specific page per token.
  • 🔧 Generalized liquid staking logic to accommodate for non-Substrate based chains. This should make it easier to integrate new protocols in the future.
  • 🐛 Fixed bug where scroll area was not scrollable when selecting/changing liquid staking networks.
  • 🐛 Fixed bug where inputting large amounts into the amount input would cause an error to be thrown.

Proposed area of change

Put an x in the boxes that apply.

  • apps/bridge-dapp
  • apps/hubble-stats
  • apps/stats-dapp
  • apps/tangle-dapp
  • apps/testnet-leaderboard
  • apps/faucet
  • apps/zk-explorer
  • libs/webb-ui-components

Reference issue to close (if applicable)

Specify any issues that can be closed from these changes (e.g. Closes #233).

Screen Recording

If possible provide a screen recording of proposed change.

evm.liquid.stake.unstake.mp4

Code Checklist

Please be sure to add .stories documentation if any additions are made to libs/webb-ui-components.

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@yurixander yurixander self-assigned this Aug 4, 2024
Copy link

netlify bot commented Aug 4, 2024

Deploy Preview for tangle-dapp ready!

Name Link
🔨 Latest commit d8b0f0b
🔍 Latest deploy log https://app.netlify.com/sites/tangle-dapp/deploys/66c83e3d9dce5d0008ff4943
😎 Deploy Preview https://deploy-preview-2500--tangle-dapp.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@drewstone drewstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the introduction of Liquifie, it might be better to call them LsProtocolId unless we will map these protocols to chains and use Ethereum chain ID as a common parameter for staking protocols on Ethereum (Chainlink, Graph, Livepeer, etc.)

@yurixander yurixander changed the title feat(tangle-dapp): Implement liquifier support for EVM-based liquid staking feat(tangle-dapp): Implement stake & unstake liquifier functionality for EVM-based liquid staking Aug 23, 2024
@yurixander
Copy link
Member Author

Nearly ready to submit for review here. Just need to cleanup logic and errors.

@yurixander yurixander marked this pull request as ready for review August 23, 2024 07:54
Copy link
Member

@AtelyPham AtelyPham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍!

@drewstone
Copy link
Contributor

My take is that we should use chain selection for chains and token selection for protocols.
image

Right now it looks like you're conflating chain selection with protocols, which creates unnecessarily many options. Ethereum should be what you select for LINK and it should show all valid tokens for Liquid Staking on Ethereum (LINK, GRAPH, Livepeer, etc.), Polygon would be a chain as well and MATIC on that chain.

If this messes with how the naming conventions are in code we should modify things so its clear on this front. But it should be preserved that we use chains for the label that simiarly says Tangle Parachain/Polkadot/etc.

@yurixander
Copy link
Member Author

Ok gotcha so where it says Chainlink I would instead show the chain (Ethereum Mainnet) and then where it says LINK it would be the token on that chain? @drewstone

@drewstone
Copy link
Contributor

Correct @yurixander. I think that slot is best for chain selection so its clear when you're bridging from one chain to another. Therefore, it can be clear if you're liquid staking and remaining on Ethereum vs bridging to Tangle.

@yurixander
Copy link
Member Author

Correct @yurixander. I think that slot is best for chain selection so its clear when you're bridging from one chain to another. Therefore, it can be clear if you're liquid staking and remaining on Ethereum vs bridging to Tangle.

Makes sense and I agree. I'll implement that in my other PR.

@drewstone drewstone merged commit de9b89f into develop Aug 26, 2024
14 checks passed
@drewstone drewstone deleted the yuri/implement-liquifier-frontend branch August 26, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Add stake & unstake liquifier functionality for Ethereum-based tokens such as Chainlink
3 participants