Skip to main content

EthOsTokenRedeemer

Git Source ↗

Inherits: IEthOsTokenRedeemer, ReentrancyGuard ↗, OsTokenRedeemer

This contract is used to redeem OsTokens for the underlying asset.

Functions

constructor

Constructor

constructor(
address vaultsRegistry_,
address osToken_,
address osTokenVaultController_,
address owner_,
uint256 exitQueueUpdateDelay_
)
ReentrancyGuard()
OsTokenRedeemer(vaultsRegistry_, osToken_, osTokenVaultController_, owner_, exitQueueUpdateDelay_);

Parameters

NameTypeDescription
vaultsRegistry_addressThe address of the VaultsRegistry contract
osToken_addressThe address of the OsToken contract
osTokenVaultController_addressThe address of the OsTokenVaultController contract
owner_addressThe address of the owner
exitQueueUpdateDelay_uint256The delay in seconds for exit queue updates

swapAssetsToOsTokenShares

Swap assets to OsToken shares. Must send ETH together with the call.

function swapAssetsToOsTokenShares(address receiver) external payable override returns (uint256 osTokenShares);

Parameters

NameTypeDescription
receiveraddressThe address to receive the OsToken shares

Returns

NameTypeDescription
osTokenSharesuint256The amount of OsToken shares received

_getAssets

Internal function that must be implemented to return the account assets

function _getAssets(address account) internal view override returns (uint256);

Parameters

NameTypeDescription
accountaddressThe address of the account

Returns

NameTypeDescription
<none>uint256The amount of assets in the vault

_transferAssets

Internal function for transferring assets to the receiver

function _transferAssets(address receiver, uint256 assets) internal override nonReentrant;

Parameters

NameTypeDescription
receiveraddressThe address that will receive the assets
assetsuint256The number of assets to transfer

receive

Function for receiving redeemed assets.

receive() external payable;