# Protocol Vault

Protocol Vault is responsible for all token transfers and related functions.

{% hint style="info" %}
Ensure Allowance and Balance before interacting with any of the functions in Protocol Vault!
{% endhint %}

## Write Methods

### receiveDepositWETH

`function receiveDepositWETH(uint256 amount)`

Function to process deposit in the WETH token.

### receiveDepsoitInOtherToken&#x20;

`function receiveDepositInOtherToken(address tokenAddress, uint256 amount)`

Function to receive a deposit in any other token than WETH.

### withdraw

`function withdraw(uint256 amount)`

Function to withdraw any `amount` from your margin.

{% hint style="danger" %}
Ensure that you have no open limit orders to be able to withdraw!
{% endhint %}

{% hint style="info" %}
Check your withdrawable balance from the [checkWithdrawableBalance ](https://xtrading.gitbook.io/docs/margin#checkwithdrawableamount)function on the Margin contract.
{% endhint %}
