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

OCY_OUSD.sol

OCY -> On-Chain Yield

PreviousOCY_Convex_C.solNextZivoeSwapper.sol

Last updated 11 months ago

Introduction

This contract escrows OUSD and handles accounting for yield distributions.

State Variables

Type
Name
Description

address

GBL

The ZivoeGlobals contract.

address

OUSD

Origin Dollar contract.

address

OCT_YDL

The OCT_YDL contract.

uint256

basis

The basis of OUSD for distribution accounting.

Sections

Read Functions

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

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

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

Write Functions

  • pushToLocker() - Migrates specific amount of ERC20 from owner() to locker.

  • pullFromLocker() - Migrates entire ERC20 balance from locker to owner().

  • pullFromLockerPartial() - Migrates specific amount of ERC20 from locker to owner().

  • rebase() - Ensures this locker has opted-in for the OUSD rebase.

  • updateOCTYDL() - Updates the OCT_YDL endpoint.

  • forwardYield() - Forwards excess basis to OCT_YDL for conversion.

Events

  • BasisAdjusted()

  • UpdatedOCTYDL()

  • YieldForwarded()

Read Functions

canPush()

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

 function canPush() 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; }

canPullPartial()

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

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

Write Functions

pushToLocker()

Migrates specific amount of ERC20 from owner() to locker.

function pushToLocker(
    address asset, 
    uint256 amount, 
    bytes calldata data
) external override onlyOwner;
Type
Name
Description

address

asset

The asset to migrate.

uint256

amount

The amount of "asset" to migrate.

bytes

data

Accompanying transaction data.

Emits the BasisAdjusted() event

pullFromLocker()

Migrates entire ERC20 balance from locker to owner().

function pullFromLocker(address asset, bytes calldata data) external;
Type
Name
Description

address

asset

The asset to migrate.

bytes

data

Accompanying transaction data.

Emits the BasisAdjusted() event

pullFromLockerPartial()

Migrates specific amount of ERC20 from locker to owner().

function pullFromLockerPartial(
    address asset, 
    uint256 amount, 
    bytes calldata data
) external;
Type
Name
Description

address

asset

The asset to migrate.

uint256

amount

The amount of "asset" to migrate.

bytes

data

Accompanying transaction data.

Emits the BasisAdjusted() event

rebase()

Ensures this locker has opted-in for the OUSD rebase.

function rebase() public;

updateOCTYDL()

Updates the OCT_YDL endpoint.

function updateOCTYDL(address _OCT_YDL) external;
Type
Name
Description

address

_OCT_YDL

The new address for OCT_YDL.

Emits the UpdatedOCTYDL() event

forwardYield()

Forwards excess basis to OCT_YDL for conversion.

function forwardYield() public nonReentrant;

Emits the YieldForwarded() event

Events

BasisAdjusted()

Emitted during pushToLocker(), pullFromLocker(), and pullFromLockerPartial()

event BasisAdjusted(uint256 priorBasis, uint256 newBasis);
Type
Indexed
Name
Description

uint256

False

priorBasis

The prior value of basis.

uint256

False

newBasis

The new value of basis.

UpdatedOCTYDL()

Emitted during updateOCTYDL()

event UpdatedOCTYDL(address indexed newOCT, address indexed oldOCT);
Type
Indexed
Name
Description

address

True

newOCT

The new OCT_YDL contract.

address

True

oldOCT

The old OCT_YDL contract.

YieldForwarded()

Emitted during forwardYield()

event YieldForwarded(uint256 amount, uint256 newBasis);
Type
Indexed
Name
Description

uint256

False

amount

The amount of OUSD forwarded.

uint256

False

newBasis

The new basis value.