oz4626Facet

Custom-made version of Solmate's ERC4626arrow-up-right.

This contract is in charge of managing the transition of user's ETH to the allocation/rebasing of OZL tokens, and vice versa for redemptions.

circle-info

Github repo herearrow-up-right.

Open methods

convertToAssets

function convertToAssets(uint256 shares) public view returns (uint256);

It does the heavy-lifting of calculating how much protocol revenue should the caller receive based on an amount of OZL tokens.

Parameters:

Name
Type
Description

shares

uint256

Amount of OZL tokens to redeem

Return values:

Type
Description

uint256

Protocol revenue to receive, expressed in yvCurve-Tricryptoarrow-up-right

maxWithdraw

function maxWithdraw(address owner) public view returns (uint256);

Queries the maximum amount of protocol revenue a specific OZL holder can receive based on their total OZL balance (expressed in yvCurve-Tricryptoarrow-up-right)

Parameters:

Name
Type
Description

owner

address

Holder of OZL tokens

Return values:

Type
Description

uint256

Amount of protocol revenue that can be redeemed

System methods

deposit

Initiates the deposit of the Account's ETH which ends with the user's new OZL balance.

Parameters:

Name
Type
Description

assets

uint256

Amount of ETH received in the Account

receiver

address

Owner of the Account (aka the user)

lockNum_

uint256

Index of the bit that authorizes the call

redeem

Function that initiates the redemption of an user's OZL balance for the protocol's revenue.

Parameters:

Name
Type
Description

shares

address

Amount of OZL tokens to redeem

receiver

address

Receiver of the protocol's revenue after redemption

owner

address

Owner of the OZL tokens

lockNum_

uint256

Index of the bit that authorizes the call

Return values:

Name
Type
Description

assets

uint256

yvCurve-Tricryptoarrow-up-right balance redeemed (aka the user's protocol revenue according to the redeemed OZL balance)

Last updated