# Staker Functions

{% hint style="info" %}
These functions apply to all gToken vaults. gDAI is used for demonstration.
{% endhint %}

## Deposit

Deposit DAI in exchange for gDAI. See [#gDAI](https://gains-network.gitbook.io/docs-home/liquidity-farming-pools/gdai-vault#gdai) in overview.

You can deposit at anytime.

![](https://541513631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXazyLIr0z2c0oFESmS%2Fuploads%2F0IQTdFf5R85tPsXeatom%2FScreen%20Shot%202022-12-14%20at%206.00.24%20PM.png?alt=media\&token=c9324642-3df7-4fe4-b94e-b0d472c2e113)

## Deposit with discount and lock

Deposit DAI into the vault in exchange for a gNFT, which represents rights to locked gDAI.&#x20;

Discount percentage is based on the current collateralization ratio of the vault and the duration the staker is willing to lock gDAI for.

You can deposit at anytime.

See [#gNFT](https://gains-network.gitbook.io/docs-home/liquidity-farming-pools/gdai-vault#gnft) in overview.

Current maximum discount: 5%

Current lock window: \[7d, 365d]

![](https://541513631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXazyLIr0z2c0oFESmS%2Fuploads%2F1sThVOLmza9AiMYYPjrE%2FScreen%20Shot%202022-12-14%20at%206.01.21%20PM.png?alt=media\&token=db9d5c35-803d-47d6-9192-62268c2dc2dd)

## Unlock

gNFT holders are able to claim gDAI anytime after the unlock date by unlocking through the UI. This function burns the NFT and transfers gDAI to owner's wallet.

![](https://541513631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXazyLIr0z2c0oFESmS%2Fuploads%2F8yJx6MgAEPTH6gsqP0xC%2FScreen%20Shot%202022-12-14%20at%206.10.08%20PM.png?alt=media\&token=59ee61f4-ce7c-4542-bfa4-83f4bcb7f2fa)

## Withdraw Request

Make a withdraw request for any amount of unlocked gDAI.

This can only be done during the withdraw window of an epoch.&#x20;

See [#Withdraw-Locks](https://gains-network.gitbook.io/docs-home/liquidity-farming-pools/gdai-vault#withdraw-locks) in overview.

![](https://541513631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXazyLIr0z2c0oFESmS%2Fuploads%2F9eXKouDJqGxcsYDppwlT%2FScreen%20Shot%202022-12-14%20at%206.33.01%20PM.png?alt=media\&token=b1317545-c16f-4000-9a6d-7cba0fc0546e)

## Withdraw

When a withdraw request's epoch is the active epoch, the requested amount may be redeemed. If the epoch window is missed, the request becomes invalid and a new request must be made.

This can only be done during the withdraw window of an epoch.

See [#Withdraw-Locks](https://gains-network.gitbook.io/docs-home/liquidity-farming-pools/gdai-vault#withdraw-locks) in overview.

![](https://541513631-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MXazyLIr0z2c0oFESmS%2Fuploads%2F4TlCaS3lxDZ27yvkaKoH%2FScreen%20Shot%202022-12-14%20at%206.34.05%20PM.png?alt=media\&token=642c3911-bbe3-4432-83ea-ea3d44999b44)
