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
  • Sections
  • Read Functions
  • Write Functions
  • Events
  1. Developer Docs
  2. Lockers

OCT_Convert.sol

OCT -> On-Chain Treasury

PreviousOCT_DAO.solNextOCT_YDL.sol

Last updated 10 days ago

Introduction

This contract converts zJTT to zSTT, and allows zSTT withdrawals.

State Variables

Type
Name
Description

address

GBL

The ZivoeGlobals contract.

mapping(address => bool)

isDepositor

Whitelist for converters, managed by keepers.

Sections

Read Functions

  • canPush() - Permission for owner to call pushToLocker(). See ZivoeLocker.sol

  • canPushMulti() - Permission for owner to call pushToLockerMulti(). See ZivoeLocker.sol

  • canPull() - Permission for owner to call pullFromLocker(). See ZivoeLocker.sol

  • canPullMulti() - Permission for owner to call pullFromLockerMulti(). See ZivoeLocker.sol

  • canPullPartial() - Permission for owner to call pullFromLockerPartial(). See ZivoeLocker.sol

  • canPullPartialMulti() - Permission for owner to call pullFromLockerMultiPartial(). See ZivoeLocker.sol

Write Functions

Events

Read Functions

canPush()

Permission for owner to call pushToLocker(). See ZivoeLocker.sol

 function canPush() public override pure returns (bool) { return true; }

canPushMulti()

Permission for owner to call pushToLockerMulti(). See ZivoeLocker.sol

 function canPushMulti() public override pure returns (bool) { return true; }

canPull()

Permission for owner to call pullFromLocker(). See ZivoeLocker.sol

function canPull() public override pure returns (bool) { return true; }

canPullMulti()

Permission for owner to call pullFromLockerMulti(). See ZivoeLocker.sol

 function canPullMulti() public override pure returns (bool) { return true; }

canPullPartial()

Permission for owner to call pullFromLockerPartial(). See ZivoeLocker.sol

function canPullPartial() public override pure returns (bool) { return true; }

canPullPartialMulti()

Permission for owner to call pullFromLockerMultiPartial(). See ZivoeLocker.sol

 function canPullPartialMulti() public override pure returns (bool) { return true; }

Write Functions

updateWhitelist()

Updates whitelist.

function updateWhitelist(
    address user, 
    bool status
) external;
Type
Name
Description

address

user

The address to add/remove from whitelist.

bool

status

The new status of user (true = accepted, false = rejected).

convertTranche()

Converts zJTT to zSTT.

function convertTranche(
    uint amount, 
    address stablecoin
) external nonReentrant;
Type
Name
Description

uint

amount

The amount of stablecoin to use for conversion.

address

stablecoin

The stablecoin to use for conversion (will be transferred here from ZivoeDAO)

withdrawTranche()

Converts zSTT to stablecoins.

function withdrawTranche(
    uint amount, 
    address stablecoin
) external nonReentrant;
Type
Name
Description

uint

amount

The amount of stablecoin to use for conversion.

address

stablecoin

The stablecoin to use for conversion (will be transferred here from ZivoeDAO)

Events

TrancheConverted()

event TrancheConverted(
    address stablecoin,
    address caller,
    uint amount
);
Type
Indexed
Name
Description

address

False

stablecoin

The stablecoin converted.

address

False

caller

The caller of the function.

uint256

False

amount

The amount being converted.

TrancheWithdrawn()

event TrancheWithdrawn(
    address stablecoin,
    address caller,
    uint amount
);
Type
Indexed
Name
Description

address

False

stablecoin

The stablecoin withdrawn.

address

False

caller

The caller of the function.

uint256

False

amount

The amount being withdrawn.

- Updates whitelist.

- Converts zJTT to zSTT.

- Converts zSTT to stablecoins.

Emits the event

Emits the event

Emitted during

Emitted during

updateWhitelist
convertTranche
withdrawTranche
TrancheConverted
TrancheWithdrawn
TrancheConverted
TrancheWithdrawn
convertTranche
withdrawTranche