Uniswap / interface

🦄 Open source interfaces for the Uniswap protocol
https://app.uniswap.org
GNU General Public License v3.0
4.96k stars 5.02k forks source link

Wrap stETH #2864

Open willhennessy opened 2 years ago

willhennessy commented 2 years ago

Description: add support for native wrapping and unwrapping of stETH <-> wstETH, similar to how to handle native wrapping of ETH <-> wETH.

UX:

Screen Shot 2021-11-29 at 1 53 22 PM

Scope: roughly 1 day of engineering work. Don't think we can fit this in December, so leaving open as a good first issue for the community!

qqqzhch commented 1 year ago

I will try this improvement

qqqzhch commented 1 year ago

collect some useful information

stETH https://etherscan.io/address/0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84#code wstETH https://etherscan.io/token/0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0#code

About the smart contract of wstETH

stETH -> wstETH use function wrap

wstETH -> stETH use function unwrap

qqqzhch commented 1 year ago

For eth and weth warp and Related codes is WRAPPED_NATIVE_CURRENCY in constants/tokens.ts useWrapCallback in useWrapCallback.tsx

stETH <-> wstETH warp between erc20

Is it a new configuration e.g. WRAPPED_ERC20_CURRENCY and useErc20WrapCallback.tsx ? @willhennessy