LogoLogo
User DocsDeveloper DocsHow-To Guides
  • ➡️Start Here
  • 🚧Disclaimer
  • User Docs
    • Introduction
    • Fund Overview
    • zVLT
    • Tranches
    • ZVE Token
  • How-To Guides
    • Complete KYC/KYB
    • Mint Tranche Tokens
    • Stake Tranche Tokens
  • Developer Docs
    • Contract Addresses
    • Core Contracts
      • ZivoeDAO.sol
      • ZivoeGlobals.sol
      • ZivoeGovernorV2.sol
      • ZivoeITO.sol
      • ZivoeLocker.sol
      • ZivoeMath.sol
      • ZivoeRewards.sol
      • ZivoeRewardsVesting.sol
      • ZivoeToken.sol
      • ZivoeTranches.sol
      • ZivoeTrancheToken.sol
      • ZivoeYDL.sol
      • ZivoeVault.sol
      • ZivoeRouter.sol
    • Lockers
      • OCC_Modular.sol
      • OCE_ZVE.sol
      • OCL_ZVE.sol
      • OCR_Modular.sol
      • OCT_DAO.sol
      • OCT_Convert.sol
      • OCT_YDL.sol
      • OCT_ZVL.sol
      • OCY_Convex_A.sol
      • OCY_Convex_B.sol
      • OCY_Convex_C.sol
      • OCY_OUSD.sol
      • ZivoeSwapper.sol
  • Official Links
    • Audits
    • Website
    • Twitter
    • Telegram
    • Blog
  • Terms
    • Terms Of Use / Privacy Policy
    • Reg S Compliance
Powered by GitBook

Zivoe Finance - Official Documentation

On this page
  • Introduction
  • Read Functions
  • Write Functions
  1. Developer Docs
  2. Core Contracts

ZivoeVault.sol

ERC-4626 Vault ($zVLT)

PreviousZivoeYDL.solNextZivoeRouter.sol

Last updated 10 days ago

Introduction

Implements an ERC-4626 vault using zSTT as the underlying asset and auto-stakes into stSTT

This contract has the following features:

  • Allows user to mint by depositing zSTT (alternatively, burn for zSTT)

  • Interfaces with a router that automates stablecoin deposits, so users can simply interact with the router and deposit USDT, USDC, etc. to mint zVLT tokens

  • Auto-compunds yield with compound() function to claim any outstanding yield (generally in the form of a stablecoin, USDC) which occurs by minting more zSTT and staking into stSTT

State Variables

Type
Name
Description

IERC20

zSTT

The address of the zSTT token (underlying asset)

IZivoeRewards

stSTT

The address of the ZivoeRewards staking contract

IZivoeTranches

ZVT

The address of the ZivoeTranches contract

IZivoeGlobals

GBL

The address of the ZivoeGlobals contract

Read Functions

totalAssets()

Overrides totalAssets(), returns staked amount of zSTT (represented by stSTT)

function totalAssets() public view override returns (uint256);

Returns

Type
Name
Description

uint256

-

stSTT balance held in the vault.

Write Functions

_deposit()

Overrides _deposit(), handles staking deposited zSTT (to receive stSTT)

function _deposit(
    address caller, 
    address receiver, 
    uint256 assets, 
    uint256 shares
) internal override;
Type
Name
Description

address

caller

The caller of the function.

address

receiver

The receiver of shares.

uint256

assets

The amount of assets to deposit.

uint256

shares

The amount of shares to receive.

_withdraw()

Overrides _withdraw(), handles unstaking stSTT (to receive zSTT)

function _withdraw(
    address caller, 
    address receiver, 
    address owner, 
    uint256 assets, 
    uint256 shares
) internal override;
Type
Name
Description

address

caller

The caller of the function.

address

receiver

The receiver of shares.

address

owner

The owner of shares.

uint256

assets

The amount of assets to deposit.

uint256

shares

The amount of shares to receive.

compound()

Claims rewards from stSTT, mints zSTT with USDC, and stakes the zSTT

function compound(address stablecoin) external;
Type
Name
Description

address

stablecoin

The stablecoin to be compounded.

passThrough()

Returns any external tokens to the DAO.

function passThrough(IERC20 asset) external
Type
Name
Description

IERC20

asset

The asset to pass through.