# Common Workflows

## Deposits

1. A holder of the underlying ERC20 asset gives proper allowance (<mark style="color:purple;">`approve`</mark>) of that asset to the Firelight Vault.
2. The holder transfers (<mark style="color:purple;">`deposit`</mark> or <mark style="color:purple;">`mint`</mark>) the asset to the Launch Vault, and receives shares.

{% hint style="warning" %}
Optional: User can transfer shares to accounts that are not blocklisted.
{% endhint %}

## Withdrawals

1. The shareholder starts a withdrawal request (<mark style="color:purple;">`withdraw`</mark> or <mark style="color:purple;">`redeem`</mark>) to exchange shares for the underlying assets.
2. After the waiting time has passed, the shareholder can claim the requested withdrawal (<mark style="color:purple;">`claimWithdraw`</mark>) for that period.<br>

## **Useful Functions:**

* <mark style="color:purple;">`asset()`</mark>: Returns the address of the underlying token.
* <mark style="color:purple;">`totalAssets()`</mark>: Returns the total amount of the underlying asset.
* <mark style="color:purple;">`convertToShares(assets)`</mark>: Returns the amount of shares that the vault would exchange for the amount of assets provided.
* <mark style="color:purple;">`convertToAssets(shares)`</mark>: Returns the amount of assets that the vault would exchange for the amount of shares provided.
* <mark style="color:purple;">`isBlocklisted(account)`</mark>: Indicates whether an account is blocklisted.
* <mark style="color:purple;">`depositLimit()`</mark>: The maximum total amount of assets that can be deposited into the vault.
* <mark style="color:purple;">`currentPeriod()`</mark>: Returns the current active period.
* <mark style="color:purple;">`balanceOfAt(account, timestamp)`</mark>: Returns the effective total shares for account at a specific timestamp.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.firelight.finance/technical-documents/common-workflows.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
