> For the complete documentation index, see [llms.txt](https://docs.zivoe.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zivoe.com/developer-docs/lockers/ocy_convex_b.sol.md).

# OCY\_Convex\_B.sol

## Introduction

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

{% embed url="<https://www.figma.com/board/qjuQ0uGQl9QD7KeBwyf73d/Zivoe-Visualization?node-id=207-557&t=Bq2wCoSwtQrw54UU-4>" %}

#### State Variables

<table><thead><tr><th width="144.33333333333331">Type</th><th width="200">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>GBL</td><td>The ZivoeGlobals contract.</td></tr><tr><td>address</td><td>OCT_YDL</td><td>The OCT_YDL contract.</td></tr><tr><td>address</td><td>DAI</td><td>Index 0, BasePool</td></tr><tr><td>address</td><td>USDC</td><td>Index 1, BasePool</td></tr><tr><td>address</td><td>USDT</td><td>Index 2, BasePool</td></tr><tr><td>address</td><td>sUSD</td><td>Index 3, BasePool</td></tr><tr><td>address</td><td>CRV</td><td>Native Reward #1</td></tr><tr><td>address</td><td>CVX</td><td>Native Reward #2</td></tr><tr><td>address</td><td>convexDeposit</td><td>Convex information.</td></tr><tr><td>address</td><td>convexPoolToken</td><td>Convex information.</td></tr><tr><td>address</td><td>convexRewards</td><td>Convex information.</td></tr><tr><td>uint256</td><td>convexPoolID</td><td>Convex information.</td></tr><tr><td>address</td><td>curveBasePool</td><td>Curve information.</td></tr><tr><td>address</td><td>curveBasePoolToken</td><td>Curve information.</td></tr></tbody></table>

## **Sections**

[#read-functions](#read-functions "mention")

* [#canpush](#canpush "mention") - Permission for owner to call `pushToLocker()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)
* [#canpull](#canpull "mention") - Permission for owner to call `pullFromLocker()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)
* [#canpullpartial](#canpullpartial "mention") - Permission for owner to call `pullFromLockerPartial()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)

[#write-functions](#write-functions "mention")

* [#pushtolocker](#pushtolocker "mention") - Migrates specific amount of ERC20 from owner() to locker.
* [#pullfromlocker](#pullfromlocker "mention") - Migrates entire ERC20 balance from locker to `owner()`.
* [#pullfromlockerpartial](#pullfromlockerpartial "mention") - Migrates specific amount of ERC20 from locker to `owner()`.
* [#claimrewards](#claimrewards "mention") - Claims rewards and forward them to the OCT\_YDL.
* [#updateoctydl](#updateoctydl "mention") - Updates the OCT\_YDL endpoint.

[#events](#events "mention")

* [#updatedoctydl](#updatedoctydl "mention")

## Read Functions

#### `canPush()`

Permission for owner to call `pushToLocker()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)

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

#### `canPull()`

Permission for owner to call `pullFromLocker()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)

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

#### `canPullPartial()`

Permission for owner to call `pullFromLockerPartial()`. See [ZivoeLocker.sol](/developer-docs/core-contracts/zivoelocker.sol.md)

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

## Write Functions

#### **`pushToLocker()`**

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

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

<table><thead><tr><th width="156.33333333333331">Type</th><th width="160">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>asset</td><td>The asset to migrate.</td></tr><tr><td>uint256</td><td>amount</td><td>The amount of "asset" to migrate.</td></tr><tr><td>bytes</td><td>data</td><td>Accompanying transaction data.</td></tr></tbody></table>

#### **`pullFromLocker()`**

Migrates entire ERC20 balance from locker to `owner()`.

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

<table><thead><tr><th width="156.33333333333331">Type</th><th width="160">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>asset</td><td>The asset to migrate.</td></tr><tr><td>bytes</td><td>data</td><td>Accompanying transaction data.</td></tr></tbody></table>

#### **`pullFromLockerPartial()`**

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

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

```

<table><thead><tr><th width="156.33333333333331">Type</th><th width="160">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>asset</td><td>The asset to migrate.</td></tr><tr><td>uint256</td><td>amount</td><td>The amount of "asset" to migrate.</td></tr><tr><td>bytes</td><td>data</td><td>Accompanying transaction data.</td></tr></tbody></table>

#### `claimRewards()`

Claims rewards and forward them to the OCT\_YDL.

```solidity
function claimRewards(bool extra) public nonReentrant;
```

<table><thead><tr><th width="171.33333333333331">Type</th><th width="184">Name</th><th>Description</th></tr></thead><tbody><tr><td>bool</td><td>extra</td><td>Flag for claiming extra rewards.</td></tr></tbody></table>

#### `updateOCTYDL()`

Updates the OCT\_YDL endpoint.

```solidity
function updateOCTYDL(address _OCT_YDL) external;
```

<table><thead><tr><th width="171.33333333333331">Type</th><th width="184">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td><code>_OCT_YDL</code></td><td>The new address for OCT_YDL.</td></tr></tbody></table>

Emits the [#updatedoctydl](#updatedoctydl "mention") event

## Events

#### **`UpdatedOCTYDL()`**

Emitted during [#updateoctydl](#updateoctydl "mention")

```solidity
event UpdatedOCTYDL(address indexed newOCT, address indexed oldOCT);
```

<table><thead><tr><th width="127.33333333333331">Type</th><th width="98">Indexed</th><th width="132">Name</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>True</td><td>newOCT</td><td>The new OCT_YDL contract.</td></tr><tr><td>address</td><td>True</td><td>oldOCT</td><td>The old OCT_YDL contract.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.zivoe.com/developer-docs/lockers/ocy_convex_b.sol.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
