Skip to main content

VaultGnoStaking

Git Source ↗

Inherits: Initializable ↗, VaultAdmin →, VaultState →, VaultValidators →, VaultEnterExit →, IVaultGnoStaking

Defines the Gnosis staking functionality for the Vault.

Events

XdaiSwapped

Emitted when xDAI is swapped to GNO (deprecated)

event XdaiSwapped(uint256 amount, uint256 assets);

Parameters

NameTypeDescription
amountuint256The amount of xDAI swapped
assetsuint256The amount of GNO received

Functions

deposit

Deposit GNO to the Vault

function deposit(uint256 assets, address receiver, address referrer)
public
virtual
override
returns (uint256 shares);

Parameters

NameTypeDescription
assetsuint256The amount of GNO to deposit
receiveraddressThe address that will receive Vault's shares
referreraddressThe address of the referrer. Set to zero address if not used.

Returns

NameTypeDescription
sharesuint256The number of shares minted

donateAssets

Donate assets to the Vault. Must approve GNO transfer before the call.

function donateAssets(uint256 amount) external override;

Parameters

NameTypeDescription
amountuint256The amount of GNO to donate

receive

Function for receiving xDAI and forwarding it to the tokens converter

receive() external payable;