Skip to main content

EthOsTokenVaultEscrow

Git Source ↗

Inherits: ReentrancyGuard ↗, OsTokenVaultEscrow

Used for initiating assets exits from the vault without burning osToken on Ethereum

Functions​

constructor​

Constructor

constructor(
address osTokenVaultController,
address osTokenConfig,
address initialOwner,
address _authenticator,
uint64 _liqThresholdPercent,
uint256 _liqBonusPercent
)
ReentrancyGuard()
OsTokenVaultEscrow(
osTokenVaultController, osTokenConfig, initialOwner, _authenticator, _liqThresholdPercent, _liqBonusPercent
);

Parameters

NameTypeDescription
osTokenVaultControlleraddressThe address of the OsTokenVaultController contract
osTokenConfigaddressThe address of the OsTokenConfig contract
initialOwneraddressThe address of the contract owner
_authenticatoraddressThe address of the OsTokenVaultEscrowAuth contract
_liqThresholdPercentuint64The liquidation threshold percent
_liqBonusPercentuint256The liquidation bonus percent

receive​

Function for receiving assets from the vault

receive() external payable;

_transferAssets​

Internal function for transferring assets from the Vault 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

Events​

AssetsReceived​

Event emitted on assets received by the escrow

event AssetsReceived(address indexed sender, uint256 value);

Parameters

NameTypeDescription
senderaddressThe address of the sender
valueuint256The amount of assets received