Pods Yield
  • Pods Yield
    • Introduction to Pods Yield
  • stETHvv
    • What is stETHvv?
    • Description
    • System Actors
    • How stETHvv Works
      • User Flow
    • stETHvv Timeline
    • Fees
    • 📃Whitepaper
  • security
    • 🛡️Security Overview
    • 🛡️Audits
    • 🐛Bug Bounty Program (BBP)
    • 🔐Access Control
  • Risks
    • Introduction
    • Market Risks
    • Smart Contract Risks
  • Developers
    • Smart Contracts Overview
      • ConfigurationManager
      • EthAdapter
      • STETHVault
      • BaseVault
    • Contracts Addresses
    • Integration guide
      • How to deposit
      • How to withdraw
      • How to read Vault info
  • Connect
    • Brand Assets
  • Appendix
    • FAQ
    • Glossary of Terms
  • 3rd party integrations
    • 3rd party integrations list
  • Additional Resources
    • pods.finance
    • app.pods.finance
    • Pods' other products
    • Github
    • Blog
    • Discord
    • Twitter
Powered by GitBook
On this page
  • Public State Variables
  • INVESTOR_RATIO
  • investor
  • sharePriceDecimals
  • lastRoundAssets
  • lastSharePrice
  • View Methods
  • assetsOf
  • sharePrice
  • Write Methods
  • depositWithPermit
  • mintWithPermit
  1. Developers
  2. Smart Contracts Overview

STETHVault

PreviousEthAdapterNextBaseVault

Last updated 2 years ago

A Vault that uses variable weekly yields to buy strangles. It uses Lido as a yield source.

src:

Public State Variables

INVESTOR_RATIO

function INVESTOR_RATIO() external view returns (uint256)

INVESTOR_RATIO is the proportion that the weekly yield will be split The precision of this number is set by the variable DENOMINATOR. 5000 is equivalent to 50%.

Returns

Name
Type
Description

_0

uint256

investor ratio value

investor

function investor() external view returns (address)

Returns the investor's wallet. is the role responsible for buying weekly options.

Returns

Name
Type
Description

_0

address

investor address

sharePriceDecimals

function sharePriceDecimals() external view returns (uint8)

Returns

Name
Type
Description

_0

uint8

share price decimals

lastRoundAssets

function lastRoundAssets() external view returns (uint256)

Returns

Name
Type
Description

_0

uint256

Total assets in the end of the last round

lastSharePrice

function lastSharePrice() external view returns (uint256 numerator, uint256 denominator)

Returns

Name
Type
Description

numerator

uint256

Share Price in the end of the last round

denominator

uint256

undefined

View Methods

assetsOf

function assetsOf(address owner) external view returns (uint256)

Outputs the amount of asset tokens of an owner are either waiting for the next round, deposited or committed.

Parameters

Name
Type
Description

owner

address

owner address

Returns

Name
Type
Description

_0

uint256

amount of assets

sharePrice

function sharePrice() external view returns (uint256)

Return the stETH price per share

Each share is considered to be 10^(assets.decimals()) The share price represents the amount of stETH needed to mint one vault share. When the number of vault shares that has been minted thus far is zero, the share price should simply be the ratio of the underlying asset's decimals to the vault's decimals.

Returns

Name
Type
Description

_0

uint256

Current Share Price

Write Methods

depositWithPermit

function depositWithPermit(uint256 assets, address receiver, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable returns (uint256)

Deposit ERC20 tokens with permit, a gasless token approval.

Parameters

Name
Type
Description

assets

uint256

Amount of assets

receiver

address

Receiver address

deadline

uint256

timestamp deadline

v

uint8

transaction signature v

r

bytes32

transaction signature r

s

bytes32

transaction signature s

Returns

Name
Type
Description

_0

uint256

share amount

mintWithPermit

function mintWithPermit(uint256 shares, address receiver, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonpayable returns (uint256)

Mint shares with permit, a gasless token approval.

Parameters

Name
Type
Description

assets

uint256

Amount of assets

receiver

address

Receiver address

deadline

uint256

timestamp deadline

v

uint8

transaction signature v

r

bytes32

transaction signature r

s

bytes32

transaction signature s

Returns

Name
Type
Description

_0

uint256

underlying tokens amount

Mints shares to receiver by depositing exactly amount of underlying tokens. For more information on the signature format, see the EIP2612 specification:

Mints exactly shares to receiver by depositing amount of underlying tokens. For more information on the signature format, see the EIP2612 specification:

https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol
https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L27
https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L28
Investor
https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L29
https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L30
https://github.com/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L31
https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L63
https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L75
https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L82
https://eips.ethereum.org/EIPS/eip-2612#specification
https://github.dev/pods-finance/yield-contracts/blob/main/contracts/vaults/STETHVault.sol#L96
https://eips.ethereum.org/EIPS/eip-2612#specification