OCY_Convex_C.sol

OCY -> On-Chain Yield

Introduction

This contract allocates stablecoins to the PYUSD/USDC base-pool and stakes the LP tokens on Convex.

State Variables

TypeNameDescription

address

GBL

The ZivoeGlobals contract.

address

OCT_YDL

The OCT_YDL contract.

address

PYUSD

Index 0, BasePool

address

USDC

Index 1, BasePool

address

sUSD

Index 3, BasePool

address

CRV

Native Reward #1

address

CVX

Native Reward #2

address

convexDeposit

Convex information.

address

convexPoolToken

Convex information.

address

convexRewards

Convex information.

uint256

convexPoolID

Convex information.

address

curveBasePool

Curve information.

address

curveBasePoolToken

Curve information.

Sections

Read Functions

Write Functions

Events

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; }

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; }

Write Functions

pushToLocker()

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

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

address

asset

The asset to migrate.

uint256

amount

The amount of "asset" to migrate.

bytes

data

Accompanying transaction data.

pullFromLocker()

Migrates entire ERC20 balance from locker to owner().

function pullFromLocker(address asset, bytes calldata data) external;
TypeNameDescription

address

asset

The asset to migrate.

bytes

data

Accompanying transaction data.

pullFromLockerPartial()

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

function pullFromLockerPartial(
    address asset, 
    uint256 amount, 
    bytes calldata data
) external;
TypeNameDescription

address

asset

The asset to migrate.

uint256

amount

The amount of "asset" to migrate.

bytes

data

Accompanying transaction data.

claimRewards()

Claims rewards and forward them to the OCT_YDL.

function claimRewards(bool extra) public nonReentrant;
TypeNameDescription

bool

extra

Flag for claiming extra rewards.

updateOCTYDL()

Updates the OCT_YDL endpoint.

function updateOCTYDL(address _OCT_YDL) external;
TypeNameDescription

address

_OCT_YDL

The new address for OCT_YDL.

Emits the UpdatedOCTYDL() event

Events

UpdatedOCTYDL()

Emitted during updateOCTYDL()

event UpdatedOCTYDL(address indexed newOCT, address indexed oldOCT);
TypeIndexedNameDescription

address

True

newOCT

The new OCT_YDL contract.

address

True

oldOCT

The old OCT_YDL contract.

Last updated

Zivoe Finance - Official Documentation