Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/banteg/lido-vault
Yearn Vault wrapper for Lido St. Ether
https://github.com/banteg/lido-vault
eth2 lido vyper yearn
Last synced: 2 months ago
JSON representation
Yearn Vault wrapper for Lido St. Ether
- Host: GitHub
- URL: https://github.com/banteg/lido-vault
- Owner: banteg
- License: mit
- Created: 2020-12-19T09:29:12.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-25T09:32:58.000Z (almost 4 years ago)
- Last Synced: 2024-10-04T12:50:06.568Z (3 months ago)
- Topics: eth2, lido, vyper, yearn
- Language: Python
- Homepage:
- Size: 18.6 KB
- Stars: 27
- Watchers: 6
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# Yearn Lido St. Ether Vault
A wrapper for Lido stETH which uses underlying shares instead of balances which can change outside transfers.
The contract follows Yearn Vault conventions.
Mainnet deployment: [0x15a2B3CfaFd696e1C783FE99eed168b78a3A371e](https://etherscan.io/address/0x15a2b3cfafd696e1c783fe99eed168b78a3a371e)
## Interface
The contract implements ERC20, as well as `permit`. It's all standard and not documented here.
Only the non-standard functionality is outlined below.
### `__default__()`
A shortcut to submit ether to Lido and deposit the received stETH into the Vault.### `deposit()`, `deposit(uint256)`, `deposit(uint256,address)`
Deposit stETH tokens into the VaultParameters:
- `tokens` The amount of stETH tokens to deposit (default: `balanceOf(msg.sender)`)
- `recipient` The account to credit with the minted shares (default: `msg.sender`)Returns: The amount of minted shares
### `withdraw()`, `withdraw(uint256)`, `withdraw(uint256,address)`
Withdraw stETH tokens from the Vault.Parameters:
- `shares` The amount of shares to burn for stETH (default: `balanceOf(msg.sender)`)
- `recipient` The account to credit with stETH (default: `msg.sender`)Returns: The amount of withdrawn stETH
### `pricePerShare()`
Get the vault share to stETH ratio.Returns: The value of a single share