# Start Here

The Time Travel of Money

Flashstake allows anyone to buy, sell, and earn the *future* value of their money, *today*. To time travel with your money, all you have to do is follow three simple steps:

1. Choose the **amount** of tokens you want to stake.
2. Choose the **duration** of time you want to time travel into the future.
3. Instantly and **upfront**, receive the future value of your money, today.

<figure><img src="/files/QBvuum6QAcAej5ewmNMS" alt=""><figcaption><p><em>In the above example, this user is "Flashstaking" 222 stETH for 88 days to earn 4.94 wETH of instant upfront yield at a fixed-rate APY of 9.30%. Without Flashstake, this user would have to wait 88 days to earn this yield.</em></p></figcaption></figure>


# Flash Facts

* User funds cannot get liquidated.
* User funds are always 100% collateralized.
* Users can lock for any amount of time down to the minute.
* Users know precisely when their principal will unlock.
* Users can unlock their principal at any time by repaying a portion of their upfront yield.
* Outside of an unforeseen exploit, it is technically impossible for users to lose their principal.


# Real World Example

* John has $10,000 in a bank earning $1 a day in interest.
* John can instead "Flashstake" $10,000 and redeem $365 today, instantly.
* John retains 100% control of his $10,000 and can unlock it in full after one year.
* John can withdraw his $10,000 early by paying back a decreasing percentage of his $365
* John has just sold the future time value of his money for upfront capital.


# Three Components

There are three primary components to Flashstake. If you take the *time* to fully grasp these concepts, you will understand the powers and infinite possibilities of this time-traveling universe.

1. [Flashstake Protocol <mark style="color:blue;">**(FSP)**</mark>](/flashstake-protocol-fsp)<mark style="color:blue;">**:**</mark> facilitates the creation and activity of *Time Vault Strategies***.**
2. [Time Vault Strategies <mark style="color:purple;">**(TVS)**</mark>](/time-vault-strategies-tvs)<mark style="color:purple;">**:**</mark> custom smart contracts where people buy, sell, and earn *TBTs***.**
3. [Time-Based Tokens <mark style="color:orange;">**(TBT):**</mark>](/time-based-tokens-tbts) represent the time value of money for any digital asset.

<figure><img src="/files/2LpSMdMrfuAUV82lYy8L" alt=""><figcaption></figcaption></figure>


# Flashstake Protocol (FSP)

The Epicenter of Time Travel

The Flashstake Protocol (FSP) is the epicenter of monetary time travel. It has three primary responsibilities:

1. **Store** balances of all [<mark style="color:blue;">**Flashstaking activity**</mark>](https://dune.com/murathan/flashstake-dashboard)
2. **Deploy** and register [<mark style="color:purple;">**Time Vault Strategies (TVS)**</mark>](/time-vault-strategies-tvs)
3. **Create** and mint [<mark style="color:orange;">**Time-Based Tokens (TBTs)**</mark>](/time-based-tokens-tbts)

<figure><img src="/files/KkFVoQjQWpvggnCPRJek" alt=""><figcaption></figcaption></figure>


# Time Vault Strategies (TVS)

The Logic of Time Travel

<mark style="color:purple;">**Time Vault Strategies**</mark> are custom smart contracts that help people buy, sell, and earn *TBTs.*

With a nearly endless amount of possibilities, Time Vaults have the flexibility to make important Flashstaking decisions. Ultimately, Time Vault Strategies is where the complex logic of a Flashstake occurs.&#x20;

* What is the name of the Time Vault?
* What token can be staked?
* What is the source of the yield?
* What is the name of the TBT?
* How much TBT is minted?
* What is the minimum stake duration?
* What is the maximum stake duration?
* Is there a fee taken during the Flashstake?
* If so, what is that fee and where does it go?

{% hint style="info" %}
Strategies can be developed and deployed against the Flash Protocol by **anyone**. This gives Strategy creators maximum flexibility when it comes to internal logic. This also means that interaction with a third party strategy could result in a total loss of funds.

Flash Strategies are isolated from one another which ensures funds are always isolated.
{% endhint %}


# Time Vault Examples

Below are examples of three different people using three different Time Vault Strategies.

* **Vitalik** using a **Lido Time Vault** to generate upfront yield on his **stETH**
* **Stani** using an **Aave v2 Time Vault** to generate upfront yield on his **USDC**
* **Hayden** using a **Uniswap v3 Time Vault** to generate upfront yield on his **ETH/DAI LP token**

<figure><img src="/files/TcsYnXqtQNiDSThX8ERM" alt=""><figcaption></figcaption></figure>


# Time Vault Pools

The most common question people ask is *where does the upfront yield come from?*

Ultimately, Time Vaults use multiple methods of "Pools" to make upfront yield possible. Here are three of the current most used pool types that enable upfront yield.

* Yield Pools
* Liquidity Pools
* Boost Pools

### Example #1: Yield Pool

*How it works:*

* When Time Vault begins generating yield from it's yield source (Aave, Lido, etc), the yield is redirected into a "Yield Pool"
* The only way to get the yield out of the Yield Pool is by burning TBTs
* The amount of yield you can withdraw from Yield Pool is proportional to a user's ownership of TBTs
* For example: If a user owns 10% of all TBTs from this Time Vault, they have the rights to burn and redeem 10% of all yield in this Yield Pool

*Overview:*

* Available Yield: Generated from previous stakers principal
* Yield Claim: Burn TBTs
* Pro: Creates perpetual available yield source
* Con: Takes time to jumpstart and accumulate.

### Example #2: Liquidity Pool

*How it works:*

* Individuals can add liquidity to TBT tokens
* For example: ETH/TBT
* When a user mints TBTs from a Flashstake, the TBT tokens are sold into this Liquidity Pool.
* In this model, LPs are providing this upfront yield so they can earn trading and potentially liquidity mining fees.

*Overview:*

* Available Yield: Generated from TBT liquidity providers
* Yield Claim: Swap TBTs
* Pro: Creates liquidity for TBTs
* Con: Must attract LPs

### Example #3: Boost Pool

*How it works:*

* Anyone can deposits money directly into a Boost Pool
* For example: Blockzero Labs deposits $1000 USDC into the Aave v3 Time Vault
* When a user mints TBTs from a Flashstake, the TBT tokens are burned to redeem USDC from the Boost Pool
* In this model, anyone can subsidize the cost to jumpstart a Time Vault

*Overview:*

* Available Yield: Donated by person or entity
* Yield Claim: Burn TBTs
* Pro: Easy to start
* Con: Donation is an expense


# Time Vault Fees

To incentivize creation and protocol activity, Time Vault creators can take a fee anytime someone uses their Time Vault Strategy.&#x20;

Here's an example where Vitalik takes a 5% wETH fee each time anyone uses his Time Vault to mint rETH-TBT tokens upon staking wETH.

* **Name of Time Vault:** Vitalik's Time Vault
* **Staking Asset:** wETH
* **Yield Source:** Rocket Pool
* **Name of Time Vault Token:** rETH-TBT
* **Stake-Time Ratio:** 1:1
* **Minimum Stake Duration:** 1 Hour
* **Maximum Stake Duration:** 12 Months
* **Time Vault Fee:** 5%
* **Time Vault Fee Wallet:** Vitalik.ETH


# Time Vaults Database

A Directory of TVS

While anyone can create a Time-Vault Strategy at any time, here are the currently developed and most used TVS.

### Aave

[**v2-V1**](/time-vault-strategies-tvs/time-vaults-database/aave/aavev2-v1-strategies)

[**v2-V2**](/time-vault-strategies-tvs/time-vaults-database/aave/aavev2-v2-strategies)

[**v2-V3**](/time-vault-strategies-tvs/time-vaults-database/aave/aavev2-v3-strategies)

[**v3**](/time-vault-strategies-tvs/time-vaults-database/aave/aavev3-strategies)

### Lido Finance

[**stETH**](/time-vault-strategies-tvs/time-vaults-database/lido-finance/steth)

### GMX

[**GLP**](/time-vault-strategies-tvs/time-vaults-database/gmx/glp-strategy)

### Rocket Pool

[**rETH**](/time-vault-strategies-tvs/time-vaults-database/rocket-pool/reth)


# Aave

List of Aave Time Vault Strategies

* [v2-V1](/time-vault-strategies-tvs/time-vaults-database/aave/aavev2-v1-strategies)
* [v2-V2](/time-vault-strategies-tvs/time-vaults-database/aave/aavev2-v2-strategies)
* [v2-V3](/time-vault-strategies-tvs/time-vaults-database/aave/aavev2-v3-strategies)
* [v3](/time-vault-strategies-tvs/time-vaults-database/aave/aavev3-strategies)


# AAVEv2-V1 Strategies

You can read more about overall security and risks of using the Flashstake Protocol by heading over to [Security](/security-and-risks).

### Important

Flashstake Strategies are used by the Flashstake Protocol to facilitate where the staked tokens are directed towards as well as how up-front yield is generated when burning fTokens.

Flashstake Strategies can be developed and registered with the Flashstake Protocol by anyone but the Flashstake DAO chooses which Strategies are listed on the frontend located at app.flashstake.io

### Contract Addresses[](https://docs.flashstake.io/strategies/aavev2-v1.html#contract-addresses)

<table data-header-hidden><thead><tr><th width="144"></th><th></th><th width="136"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Contract Address</td><td>fToken Name</td><td>fToken Address</td></tr><tr><td>Ethereum</td><td>0x89988FB43890C857205Cee04413EF173c93f55fc</td><td>fDAI-8998</td><td>0x5028c667D1C9DA0A9090f16E1607F60B7717FC6a</td></tr><tr><td>Ethereum</td><td>0x15c32F81Df9B00b97B68148B6BdeB72D57f24845</td><td>fUSDC-15c2</td><td>0xe221bBf1D5960FC420D451206cF2ee0539398aAC</td></tr></tbody></table>

Please note: The code for this Strategy can be found via block explorers such as Etherscan/Snowtrace.

### Strategy Information[](https://docs.flashstake.io/strategies/aavev2-v1.html#strategy-information)

AAVEv2-V1 strategies are the first generation of strategies built on top of the AAVE protocol (AAVE version 2).

This strategy is built on top of AAVEv2 which as of Oct 2022 has a market size of over 5 billion USD.

This Flashstake strategy accepts tokens from depositors and pays upfront yield in kind.

Users can early unstake their principal deposit at any time if in possession of the required amount of fTokens. The full amount of accumulating yield is available for redeeming fTokens or direct flashstaking. The deposited stake tokens is redirected to the AAVE-V2 lending pool to generate interest.

This strategy has been tested via testnet competitions which attracted over 10,000 interactions.

Please note this strategy does not allow the Controller to manage deposited funds in any way. The strategy Controller cannot withdraw principal tokens or yield tokens (aTokens in this case).

### Risks[](https://docs.flashstake.io/strategies/aavev2-v1.html#risks)

* In the event a smart contract bug is found in this strategy the Owner/Controller has no ability to “Rescue” funds.
* In the event the underlying protocol is compromised, staked tokens may be at risk.
* In the event the underlying protocol has lent out all Staked tokens, you will be unable to unstake until there is sufficient liquidity.

### Controller Powers[](https://docs.flashstake.io/strategies/aavev2-v1.html#controller-powers)

This Strategy implements Ownable and is controlled by the Flashstake DAO. There are limited powers available over this contract as explained below:

* Ability to withdraw any ERC20 token that is not the AAVE interest bearing token. This is to ensure users can be refunded if ERC20 tokens are accidentally sent to this address. Please note, principal tokens cannot be withdrawn by the Controller.
* Ability to claim AAVE rewards from the AAVE rewards pool. These rewards will be deposited directly into the contract.

“Flashstake DAO” consists of a multisig located at the following addresses:

<table data-header-hidden><thead><tr><th width="132"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Multisig Address</td></tr><tr><td>Ethereum</td><td>0x8603FfE7B00CCd759f28aBfE448454A24cFba581</td></tr><tr><td>Optimism</td><td>0x3144F26fBc2421e5E69f87Ff8c54799e60a4fBB9</td></tr><tr><td>Arbitrum</td><td>0xEeB3f4E245aC01792ECd549d03b91541BC800b31</td></tr></tbody></table>


# AAVEv2-V2 Strategies

You can read more about overall security and risks of using the Flashstake Protocol by heading over to [Security](/security-and-risks).

### Important

Flashstake Strategies are used by the Flashstake Protocol to facilitate where the staked tokens are directed towards as well as how up-front yield is generated when burning fTokens.

Flashstake Strategies can be developed and registered with the Flashstake Protocol by anyone but the Flashstake DAO chooses which Strategies are listed on the frontend located at app.flashstake.io

### Contract Addresses

<table data-header-hidden><thead><tr><th width="128"></th><th></th><th width="147"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Contract Address</td><td>fToken Name</td><td>fToken Address</td></tr><tr><td>Ethereum</td><td>0x6e5eD1A5901E81F6bC008023d766454D831B6617</td><td>fUSDC-6353</td><td>0x32ea96f6f2985bd38e4dac3bc08156198bc2324d</td></tr><tr><td>Ethereum</td><td>0x8373dd2efCaeA8174136E9d5F729219e47ee94ca</td><td>fWETH-8373</td><td>0x4d1733b4a6b92056f77b42e01ff05f0f1e863a5a</td></tr><tr><td>Ethereum</td><td>0x543134eC56eE444403461519C1Ec8590C7475897</td><td>fSNX-5431</td><td>0xb66f4bd1a4f0b594fd5c7c3513b14025d072e31d</td></tr></tbody></table>

Please note: The code for this Strategy can be found via block explorers such as Etherscan/Snowtrace.

### Strategy Information

AAVEv2-V2 strategies are the second generation of strategies built on top of the AAVE protocol (AAVE version 2).

This strategy is exactly the same as the [AAVEv2-V1 strategy](https://docs.flashstake.io/strategies/aavev2-v1.html) with the exception:

* This strategy allows the Controller to update the UserIncentive address at will. This only impacts the number of User Incentive tokens a user receives moving forward.

Please note this strategy does not allow the Controller to manage deposited funds in any way. The strategy Controller cannot withdraw principal tokens or yield tokens (aTokens in this case).

### Risks

* In the event a smart contract bug is found in this strategy the Owner/Controller has no ability to “Rescue” funds.
* In the event the underlying protocol is compromised, staked tokens may be at risk.
* In the event the underlying protocol has lent out all Staked tokens, you will be unable to unstake until there is sufficient liquidity.

### Controller Powers

This Strategy implements Ownable and is controlled by the Flashstake DAO. There are limited powers available over this contract as explained below:

* Ability to withdraw any ERC20 token that is not the AAVE interest bearing token. This is to ensure users can be refunded if ERC20 tokens are accidentally sent to this address. Please note, principal tokens cannot be withdrawn by the Controller.
* Ability to claim AAVE rewards from the AAVE rewards pool. These rewards will be deposited directly into the contract.
* Ability to update the UserIncentive address at will. This only impacts the number of User Incentive tokens a user receives moving forward.

“Flashstake DAO” consists of a multisig located at the following addresses:

<table data-header-hidden><thead><tr><th width="126"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Multisig Address</td></tr><tr><td>Ethereum</td><td>0x8603FfE7B00CCd759f28aBfE448454A24cFba581</td></tr><tr><td>Optimism</td><td>0x3144F26fBc2421e5E69f87Ff8c54799e60a4fBB9</td></tr><tr><td>Arbitrum</td><td>0xEeB3f4E245aC01792ECd549d03b91541BC800b31</td></tr></tbody></table>


# AAVEv2-V3 Strategies

You can read more about the overall security and risks of using the Flashstake Protocol by heading over to [Security](/security-and-risks).

### Important

Flashstake Strategies are used by the Flashstake Protocol to facilitate where the staked tokens are directed towards as well as how up-front yield is generated when burning fTokens.

Flashstake Strategies can be developed and registered with the Flashstake Protocol by anyone but the Flashstake DAO chooses which Strategies are listed on the frontend located at app.flashstake.io

### Contract Addresses

| Network  | Contract Address                           | fToken Name | fToken Address                             |
| -------- | ------------------------------------------ | ----------- | ------------------------------------------ |
| Ethereum | 0xA3F8115F38356a78898D0D3d50faE356A83AC13d | fCRV-A3F8   | 0x93eE9a13daEC3AAA3C18bFdAC9581a3B92e3530C |
| Ethereum | 0xE165d4278f4a629b8Ec906015C95CCEbEC56621a | fBAL-E165   | 0x5FF6D4E7C30EC99F55fD33bD2447c1644fA73C1b |

Please note: The code for this Strategy can be found via block explorers such as Etherscan/Snowtrace.

### Strategy Information

AAVEv2-V3 strategies are the second generation of strategies built on top of the AAVE protocol (AAVE version 2).

This strategy is exactly the same as the [AAVEv2-V1 strategy](https://docs.flashstake.io/strategies/aavev2-v1.html) but introduces additional Controller Powers such as the ability to set the maximum staking duration, permanently lock the maximum staking duration, permanently lock the UserIncentive address and the ability to update the UserIncentive address.

Please note this strategy does not allow the Controller to manage deposited funds in any way. The strategy Controller cannot withdraw principal tokens or yield tokens (aTokens in this case).

### Risks

* In the event a smart contract bug is found in this strategy the Owner/Controller has no ability to “Rescue” funds.
* In the event the underlying protocol is compromised, staked tokens may be at risk.
* In the event the underlying protocol has lent out all Staked tokens, you will be unable to unstake until there is sufficient liquidity.

### Controller Powers

This Strategy implements Ownable and is controlled by the Flashstake DAO. There are limited powers available over this contract as explained below:

* Ability to withdraw any ERC20 token that is not the AAVE interest bearing token. This is to ensure users can be refunded if ERC20 tokens are accidentally sent to this address. Please note, principal tokens cannot be withdrawn by the Controller.
* Ability to claim AAVE rewards from the AAVE rewards pool. These rewards will be deposited directly into the contract.
* Ability to update the UserIncentive address at will. This only impacts the number of User Incentive tokens a user receives moving forward.
* Ability to set the maximum staking duration (only effects new stakes)
* Ability to permanently lock the maximum staking duration (only effects new stakes)
* Ability to permanently lock the user incentive address (only effects new stakes)

“Flashstake DAO” consists of a multisig located at the following addresses:

<table data-header-hidden><thead><tr><th width="130"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Multisig Address</td></tr><tr><td>Ethereum</td><td>0x8603FfE7B00CCd759f28aBfE448454A24cFba581</td></tr><tr><td>Optimism</td><td>0x3144F26fBc2421e5E69f87Ff8c54799e60a4fBB9</td></tr><tr><td>Arbitrum</td><td>0xEeB3f4E245aC01792ECd549d03b91541BC800b31</td></tr></tbody></table>


# AAVEv3 Strategies

You can read more about overall security and risks of using the Flashstake Protocol by heading over to [Security](/security-and-risks).

### **Important**

Flashstake Strategies are used by the Flashstake Protocol to facilitate where the staked tokens are directed towards as well as how up-front yield is generated when burning fTokens.

Flashstake Strategies can be developed and registered with the Flashstake Protocol by anyone but the Flashstake DAO chooses which Strategies are listed on the frontend located at app.flashstake.io

### Contract Addresse

| Network  | Contract Address                           | fToken Name | fToken Address                             |
| -------- | ------------------------------------------ | ----------- | ------------------------------------------ |
| Optimism | 0x28b413F9f09fBA829A4C0B43783541373Ee3F6C3 | fsUSD-28b4  | 0x5028c667D1C9DA0A9090f16E1607F60B7717FC6a |

Please note: The code for this Strategy can be found via block explorers such as Etherscan/Snowtrace.

### Strategy Information

This is the first generation of strategies built on top of the AAVE V3 protocol.

This strategy is built on top of AAVEv3 which as of Oct 2022 has a market size of over 1 billion USD.

This strategy is very similar to the [AAVEv2-V1 strategy](https://docs.flashstake.io/strategies/aavev2-v1.html) but has been adapted to interact with the third version of AAVE protocol (v3). This strategy has been specifically tailored for layer 2 use.

Please note this strategy does not allow the Controller to manage deposited funds in any way. The strategy Controller cannot withdraw principal tokens or yield tokens (aTokens in this case).

### Risks

* In the event a smart contract bug is found in this strategy the Owner/Controller has no ability to “Rescue” funds.
* In the event the underlying protocol is compromised, staked tokens may be at risk.
* In the event the underlying protocol has lent out all Staked tokens, you will be unable to unstake until there is sufficient liquidity.

### Controller Powers

This Strategy implements Ownable and is controlled by the Flashstake DAO. There are limited powers available over this contract as explained below:

* Ability to withdraw any ERC20 token that is not the AAVE interest bearing token. This is to ensure users can be refunded if ERC20 tokens are accidentally sent to this address. Please note, principal tokens cannot be withdrawn by the Controller.
* Ability to claim AAVE rewards from the AAVE rewards pool. These rewards will be deposited directly to the configured address
* Ability to update the UserIncentive address at will. This only impacts the number of User Incentive tokens a user receives moving forward.
* Ability to set the maximum staking duration (only impacts new stakes)
* Ability to permanently lock the maximum staking duration (only impacts new stakes)
* Ability to permanently lock the user incentive address (only impacts new stakes)
* Ability to set the AAVE [refCode](https://docs.aave.com/developers/v/1.0/integrating-aave/referral-program) and address where AAVE incentive rewards are redirected to (only impacts new stakes)

“Flashstake DAO” consists of a multisig located at the following addresses:

<table data-header-hidden><thead><tr><th width="136"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Multisig Address</td></tr><tr><td>Ethereum</td><td>0x8603FfE7B00CCd759f28aBfE448454A24cFba581</td></tr><tr><td>Optimism</td><td>0x3144F26fBc2421e5E69f87Ff8c54799e60a4fBB9</td></tr><tr><td>Arbitrum</td><td>0xEeB3f4E245aC01792ECd549d03b91541BC800b31</td></tr></tbody></table>


# Lido Finance

List of Lido Time Vault Strategies

* [stETH](/time-vault-strategies-tvs/time-vaults-database/lido-finance/steth)


# stETH

You can read more about overall security and risks of using the Flashstake Protocol by heading over to [Security](/security-and-risks).

### Important

Flashstake Strategies are used by the Flashstake Protocol to facilitate where the staked tokens are directed towards as well as how up-front yield is generated when burning fTokens.

Flashstake Strategies can be developed and registered with the Flashstake Protocol by anyone but the Flashstake DAO chooses which Strategies are listed on the frontend located at app.flashstake.io

### Contract Addresses

<table data-header-hidden><thead><tr><th width="126"></th><th></th><th width="143"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Contract Address</td><td>fToken Name</td><td>fToken Address</td></tr><tr><td>Ethereum</td><td>0xB8C60a5C9d73C0406FF279C65E31496a40F0dc5a</td><td>fstETH-B8C6</td><td>0xe2237a34246eEdCEb43283073Ba9AdeF0450351E</td></tr></tbody></table>

Please note: The code for this Strategy can be found via block explorers such as Etherscan.

### Strategy Information

This is the very first liquid ETH staking strategy developed for the Flashstake Protocol.

This strategy is built on top of Lido’s stETH token which as of Dec 2022 has over 4.5 million ETH staked. This consists of over 100,000 depositors.

Lido’s stETH token is one that represents all the staked ETH within Lido combining both initial deposits and staking rewards. stETH tokens are minted whenever ETH is deposited and burned when redeemed.

stETH balances automatically rebase (update) every day around 12PM UTC. This means yield increases within this strategy whenever the rebase occurs.

Learn more: <https://help.lido.fi/en/articles/5230610-what-is-steth>

Please note this strategy does not allow the Controller to manage deposited funds in any way. The strategy controller does not have any permission to withdraw stETH (user funds) on a contract level.

### Risks

* In the event a smart contract bug is found in this strategy the Owner/Controller has no ability to “Rescue” funds.
* In the event the underlying protocol (Lido) is compromised, staked tokens may be at risk.
* Lido is a centralised system so there is trust involved.
* stETH rebases are performed by the Lido Oracle which is trust based.

### Controller Powers

This Strategy implements Ownable and is controlled by the Flashstake DAO. There are limited powers available over this contract as explained below:

* Ability to withdraw any ERC20 token that is not the stETH token. This is to ensure users can be refunded if ERC20 tokens are accidentally sent to this address. Please note, principal tokens cannot be withdrawn by the Controller.
* Ability to update the UserIncentive address at will. This only impacts the number of User Incentive tokens a user receives moving forward.
* Ability to set the maximum staking duration (only impacts new stakes)
* Ability to permanently lock the maximum staking duration (only impacts new stakes)
* Ability to permanently lock the user incentive address (only impacts new stakes)

“Flashstake DAO” consists of a multisig located at the following addresses:

<table data-header-hidden><thead><tr><th width="150"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Multisig Address</td></tr><tr><td>Ethereum</td><td>0x8603FfE7B00CCd759f28aBfE448454A24cFba581</td></tr><tr><td>Optimism</td><td>0x3144F26fBc2421e5E69f87Ff8c54799e60a4fBB9</td></tr><tr><td>Arbitrum</td><td>0xEeB3f4E245aC01792ECd549d03b91541BC800b31</td></tr></tbody></table>


# GMX

List of GMX Time Vault Strategies

* [GLP](/time-vault-strategies-tvs/time-vaults-database/gmx/glp-strategy)


# GLP Strategy

You can read more about overall security and risks of using the Flashstake Protocol by heading over to [Security](/security-and-risks).

### Important

Flashstake Strategies are used by the Flashstake Protocol to facilitate where the staked tokens are directed towards as well as how up-front yield is generated when burning fTokens.

Flashstake Strategies can be developed and registered with the Flashstake Protocol by anyone but the Flashstake DAO chooses which Strategies are listed on the frontend located at app.flashstake.io

### Contract Addresses

<table data-header-hidden><thead><tr><th width="126"></th><th></th><th width="143"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Contract Address</td><td>fToken Name</td><td>fToken Address</td></tr><tr><td>Arbitrum</td><td>0x907a749631AD4149Df1D49Ee2fD40517b12Df573</td><td>fsGLP-907a</td><td>0x5028c667D1C9DA0A9090f16E1607F60B7717FC6a</td></tr></tbody></table>

Please note: The code for this Strategy can be found via block explorers such as Arbiscan.

### Strategy Information

This strategy allows staking of the GMX GLP token. GLP tokens can be acquired [here](https://app.gmx.io/#/buy_glp).

GLP consists of an index of assets used for swaps and leverage trading. It can be minted using any index asset and burnt to redeem any index asset. The price for minting and redemption is calculated based on (total worth of assets in index including profits and losses of open positions) / (GLP supply).

You can read more about the GLP token [here](https://gmxio.gitbook.io/gmx/glp).&#x20;

Historical GLP APR information can be found [here](https://dune.com/saulius/gmx-analytics).&#x20;

The GLP token as of March 2023 has a USD price of $0.977 and is composed of 129M ETH (USD), 87M BTC (USD), 3M LINK (USD) and various other tokens. The current composition of all tokens within the GLP index totals to 470 million USD. You can view the current composition and all tokens within the index fund [here](https://app.gmx.io/#/dashboard).&#x20;

Acquiring the GLP token can only be achieved by depositing tokens at GMX. These GLP tokens are then minted and staked which immediately allows holders to earn WETH (and other tokens) on a block by block basis. This Flashstake strategy allows users to stake their "staked GLP" tokens to earn instant up-front yield.

This Flashstake strategy does not allow the Controller to manage deposited funds in any way. The strategy controller does not have any permission to withdraw GLP (user funds) on a contract level.

### Risks

* In the event a smart contract bug is found in this strategy the Owner/Controller has no ability to “Rescue” funds.
* In the event the underlying protocol (GMX:GLP) is compromised, staked tokens may be at risk.
* Counterparty risks: The GLP pool is the counterparty to traders, if traders make a profit that comes from the value of the GLP pool.
* Token risks: Bridged tokens may depend on the security of the bridge, pegged tokens have risks of depegging.

### Controller Powers

This Strategy implements Ownable and is controlled by the Flashstake DAO. There are limited powers available over this contract as explained below:

* Ability to withdraw any ERC20 token that is not the GLP or sGLP token. This is to ensure users can be refunded if ERC20 tokens are accidentally sent to this address. Please note, principal tokens cannot be withdrawn by the Controller.
* Ability to set the maximum staking duration (only impacts new stakes)
* Ability to permanently lock the maximum staking duration (only impacts new stakes)

“Flashstake DAO” consists of a multisig located at the following addresses:

<table data-header-hidden><thead><tr><th width="150"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Multisig Address</td></tr><tr><td>Ethereum</td><td>0x8603FfE7B00CCd759f28aBfE448454A24cFba581</td></tr><tr><td>Optimism</td><td>0x3144F26fBc2421e5E69f87Ff8c54799e60a4fBB9</td></tr><tr><td>Arbitrum</td><td>0xEeB3f4E245aC01792ECd549d03b91541BC800b31</td></tr></tbody></table>


# Rocket Pool

List of Rocket Pool Time Vault Strategies

* [rETH](/time-vault-strategies-tvs/time-vaults-database/rocket-pool/reth)


# rETH

You can read more about overall security and risks of using the Flashstake Protocol by heading over to [Security](/security-and-risks).

### Important

Flashstake Strategies are used by the Flashstake Protocol to facilitate where the staked tokens are directed towards as well as how up-front yield is generated when burning fTokens.

Flashstake Strategies can be developed and registered with the Flashstake Protocol by anyone but the Flashstake DAO chooses which Strategies are listed on the frontend located at app.flashstake.io

### Contract Addresses

<table data-header-hidden><thead><tr><th width="126"></th><th></th><th width="143"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Contract Address</td><td>fToken Name</td><td>fToken Address</td></tr><tr><td>Ethereum</td><td>0x90185c4daD355cFf27a708BD0132688A03cE1FF7</td><td>FY-rETH</td><td><p></p><p>0x4588ef44721aef888f34e69caaf437733b437756</p></td></tr></tbody></table>

Please note: The code for this Strategy can be found via block explorers such as Etherscan.

### Strategy Information

This is the first generation of strategies built on top of the Rocket Pool protocol.

This strategy is built on top of Rocket Pool's rETH token which as of May 2023 has over 550k ETH staked. This consists of over 2,500 node operators.

Rocket Pool's rETH token is one that represents all the staked ETH within Rocket Pool combining both initial deposits and staking rewards. rETH tokens are minted whenever ETH is deposited and burned when redeemed.

As the supply of rETH changes, its price in relation to ETH will also change to ensure that the value of rETH stays proportional to the underlying ETH.

The strategy accepts WETH tokens and then automatically handles rETH conversions.

Learn more:&#x20;

* <https://docs.rocketpool.net/overview/faq/>
* [https://docs.rocketpool.net/guides/staking/overview.html](https://docs.rocketpool.net/guides/staking/overview.html#how-ethereum-staking-works)

Please note this strategy does not allow the Controller to manage deposited funds in any way. The strategy controller does not have any permission to withdraw WETH or rETH (user funds) on a contract level.

### Risks

* In the event a smart contract bug is found in this strategy the Owner/Controller has no ability to “Rescue” funds.
* In the event the underlying protocol (Rocket Pool) is compromised, staked tokens may be at risk.
* Beacon chain balances are reported to the Rocket Pool Protocol via the [Oracle DAO](https://rocketpool.net/#dao) though a consensus mechanism. The members of the DAO include Bankless, Coinbase Ventures, Rocket Pool, Beaconchain, Etherscan, and several others. If all DAO members collude, they could potentially manipulate the balances reported to the Rocket Pool Protocol.
  * This could lead to a number of problems, including:
    * Invalidating the security of the Rocket Pool Protocol
    * Diluting the value of staked ETH
    * Causing losses for users of the Rocket Pool Protocol
  * It is important to note that the DAO is composed of a variety of reputable organizations, and it is unlikely that they would collude to manipulate the balances. However, it is a potential risk that should be considered by users of the Rocket Pool Protocol.
* The specific details and mechanics of how the price of rETH is determined may be subject to the implementation and governance decisions made by the Rocket Pool protocol. Therefore, it's recommended to refer to the official Rocket Pool documentation or community resources for the most up-to-date and detailed information on the specific mechanisms employed.

### Controller Powers

This Strategy implements Ownable and is controlled by the Flashstake DAO. There are limited powers available over this contract as explained below:

* Ability to withdraw any ERC20 token that is not the WETH or rETH token. This is to ensure users can be refunded if ERC20 tokens are accidentally sent to this address. Please note, principal tokens cannot be withdrawn by the Controller.
* Ability to set the maximum staking duration (only impacts new stakes)
* Ability to permanently lock the maximum staking duration (only impacts new stakes)
* Ability to permanently lock the user incentive address (only impacts new stakes)

“Flashstake DAO” consists of a multisig located at the following addresses:

<table data-header-hidden><thead><tr><th width="150"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Multisig Address</td></tr><tr><td>Ethereum</td><td>0x8603FfE7B00CCd759f28aBfE448454A24cFba581</td></tr><tr><td>Optimism</td><td>0x3144F26fBc2421e5E69f87Ff8c54799e60a4fBB9</td></tr><tr><td>Arbitrum</td><td>0xEeB3f4E245aC01792ECd549d03b91541BC800b31</td></tr></tbody></table>


# Time Vault Interface

On a technical level, a Time Vault consists of a smart contract inheriting the Time Vault interface. It uses one or more DeFi protocols (e.g. AAVE, Convex, etc) to stake a specific token (e.g. DAI, ETH, etc). The [Flash Protocol](https://docs.flashstake.io/smart-contracts/flash-strategy.html) uses the strategy to instantly mint TBTs when staking.

In accordance with the Flashstake Protocol, all strategies utilized must adhere to the Time Vault Interface as defined.

Time Vaults can be created, deployed, and registered by any individual or entity, resulting in varying code sources. The source code for Time Vaults developed by the Flashstake DAO can be accessed by navigating to the corresponding Time Vault on the sidebar.

## Methods

#### Deposit principal

```
function depositPrincipal(uint256 _tokenAmount) external returns (uint256);
```

This function will be called whenever a user stakes via the Flashstake Protocol. The Time Vault owner can choose to implement a fee but the resulting “locked” principal the user should expect after the stake has ended must be returned.

{% hint style="warning" %}
This function should be protected such that only the Flashstake Protocol can execute this. This is to ensure users do not accidentally call this function and lose their funds.
{% endhint %}

#### Withdraw principal

```
function withdrawPrincipal(uint256 _tokenAmount) external;
```

This function should withdraw principal from the underlying strategy (eg AAVE).

{% hint style="info" %}
This function should be protected such that only the Flash Protocol can execute this. Keeping this unprotected would of course mean anyone would withdraw principal tokens from your strategy.
{% endhint %}

#### Burn TBT

```
function burnFToken(
    uint256 _tokenAmount,
    uint256 _minimumReturned,
    address _yieldTo
) external returns (uint256);
```

This is the function the user will be calling when performing a [FlashBurn](https://docs.flashstake.io/core-concepts/flashburn.html). It is responsible for burning the fToken supplied by the user and returning yield to the user.

#### Get principal balance

```
function getPrincipalBalance() external view returns (uint256);
```

This must return the current total of all principal accepted by the contract.

#### Get yield balance

```
function getYieldBalance() external view returns (uint256);
```

This function must report the total yield balance.

#### Get principal address

```
function getPrincipalAddress() external view returns (address);
```

This must return the principal token address (eg DAI).

#### Quote mint fToken

```
function quoteMintFToken(uint256 _tokenAmount, uint256 duration) external view returns (uint256);
```

This function will be called by the Flash Protocol (and frontends) to determine how many fTokens should be minted for a given \_tokenAmount and \_duration (in seconds).

#### Quote burn fToken

```
function quoteBurnFToken(uint256 _tokenAmount) external view returns (uint256);
```

This function must return the yield a user should expect when burning \_tokenAmount fTokens.

#### Set fToken address

```
function setFTokenAddress(address _fTokenAddress) external;
```

The function to set the fERC20 address within the strategy.

Note

This function should be protected such that only the Flash Protocol can execute this.

#### Get max stake duration

```
function getMaxStakeDuration() external view returns (uint256);
```

This function must report the maximum duration a user can stake for. This can either be hardcoded or be a function of on-chain metrics.

### Events

#### BurnedFToken

```
event BurnedFToken(address indexed _address, uint256 _tokenAmount, uint256 _yieldReturned);
```

* **\_address**: the address of the user who burned fTokens.
* **\_tokenAmount**: the number of fTokens burned.
* **\_yieldReturned**: the number of yield tokens returned to the user.


# Time Based Tokens (TBTs)

The Incentive of Time Travel

<mark style="color:orange;">**TBTs (Time-Based Tokens**</mark><mark style="color:orange;">)</mark> represent the time value of money for any digital asset.

When people stake into a Time Vault Strategy, Time-Based Tokens are minted. Each individual Time Vault Strategy has a uniquely assigned TBT.

* Example: Staking USDC into Aave v2 Time Vault Strategy mints the **fUSDC TBT**
* Example: Staking stETH into the Lido Time Vault Strategy mints the **fstETH TBT**
* Example: Staking ETH/DAI LP into the Uniswap Time Vault mints the **ETH/DAI TBT**

A TBT is an ERC-20 token, created by the Flash Protocol whenever a new [strategy](/time-vault-strategies-tvs) is registered. TBTs are specific to a given strategy and represent the [yield pool](/time-vault-strategies-tvs/time-vault-pools#example-1-yield-pool). This means 100% of the total TBT supply can be redeemed for 100% of the total yield in the yield pool in a given strategy.

{% hint style="info" %}
TBTs were previously referred to as "fTokens".
{% endhint %}


# Flashstaking TBTs

Flashstake = Mint + Redeem

The Flashstake Protocol provides a feature called *Flashstake* which enables users to both [Stake](/time-based-tokens-tbts/minting-tbts-staking) and redeem yield (via [FlashBurn](/time-based-tokens-tbts/burning-tbts-flashburn) or [Swapping](/time-based-tokens-tbts/swapping-tbts)) in a single transaction, effectively staking their principal into a [strategy](/time-vault-strategies-tvs) to mint TBTs and then use those TBTs to get upfront yield all in that same transaction.

The [Flashstake function](/smart-contracts/flashstake-protocol/methods#flashstake) also gives users the option to set a slippage value of "minimumReceived" to protect against frontrunning. This can be changed by the user in the Flashstake Dapp's advanced settings section.

{% hint style="info" %}
The [Flashstake Dapp](https://app.flashstake.io) uses a [proxy](/smart-contracts/flash-protocol-proxy) that automatically determines the best yield source to provide upfront yield when performing a Flashstake.
{% endhint %}


# Minting TBTs (Staking)

Creating time value

### Minting TBTs Formula

Ultimately, it is up to the [Time Vault Strategy](/time-vault-strategies-tvs) creator to decide how many [TBTs](/time-based-tokens-tbts) are minted. The most common standard formula to determine the number of minted TBTs is as follows:

$$
MintedTBTs= StakeAmount \* StakeDuration\_{(seconds)} \* \frac{31,709,792,000}{10^{decimals}}
$$

This formula shows that staking 1 principal token for 365 days will result in approximately 1.005 TBTs being minted.

{% hint style="info" %}
Upon staking, it is possible for the user to mint a [FlashNFT](/time-based-tokens-tbts/flashnft) which will represent their stake. FlashNFT’s can also be created after the initial stake providing the Stake still has some number of staked tokens. Some [strategies](/time-vault-strategies-tvs) by default will automatically create the FlashNFT upon staking.
{% endhint %}


# Burning TBTs (FlashBurn)

Redeeming TBTs for value

When a user burns their [TBT tokens](/time-based-tokens-tbts), they can withdraw yield from a [Yield Pool](/time-vault-strategies-tvs/time-vault-pools#example-1-yield-pool). Some [TVS](/time-vault-strategies-tvs) also have a [Boost Pool](/time-vault-strategies-tvs/time-vault-pools#example-3-boost-pool) that provides extra yield on top of the Yield Pool yield.

{% hint style="info" %}
The information provided in this article pertains exclusively to strategies developed by the Flashstake DAO. The process of burning TBTs may vary for strategies developed by external parties.
{% endhint %}

The assets received upon burning TBTs are proportional to the user’s relative ownership of the total TBT supply for that specific strategy and the size of the yield pool. For example, if a user holds 45% of the total TBT supply for a given strategy, they could choose to burn all of those TBTs and redeem 45% of the value within that strategy’s yield pool.

### Burning Math Example

For demonstration purposes, consider a scenario where the AAVE strategy has 400,000 USDC in its associated yield pool and 10,000 TBTs in existence. If you decide to Flashstake 30,000 USDC for 365 days, approximately 30,000 TBTs will be minted, making the total number of TBTs for this AAVE USDC strategy to now be 40,000. Your 30,000 TBTs represent 75% ownership of the yield pool, so if you burn all of your TBTs you can redeem approximately 300,000 USDC.

{% hint style="info" %}
The numbers presented in this example are for illustrative purposes only and should not be treated as actual values or guarantees. Additionally, it is important to note that the TBT minting formula varies depending on the strategy in question. Strategies developed by the Flashstake DAO utilize the formula specified in the TBTs section of the documentation.
{% endhint %}

To burn TBTs, a user can call the “[burnFToken](/smart-contracts/time-vault-strategy/methods#burn-tbd)” function in the associated strategy. Alternatively, this process can also be accomplished in a single transaction using the Flashstake feature which executes a mint and burn in the same transaction.

### Calculating Burn APR

Yield is typically calculated as a percentage of the employed capital and can be represented as Annual Percentage Rate (APR) or Annual Percentage Yield (APY). The formula for calculating the upfront APR is as follows:

$$
APR\_{upfront} = \frac{Return\_{upfront} \* 31,536,000}{Deposit \* StakeDuration\_{(seconds)}}
$$


# Swapping TBTs

Exchanging TBTs for value

When a user swaps their [TBT tokens](/time-based-tokens-tbts), they can buy from or sell into a [Liquidity Pool](/time-vault-strategies-tvs/time-vault-pools#example-2-liquidity-pool).

{% hint style="info" %}
This functionality was introduced with the ["Chronos" update](/frontend-changelog/2023-changelog/flc-2301.26-bootstrap-upgrade).
{% endhint %}

### TBT Liquidity Pools

These pools create a market between users who want yield now vs people who are willing to wait and potentially earn more.&#x20;

On UniswapV3 anyone can [add liquidity](https://app.uniswap.org/#/add/) to a pool, with any range they want, for any TBT token.&#x20;

Liquidity Providers of TBT pools earn fees from swaps. For some [incentivized pools](https://app.xtokenterminal.io/mining/discover?search=flash) they can optionally stake their LP tokens to earn additional yield.

{% hint style="info" %}
The implementation of UniswapV3 in the upgrade of the Flashstake Protocol was selected due to its concentrated liquidity and additional fee tiers, which allows TBT liquidity providers to choose the APR range they wish to add liquidity to and the level of fee they are willing to accept in exchange for enabling Flashstakes.
{% endhint %}

### Selling TBTs

TBT Liquidity pools create an alternative route for upfront yield when Flashstaking by selling the minted TBTs into a liquidity pool all in the same transaction.

If you are holding a TBT token and speculate that interest rates will be going down, you would choose to sell your TBT token.

### Buying TBTs

If you speculate that interest rates will be going up, you would choose to buy more TBTs.

{% hint style="info" %}
Instant upfront-yield rates within the Flashstake Protocol are expected to be lower than the underlying protocol yield rate within efficient markets since instant yield comes at a premium.
{% endhint %}

### Liquidity Math Example

As an example, Bob wishes to speculate on interest rates for stETH. The current Lido (stETH) interest rate is 5%. Bob creates a Uniswap V3 position in the range of 0.01 to 0.06 stETH per TBT. Bob initializes this pool with stETH as a single-sided position allowing Flashstakers to sell their TBTs.

That liquidity provided by Bob allows Flashstakers to receive instant upfront yield at a starting APR rate of 6%, but that rate will continue to go down as more TBTs are sold into the pool, and Bob receives those TBTs. A few months down the line, if the instant upfront-yield rate rises to 10% because Lido's stETH interest rate has also risen to around 10%, this would result in the TBT doubling in value since the interest rate has doubled.

### Slippage

The use of liquidity pools also brings the potential for slippage, which is the difference in price between the quoted and execution prices. Slippage can be a concern for users as they may not be willing to accept a high slippage value. However, it is important to note that traders can still trade large numbers of tokens for another token if they are willing to accept a high slippage value.

Slippage in the Flashstake Protocol works similar to Uniswap V3 liquidity pools. Depending on available liquidity, the larger the number of tokens a user wishes to Flashstake, the larger the slippage will be resulting in a decreasing APR. For example, users can choose to Flashstake a significantly large number of stETH and accept a low APR, but this behavior is not expected in an efficient market.

The user is made aware of this on the frontend through the displayed APR and displayed number of tokens they will receive back as instant upfront-yield.

[ Previous](https://docs.flashstake.io/core-concepts/ftokens.html)[Next ](https://docs.flashstake.io/core-concepts/flashstake.html)<br>


# FlashNFT

<table data-header-hidden><thead><tr><th width="133"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Contract Address</td></tr><tr><td>Ethereum</td><td><a href="https://etherscan.io/address/0x3b090839C26fE3b2BdfA2F4CD7F3ab001ccdF73F">0x3b090839C26fE3b2BdfA2F4CD7F3ab001ccdF73F</a></td></tr><tr><td>Arbitrum</td><td><a href="https://arbiscan.io/address/0xe15314691e916087028a6bf4B8BD1Ced1fD41996">0xe15314691e916087028a6bf4B8BD1Ced1fD41996</a></td></tr><tr><td>Optimism</td><td><a href="https://optimistic.etherscan.io/address/0x3b090839C26fE3b2BdfA2F4CD7F3ab001ccdF73F">0x3b090839C26fE3b2BdfA2F4CD7F3ab001ccdF73F</a></td></tr></tbody></table>

The FlashNFT represents a user’s [staked principal](/time-based-tokens-tbts/minting-tbts-staking) in the Flash Protocol and can be minted at the time of staking or later. Each stake gets its own NFT.

Once the NFT has been minted, the associated stake cannot be withdrawn or modified (unstake early) without the NFT.

### Transferring NFT

The NFT can be transferred to another address, which transfers the ownership of the stake. Only the owner of the NFT has the rights to the associated stake so all staked principal tokens associated with this NFT represents would belong to the new NFT owner.&#x20;

{% hint style="info" %}
Developers can use the FlashNFT token ID to access all information related to the corresponding stake in the Flashstake Protocol.
{% endhint %}


# Liquid Stake (FlashLend)

The Flashstake Collateral of Staked Principal

FlashLend allows users to borrow against their [FlashNFT](/time-based-tokens-tbts/flashnft), which opens up new possibilities for users to:

* **Mint** fc-Tokens which can then be sold for other tokens on the open market
* **Buy any matured principal stake** by spending fc-Tokens and FLASH tokens through a reverse dutch auction system

## Borrowing

Borrowing is the act of depositing a FlashNFT into the Liquid Stake contract to mint [fc-Tokens](#fc-tokens).

## fc-Tokens

Each [Time Vault Strategy](/time-vault-strategies-tvs) has a principal token users deposit upon Staking or Flashstaking. fc-Tokens can be minted by depositing the associated [FlashNFT](/time-based-tokens-tbts/flashnft) into the Liquid Stake contract which will mint the corresponding amount of fc-Tokens that equal the number of principal tokens associated with the [FlashNFT](/time-based-tokens-tbts/flashnft).

For example, if you staked 100 WETH into the rETH Rocket Pool strategy, you would receive a [FlashNFT](/time-based-tokens-tbts/flashnft) which represents your Stake. You can then deposit this [FlashNFT](/time-based-tokens-tbts/flashnft) into the Liquid Stake contract which would mint 100 fc-WETH tokens.&#x20;

* Note: The number of fc-Tokens is dependent on the number of principal tokens which exist within the Stake represented by the FlashNFT. This means the duration of a Flashstake does not change the number of fc-Tokens minted.

fc-Tokens can only be minted by [Borrowing](#borrowing).

## Paying Back

Paying back is the act of withdrawing your FlashNFT from the Liquid Stake contract by burning the exact amount of fc-Tokens that were originally minted when borrowing against it.&#x20;

* Note: This does not remove any principal from the FlashNFT.

For example, if you borrowed against a 100 WETH FlashNFT and minted 100 fc-WETH tokens, then to unstake the FlashNFT (to regain ownership of it and its principal), you would need to have 100 fc-WETH tokens in your wallet which would be burned. &#x20;

## Partial Withdraw

Partial withdraw is the act of removing a portion of the principal token from the FlashNFT by burning the desired amount of fc-Tokens and proportionally required fTokens based on the existing Unstake Early logic.

* Note: This can only be done by the original depositor of the FlashNFT.&#x20;

## Auctions

Any FlashNFT that has been borrowed against will immediately go to Auction as soon as its original Flashstake duration has matured.

Auctions are first come first serve: the first transaction to successfully execute on chain with the required spend amount of fc-Tokens and FLASH tokens will acquire the FlashNFT at the auction and immediately own the FlashNFT and its principal tokens.

* The amount of fc-Tokens required will always be equal to the amount not yet paid back for that FlashNFT.
* The amount of FLASH tokens required will be based on the [Reverse Dutch Auction](#reverse-dutch-auction-phase) rules.

The original depositor of the FlashNFT, the one who borrowed against it to mint fc-Tokens, can pay back the fc-Tokens at any time up until the FlashNFT has been acquired through auction. The original depositor will not have to pay any Flash premium.

* Note: As soon as the FlashNFT has been acquired through auction, the original depositor will no longer be able to pay back fc-Tokens to regain ownership of the FlashNFT.

### Reverse Dutch Auction Phase

FlashNFT's can be purchased via a reverse dutch auction in exchange for the number of fc-Tokens originally minted as well as some Flash premium.

The starting auction premium for all FlashNFTs is 1,500,000 FLASH tokens. The auction price will reduce by 2.48 FLASH tokens per second, every second, for 7 days and 38 seconds, until the premium reaches 0 FLASH.

Example: Alice Flashstakes 100 WETH for 3 months to get upfront yield. 1 month later she chooses to deposit her FlashNFT into the Liquid Stake contract and mint 100 fc-WETH. 2 months later, she has not repaid the 100 fc-WETH, and the Flashstake is now matured, so it will immediately appear available at auction at the starting auction price of 1.5mil FLASH. &#x20;

FLASH tokens paid by the auction winner will go directly to the [Flashstake Treasury](/tokenomics-flash/flashstake-treasury).

## **Flashtronaut Discount**

By holding a [Flashtronaut NFT](/flashtronaut-nfts) in your wallet, while participating in bidding in an Auction, you will receive a 10% discount on total FLASH tokens owed to win the auction.

Example: If the auction just started and the price is 1.5mil FLASH, a Flashtronaut holder will pay 10% less, 150k less, so would pay 1.35mil FLASH instead, to win the auction.  If the auction price was currently 500k FLASH, a Flashtronaut holder would pay 450k FLASH instead.

## fc-Token Liquidity Providers

By providing liquidity for fc-Tokens, your risk is more about time than money. The time risk is how long you would have to wait for an auction to become available to exchange your fc-Tokens for principal, as opposed to selling them on Uniswap.&#x20;

Impermanent loss can happen as 1 token goes down in value relative to another. However, in this case, getting more fc-Tokens at the expense of less of the paired tokens means you are getting more fc-Tokens at a discounted price relative to the principal FlashNFTs. You could remove your liquidity at any time and bid on an Auction to exchange your fc-Tokens for principal.&#x20;

#### Example on how LPs don't suffer much, if any, impermanent loss:

* John adds 1 WETH single sided Uniswap V3 LP to fc-WETH/WETH in a range of 0.95 to 1.00 WETH per 1 fc-WETH
* Some period of time passes and other users have borrowed fc-WETH from their FlashNFTs and have sold fc-WETH.  Let's assume the price goes down to 0.94 WETH per 1 fc-WETH.
* John should now have at least 1.05 fc-WETH tokens, probably more due to LP fees.
* 1.05 fc-WETH can be used to win one or many Auctions whose total principal add up to 1.05 WETH. This assumes no FLASH tokens premium auction costs occur.
* In this example, John added 1 WETH liquidity but acquired 1.05 WETH from auctions. He had no impermanent loss.


# FlashBack

FlashBack allows users to choose some number of ERC-20 tokens and the duration they wish to stake for. These parameters are used to determine how many ERC-20 reward tokens are reserved for the Stake. The reward is always paid out at the end of the Stake. FlashBack stakes can be withdrawn at any point in time however if this is done before the staking period ends, all reward tokens are forfeited and only Staked tokens are returned.

This means a user could choose to Stake 10,000 tokenA for an agreed 5,000 tokenB reward. The user can choose to unstake at any point in time but when unstaking before the agreed duration is completed, all 5,000 reward tokens will be forfeited and the user will get back their original 10,000 staked tokens.

The Staking token and Reward token can be the same ERC-20 token or different.

### Reward Calculations Math

The reward a given stake is entitled to is calculated as shown when staking Flash for Flash (FlashBack):

$$
reward = \frac{((duration\*2) \* (maxAPR \* stakedTokens))} {(10000 \* 994519296000000)}
$$

The reward a given stake is entitled to is calculated as shown when staking Flash LP tokens for Flash (FlashBackLM):

$$
reward = \frac{((flashInLP \* 2) \* \frac{((duration\*\*2) \* (maxAPR \* stakedTokens))} {(10000 \* (31536000 \* maximumStakeDuration))})} {lpTotalSupply}
$$

{% hint style="info" %}
In the event the above calculations are higher than remaining rewards, “reward” will be equal to remaining rewards.
{% endhint %}

### Contract Settings

The maxAPR is configurable by the Owner of the contract and can be increased or decreased at any point in time. The maxAPR variable has been designed to be an integer between 1 and 10,000 which signifies 0.01% and 100%. This variable can be configured to be higher than 10,000 which results in an annual return rate of over 100%.

The FlashBackLM contract has two additional variables that can be updated by the Owner: flashInLP and lpTotalSupply.

{% hint style="info" %}
The changing of parameters such as maxAPR, lpTotalSupply and flashInLP only effect new stakes.
{% endhint %}

### Unstaking

Users are able to unstake early at any point after the minimum staking duration has ended. The FlashBack and FlashBackLM contracts each have their own minimum and maximum staking durations.


# Tokenomics (FLASH)

Unlocking Time Travel

The official token of the Flashstake Protocol is called FLASH.

* [Utility](/tokenomics-flash/token-utility)
* [Time Switch](/tokenomics-flash/time-switch)
* [Flash Capacitor](/tokenomics-flash/flash-capacitor)
* [Flashstake Treasury](/tokenomics-flash/flashstake-treasury)
* [Token Distribution](/tokenomics-flash/token-distribution)

### FLASH Token

* Symbol: FLASH
* Total Supply: 150M

### FLASH Token Contracts

<table data-header-hidden><thead><tr><th width="170"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Contract Address</td></tr><tr><td>Ethereum</td><td><a href="https://etherscan.io/token/0xB1f1F47061A7Be15C69f378CB3f69423bD58F2F8">0xB1f1F47061A7Be15C69f378CB3f69423bD58F2F8</a></td></tr><tr><td>Arbitrum</td><td><a href="https://arbiscan.io/token/0xc628534100180582e43271448098cb2c185795bd">0xc628534100180582E43271448098cb2c185795BD</a></td></tr><tr><td>Optimism</td><td><a href="https://optimistic.etherscan.io/token/0x86bEA60374f220dE9769b2fEf2db725bc1cDd335">0x86bEA60374f220dE9769b2fEf2db725bc1cDd335</a></td></tr><tr><td>Goerli</td><td><a href="https://goerli.etherscan.io/token/0xB1f1F47061A7Be15C69f378CB3f69423bD58F2F8">0xB1f1F47061A7Be15C69f378CB3f69423bD58F2F8</a></td></tr></tbody></table>


# Token Utility

The Key to Time Travel

## Time Fees

FLASH is the exclusive token for consolidating, arbitraging, and unlocking *Time Fees* from the protocol.

1. When anyone uses the Flashstake Protocol, [TBTs](/time-based-tokens-tbts) are minted.
2. Anytime TBTs are minted, a [Time Fee](/tokenomics-flash/time-switch) is sent to the [Flash Capacitor](/tokenomics-flash/flash-capacitor).
3. The only way to remove Time Fees from the Flash Capacitor is by depositing [FLASH](/tokenomics-flash) tokens
4. The deposited FLASH tokens are sent to the [Flashstake Treasury](/tokenomics-flash/flashstake-treasury), further reducing the circulating supply and providing necessary capital for continuous development.&#x20;

## Auction Premium

FLASH is the exclusive token for paying the premium fee for a FlashNFT.

1. When anyone [borrows](/liquid-stake-flashlend#borrowing) from their [FlashNFT](/time-based-tokens-tbts/flashnft), [fc-Tokens](/liquid-stake-flashlend#fc-tokens) are minted.
2. Anytime a FlashNFT that has been borrowed against (and has not been fully [paid back ](/liquid-stake-flashlend#paying-back)yet) has matured, based on the stake duration, it will go to [Auction](/liquid-stake-flashlend#auctions).
3. The first 7 days a FlashNFT is at auction, it is in a [reverse auction phase](/liquid-stake-flashlend#reverse-dutch-auction-phase) that FLASH tokens must also be paid.&#x20;
4. The deposited FLASH tokens are sent to the [Flashstake Treasury](/tokenomics-flash/flashstake-treasury), further reducing the circulating supply and providing necessary capital for continuous development.&#x20;


# Time Switch

How the Protocol Generates Revenue

Similar to how Uniswap v3 has a *Fee Switch*, Flashstake has a *Time Switch*. Each time someone uses the protocol by [minting new TBTs](/time-based-tokens-tbts/minting-tbts-staking), a 0-20% *Time Fee* is taken and sent to the Flash Capacitor.

### Example

* If the protocol has a 5% Time Fee and...
* A user stakes 100 ETH for 1 year which generates 100 ETH [TBT ](/time-based-tokens-tbts)
* 5 ETH TBT goes to the [Flash Capacitor](/tokenomics-flash/flash-capacitor)
* 95 ETH TBT goes to the Flashstaker to be instantly redeemed for yield by [burning](/time-based-tokens-tbts/burning-tbts-flashburn) or [swapping](/time-based-tokens-tbts/swapping-tbts)

### **Current Fee**

The Time Fee is currently set to 5% on all networks.

### **Time Fee Details**

The only way to remove Time Fees from the Flash Capacitor is by depositing [FLASH](/tokenomics-flash) tokens.

The deposited FLASH tokens are sent to the [Flashstake Treasury](/tokenomics-flash/flashstake-treasury), further reducing the circulating supply and providing necessary capital for continuous development.

{% hint style="info" %}
Note: the 0-20% Time Fee is set by the Flashstake Protocol's [setMintFeeInfo](/smart-contracts/flashstake-protocol/methods#set-mint-fee-info).
{% endhint %}


# Flash Capacitor

<table data-header-hidden><thead><tr><th width="254"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Contract Address</td></tr><tr><td>Ethereum</td><td>0xefD1d1eB731BF69F400023C009da79D58765b160</td></tr><tr><td>Arbitrum</td><td>0x08719dcAb4684603AAB851F8Bc2D26ab98b50A77</td></tr><tr><td>Optimism</td><td>0xCb1205AC28693bEda01e0B66e9B4d06231609bFD</td></tr></tbody></table>

The Flashstake Protocol allows for the collection of a fee in the form of TBTs during the minting process when a user stakes into the protocol. This fee is directed towards the Flash Capacitor and is owned by FLASH token holders.

As the protocol grows, various Time Vaults will be developed by both the Flashstake DAO and external developers, resulting in a large number of different TBTs being taken as fees.

The Flash Capacitor allows for the arbitrage of these TBTs in exchange for depositing FLASH tokens. This process is typically carried out by arbitragers, who may accumulate a specific TBT within the Flash Capacitor in exchange for a fixed amount of FLASH tokens.

The fixed amount of Flash tokens is currently set to 100,000 but can be updated by the Flashstake DAO multisig.

### Instructions

There is not yet a way to use the Flash Capacitor from the Flashstake Dapp, but that is planned for a future update. However, you can interact directly with the Flash Capacitor smart contracts [by clicking here to download the Flash Capacitor Instructions pdf.](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuSS80x7aqdxZF3ZpWjhq%2Fuploads%2FEvd415xqLDHtrrr6XXOo%2FInteractingwiththeFlashCapacitor_PDF.pdf?alt=media\&token=6306fec0-b924-47d2-9b88-aff93559e86d)

### Example

If Bob Flashstakes and 8,000 TBTs are minted with a protocol fee of 1%, 80 TBTs would be taken as a fee and directed towards the Flash Capacitor

If Alice, an arbitrager, knows that 80 TBTs can be exchanged for 1,000 USDC if they are burned and redeemed against the yield pool, and 950 USDC can currently buy 100,000 Flash tokens, she might buy 100,000 Flash tokens in order to get the 80 TBTs and make a profit by accumulating them from the Flash Capacitor.

Currently, the Flash Capacitor charges a fee to arbitragers in the form of TBTs, which are then directed to the Flashstake DAO multisig. This fee is implemented to maintain a constant supply of TBTs and prevent potential manipulation of a Time Vault's yield pool.

{% hint style="info" %}
The protocol has a hardcoded maximum limit of 20% for the protocol fee, and the latest protocol fee can be retrieved by polling the subgraph ([read more](/smart-contracts/addresses-and-links)).
{% endhint %}

<figure><img src="/files/RAvtOyFlYTtsnnFEBKL6" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The Flash Capacitor was previously referred to as the fToken Accumulator.
{% endhint %}


# Flashstake Treasury

The Key to Time Travel

Treasury Wallets

<table data-header-hidden><thead><tr><th width="256"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Address</td></tr><tr><td>Ethereum</td><td><a href="https://app.safe.global/balances?safe=eth:0x8603FfE7B00CCd759f28aBfE448454A24cFba581">0x8603FfE7B00CCd759f28aBfE448454A24cFba581</a></td></tr><tr><td>Arbitrum</td><td><a href="https://app.safe.global/balances?safe=arb1:0xEeB3f4E245aC01792ECd549d03b91541BC800b31">0xEeB3f4E245aC01792ECd549d03b91541BC800b31</a></td></tr><tr><td>Optimism</td><td><a href="https://app.safe.global/balances?safe=oeth:0x3144F26fBc2421e5E69f87Ff8c54799e60a4fBB9">0x3144F26fBc2421e5E69f87Ff8c54799e60a4fBB9</a></td></tr></tbody></table>


# Token Distribution

The Key to Time Travel

FLASH has a total fixed supply of 150M tokens. No more tokens can be minted.&#x20;

Completely bootstrapped, there have been no investors, public, or private sales to date.

Flashstake was built upon the legacy of previous versions, facilitated by [Blockzero Labs](https://blockzerolabs.io/) and its community. As a result, a portion of the tokens, roughly one-third (33.83%), was allocated back to the Blockzero ecosystem that made the development of Flashstake possible, with the remaining two-thirds (66.17%) went to the Flashstake Treasury for various project activities.

A budget was approved for various purposes after the launch, which included an airdrop for holders of XIO (Blockzero) and FLASH V1 & V2, compensation for the [Blockzero Labs Treasury](https://app.safe.global/eth:0x5089722613C2cCEe071C39C59e9889641f435F15/balances), incentives for Flashstake Core contributors, a budget for general growth of Flashstake, and funds set aside for the Flashback incentive program.

**Blockzero Labs**

* DAO Treasury: 15.17%
* DAO Members: 18.66%

**Flashstake Treasury**

* Growth Budget: 38.84%
* Flashback Staking Budget: 12.34%
* Core Contributors Budget: 15%

{% hint style="info" %}
The Core Contributor Budget must be earned. This means the rest of the team allocation will only vest if they continue to contribute to Flashstake over the course of two years.
{% endhint %}

<figure><img src="/files/1HgAgWARUJ0PYNGspzU8" alt=""><figcaption></figcaption></figure>

### Vesting Schedule

At the time of launch, the circulating supply of FLASH will include the community airdrop of 28 million FLASH and some tokens from the Flashstake treasury that may be utilized for pre-launch marketing initiatives. The vesting schedules for the budget allocations have been set, with the unlock schedules of tokens shown in the chart below.

* Launch: August 1st, 2022
* 12 months: August 1st, 2023
* 24 months: August 1st, 2024

The Community Airdrop and Flashstake Growth Budget were immediately vested on August 1st, 2022. The Flashback budget and Blockzero Treasury Budgets will be completely vested on August 1st, 2024

Tokens for Flashstake Core Contributors will be fully vested on August 1st, 2025.

<figure><img src="/files/nEuLdhc9EyJbeXKyQ5qe" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
*Vested* does not mean tokens will immediately enter circulation, only that they have the *ability* to enter circulation.
{% endhint %}


# Smart Contracts

* [**Addresses and Links**](/smart-contracts/addresses-and-links)
* [**Flashstake Protocol**](/smart-contracts/flash-protocol-proxy)
* [**Time Vault Strategies**](/smart-contracts/time-vault-strategy)
* [**Flash Protocol Proxy**](/smart-contracts/flash-protocol-proxy)


# Addresses and Links

### Subgraphs

* [Ethereum Mainnet](https://thegraph.com/hosted-service/subgraph/blockzerolabs/flashstake-subgraph)
* [Arbitrum](https://thegraph.com/hosted-service/subgraph/blockzerolabs/flashstake-subgraph-arbitrum)
* [Optimism](https://thegraph.com/hosted-service/subgraph/blockzerolabs/flashstake-subgraph-optimism)
* [Goerli Fuji (testnet)](https://thegraph.com/hosted-service/subgraph/blockzerolabs/flashstake-subgraph-goerli)

{% hint style="info" %}
Above addresses are subject to change if/when infrastructure changes are required.
{% endhint %}

### Contracts and Strategies Links

* Specific contract addresses can be found in the [Time Vault Database](/time-vault-strategies-tvs/time-vaults-database)
* List of deployed strategies can be found [here](https://api.thegraph.com/subgraphs/name/blockzerolabs/flashstake-subgraph/graphql?query=%7B%0A++strategies%28first%3A+1000%29+%7B%0A++++id%0A++++principalTokenAddress%0A++++fTokenAddress%0A++%7D%0A%7D)
* List of whitelisted strategies can be found [here](https://api.flashstake.io/helper/whitelistedStrategies)

### Addresses

#### Mainnet (Ethereum)

<table data-header-hidden><thead><tr><th width="226"></th><th></th></tr></thead><tbody><tr><td>Contract</td><td>Address</td></tr><tr><td>FLASH Token</td><td><a href="https://etherscan.io/address/0xB1f1F47061A7Be15C69f378CB3f69423bD58F2F8">0xB1f1F47061A7Be15C69f378CB3f69423bD58F2F8</a></td></tr><tr><td>Flashstake Protocol</td><td><a href="https://etherscan.io/address/0x78b2d65dd1d3d9Fb2972d7Ef467261Ca101EC2B9">0x78b2d65dd1d3d9Fb2972d7Ef467261Ca101EC2B9</a></td></tr><tr><td>Flash NFT</td><td><a href="https://etherscan.io/address/0x3b090839C26fE3b2BdfA2F4CD7F3ab001ccdF73F">0x3b090839C26fE3b2BdfA2F4CD7F3ab001ccdF73F</a></td></tr><tr><td>Flash TBT Factory</td><td><a href="https://etherscan.io/address/0x05736a8D6bc208B9E3C9A7E20e7f53674AeA6Ab1">0x05736a8D6bc208B9E3C9A7E20e7f53674AeA6Ab1</a></td></tr><tr><td>FlashBack</td><td><a href="https://etherscan.io/address/0xb89494aB70001A2F25372b5E962046908188feEa">0xb89494aB70001A2F25372b5E962046908188feEa</a></td></tr><tr><td>FlashBackLMT2</td><td><a href="https://etherscan.io/address/0xCb1205AC28693bEda01e0B66e9B4d06231609bFD">0xCb1205AC28693bEda01e0B66e9B4d06231609bFD</a></td></tr><tr><td>FlashBackLMT3</td><td><a href="https://etherscan.io/address/0x57D551a18aaE2c9dE6977425f1df34dCd5DB4977">0x57D551a18aaE2c9dE6977425f1df34dCd5DB4977</a></td></tr><tr><td>FTokenAccumulatorV3 "Flash Capacitor"</td><td><a href="https://etherscan.io/address/0xefD1d1eB731BF69F400023C009da79D58765b160">0xefD1d1eB731BF69F400023C009da79D58765b160</a></td></tr><tr><td>FlashProtocolProxyV2</td><td><a href="https://etherscan.io/address/0xB6Db29351C57DBd678E914FbbA0d400Df2806e6D">0xB6Db29351C57DBd678E914FbbA0d400Df2806e6D</a></td></tr><tr><td>LiquidStake</td><td><a href="https://etherscan.io/address/0x21d929770398DF5146346390D2973BF3f30b7684">0x21d929770398DF5146346390D2973BF3f30b7684</a></td></tr></tbody></table>

#### Arbitrum

<table data-header-hidden><thead><tr><th width="231"></th><th></th></tr></thead><tbody><tr><td>Contract</td><td>Address</td></tr><tr><td>FLASH Token</td><td><a href="https://arbiscan.io/address/0xc628534100180582E43271448098cb2c185795BD">0xc628534100180582E43271448098cb2c185795BD</a></td></tr><tr><td>Flashstake Protocol</td><td><a href="https://arbiscan.io/address/0x78b2d65dd1d3d9Fb2972d7Ef467261Ca101EC2B9">0x78b2d65dd1d3d9Fb2972d7Ef467261Ca101EC2B9</a></td></tr><tr><td>Flash NFT</td><td><a href="https://arbiscan.io/address/0xe15314691e916087028a6bf4B8BD1Ced1fD41996">0xe15314691e916087028a6bf4B8BD1Ced1fD41996</a></td></tr><tr><td>Flash TBT Factory</td><td><a href="https://arbiscan.io/address/0x05736a8D6bc208B9E3C9A7E20e7f53674AeA6Ab1">0x05736a8D6bc208B9E3C9A7E20e7f53674AeA6Ab1</a></td></tr><tr><td>FlashBack Flash/Arb 1</td><td><a href="https://arbiscan.io/address/0x57382e85432D97C25F04405BE9F6Dc4bBE00F78B">0x57382e85432D97C25F04405BE9F6Dc4bBE00F78B</a></td></tr><tr><td>FlashBack Flash/Arb 2</td><td><a href="https://arbiscan.io/address/0x340e41F9B235373DA4F499bbaE8F578f50D67a27">0x340e41F9B235373DA4F499bbaE8F578f50D67a27</a></td></tr><tr><td>FlashBack Flash/Weth 1</td><td><a href="https://arbiscan.io/address/0x1426CAcb9accb1C6E763C9aFdBa81f69eA076DC4">0x1426CAcb9accb1C6E763C9aFdBa81f69eA076DC4</a></td></tr><tr><td>FlashBack Flash/Weth 2</td><td><a href="https://arbiscan.io/address/0xee376e38198E42f7fABf03856039805a45292014">0xee376e38198E42f7fABf03856039805a45292014</a></td></tr><tr><td>FTokenAccumulatorV3 "Flash Capacitor"</td><td><a href="https://arbiscan.io/address/0x08719dcAb4684603AAB851F8Bc2D26ab98b50A77">0x08719dcAb4684603AAB851F8Bc2D26ab98b50A77</a></td></tr><tr><td>FlashProtocolProxyV2</td><td><a href="https://arbiscan.io/address/0x9497116D258924621C60384f53afAb29Cb3aE193">0x9497116D258924621C60384f53afAb29Cb3aE193</a></td></tr><tr><td>LiquidStake</td><td><a href="https://arbiscan.io/address/0x7Cd98120D44964cCB670F26DC5E3fdE23f345E23#code">0x7Cd98120D44964cCB670F26DC5E3fdE23f345E23</a></td></tr></tbody></table>

#### Optimistic Ethereum (Optimism)

<table data-header-hidden><thead><tr><th width="240"></th><th></th></tr></thead><tbody><tr><td>Contract</td><td>Address</td></tr><tr><td>Flash Token</td><td><a href="https://optimistic.etherscan.io/address/0x86bea60374f220de9769b2fef2db725bc1cdd335">0x86bEA60374f220dE9769b2fEf2db725bc1cDd335</a></td></tr><tr><td>Flash Protocol</td><td><a href="https://optimistic.etherscan.io/address/0x78b2d65dd1d3d9Fb2972d7Ef467261Ca101EC2B9">0x78b2d65dd1d3d9Fb2972d7Ef467261Ca101EC2B9</a></td></tr><tr><td>Flash NFT</td><td><a href="https://optimistic.etherscan.io/address/0x3b090839C26fE3b2BdfA2F4CD7F3ab001ccdF73F">0x3b090839C26fE3b2BdfA2F4CD7F3ab001ccdF73F</a></td></tr><tr><td>Flash fToken Factory</td><td><a href="https://optimistic.etherscan.io/address/0x05736a8D6bc208B9E3C9A7E20e7f53674AeA6Ab1">0x05736a8D6bc208B9E3C9A7E20e7f53674AeA6Ab1</a></td></tr><tr><td>FTokenAccumulatorV3 "Flash Capacitor"</td><td><a href="https://optimistic.etherscan.io/address/0xCb1205AC28693bEda01e0B66e9B4d06231609bFD">0xCb1205AC28693bEda01e0B66e9B4d06231609bFD</a></td></tr><tr><td>FlashProtocolProxyV2</td><td><a href="https://optimistic.etherscan.io/address/0x7Efcd4C1Ff21fFcBa1b6a245A9e385b4Ff45D6DD">0x7Efcd4C1Ff21fFcBa1b6a245A9e385b4Ff45D6DD</a></td></tr><tr><td>LiquidStake</td><td><a href="https://optimistic.etherscan.io/address/0xbce67CD3a2b97c17BdA92764ea81b3Ef5F06cCFC#code">0xbce67CD3a2b97c17BdA92764ea81b3Ef5F06cCFC</a></td></tr></tbody></table>

#### Goerli (testnet)

<table data-header-hidden><thead><tr><th width="291"></th><th></th></tr></thead><tbody><tr><td>Contract</td><td>Address</td></tr><tr><td>Flash Token</td><td>0xB1f1F47061A7Be15C69f378CB3f69423bD58F2F8</td></tr><tr><td>Flash Protocol</td><td>0x78b2d65dd1d3d9Fb2972d7Ef467261Ca101EC2B9</td></tr><tr><td>Flash NFT</td><td>0x3b090839C26fE3b2BdfA2F4CD7F3ab001ccdF73F</td></tr><tr><td>Flash fToken Factory</td><td>0x05736a8D6bc208B9E3C9A7E20e7f53674AeA6Ab1</td></tr><tr><td>Flash AAVEv2-v2 BAT Strategy</td><td>0xFC3e57B4FAD993813bD9A09951274102aC1F3Bd8</td></tr><tr><td>BAT</td><td>0x515614aA3d8f09152b1289848383A260c7D053Ff</td></tr><tr><td>fBAT-FC3e</td><td>0x5028c667D1C9DA0A9090f16E1607F60B7717FC6a</td></tr><tr><td>FlashBack</td><td>0xDE26dc6115eabfc4D95f4b6e27128FF85156651c</td></tr><tr><td>FlashBackLM</td><td>0x139c72C0335e2EF1Da4d2153664cBFabeDF86cCa</td></tr><tr><td>FTokenAccumulatorV2</td><td>0x8373dd2efCaeA8174136E9d5F729219e47ee94ca</td></tr><tr><td>FlashProtocolProxyV2</td><td>0xd6965f5aeEa4B7Cf094C9F4103a1e7cD2727e84B</td></tr><tr><td>LiquidStake</td><td>0x9b74CE791352CDE33929ACC6F67814485B3C394d</td></tr></tbody></table>

{% hint style="info" %}
There are many testnet strategies deployed and you can find them by polling the subgraph directly [here](https://api.thegraph.com/subgraphs/name/blockzerolabs/flashstake-subgraph-goerli/graphql?query=%7B%0A++strategies%28first%3A+1000%29+%7B%0A++++id%0A++++principalTokenAddress%0A++++fTokenAddress%0A++%7D%0A%7D). You can obtain testnet tokens via: <https://goerlifaucet.com/> <https://app.aave.com/faucet/>
{% endhint %}


# Flashstake Protocol

* [**Methods**](/smart-contracts/flashstake-protocol/methods)
* [**Events**](/smart-contracts/flashstake-protocol/events)
* [**Error Messages**](/smart-contracts/flashstake-protocol/error-messages)


# Methods

#### Register Strategy

```
function registerStrategy(
    address _strategyAddress,
    address _principalTokenAddress,
    string calldata _fTokenName,
    string calldata _fTokenSymbol
) external
```

With the registerStrategy method, you can register a custom strategy for Flashstaking. It takes as parameters:

* **\_strategyAddress**: your strategy’s smart contract address (see [Flash Strategy](https://docs.flashstake.io/smart-contracts/flash-strategy.html))
* **\_principalTokenAddress**: your strategy’s principal token (staked and received). For example, if your strategy is used to stake DAI, \_principalTokenAddress would be the DAI stablecoin’s smart contract address.
* **\_fTokenName**: what the fToken minted when Flashstaking/staking shall be called.
* **\_fTokenSymbol**: which symbol should be given to the fToken minted when Flashstaking/staking.

{% hint style="warning" %}
Naming convention must be followed to be added to the official frontend.

The naming convention for \_fTokenSymbol is a function of the principal token symbol and the first four letters of your strategy - eg fDAI-0123
{% endhint %}

#### Stake

```
function stake(
    address _strategyAddress,
    uint256 _tokenAmount,
    uint256 _stakeDuration,
    address _fTokensTo,
    bool _issueNFT
) public nonReentrant returns (StakeStruct memory _stake) {
```

The stake method creates a new stake with a registered strategy of your choosing. Its parameters are:

* **\_strategyAddress**: address of a registered strategy. You have to register the strategy with the above-described registerStrategy method first before passing its address here.
* **\_tokenAmount**: amount (in Wei) of staked tokens.
* **\_stakeDuration**: total duration (in seconds) of the stake.
* **\_fTokensTo**: the address the minted fTokens shall be sent to.
* **\_issueNFT**: mint stake as NFT upfront.

{% hint style="info" %}
Redirecting fTokens by providing a different address in the \_fTokensTo address will result in only the resulting fTokens to be redirected. The Stake ownership will be retained by the caller. This also means when minting a FlashNFT, this will be retained by the caller (Staker).
{% endhint %}

#### Flashstake

```
function flashStake(
    address _strategyAddress,
    uint256 _tokenAmount,
    uint256 _stakeDuration,
    uint256 _minimumReceived,
    address _yieldTo,
    bool _mintNFT
) external {
```

The **flashStake** method is similar to *stake*, which it calls before burning the minted fTokens for yield. Upon staking, the fTokens minted will be held by the Flash Protocol and then immediately burned with the resulting yield being redirected to \_yieldTo.

{% hint style="info" %}
Redirecting yield by providing a different address in the \_yieldTo address will result in only the resulting yield to be redirected. The Stake ownership will be retained by the caller. This also means when minting a FlashNFT, this will be retained by the caller (Staker).
{% endhint %}

#### Unstake

```
function unstake(
    uint256 _id,
    bool _isNFT,
    uint256 _fTokenToBurn
) external nonReentrant returns (uint256 _principalReturned, uint256 _fTokensBurned) {
```

The *unstake* method unstakes your Flashstake/stake, either partially or completely. Parameters:

* **\_id**: your stake’s ID.
* **\_isNFT**: true if your stake has been minted as an NFT; false otherwise.
* **\_fTokenToBurn**: amount of fTokens to be burnt to unstake your desired amount of principal for your stake.

{% hint style="info" %}
Stakes that have ended should pass 0 in the \_fTokenToBurn parameter.

NFTs are not burned when unstaking - that means the NFTs live forever.
{% endhint %}

#### Issue NFT

```
function issueNFT(uint256 _stakeId) public returns (uint256 _nftId) {
```

This methods issues an NFT from a given stake. It can be called at anytime after the stake’s creation, if an NFT wasn’t initially minted.

It returns the NFT’s ID, which is different from the stake’s ID passed as parameter.

#### Get stake info

```
function getStakeInfo(uint256 _id, bool _isNFT) external view returns (StakeStruct memory _stake) {
```

This method will return all the information for a given stake. The information returned is as follows:

```
struct StakeStruct {
    address stakerAddress; // Address of staker
    address strategyAddress; // Address of strategy being used
    uint256 stakeStartTs; // Unix timestamp of when stake started
    uint256 stakeDuration; // Time in seconds from start time until stake ends
    uint256 stakedAmount; // The amount of tokens staked
    bool active; // Stake has been removed/unstaked
    uint256 nftId; // NFT id if set
    uint256 fTokensToUser; // How many fERC20 tokens were minted
    uint256 fTokensFee; // How many fERC20 tokens were taken as fee
    uint256 totalFTokenBurned; // The total fTokens burned against this Stake (early unstaking related)
    uint256 totalStakedWithdrawn; // The total staked tokens withdrawn from this Stake (early unstaking related)
}
```

#### Set Mint Fee Info

```
function setMintFeeInfo(address _feeRecipient, uint96 _feePercentageBasis) external onlyOwner {
```

* **\_feeRecipient**: the address the fees will go to
* **\_feePercentageBasis**: the percentage of fees to take upon fToken minting

It allows the Owner to set a global fToken mint fee up to a hardcoded maximum of 20%. This means if 1,000 fTokens are minted during the Stake process and the fee is set to 20%, the user will receive 800 fTokens.

{% hint style="info" %}
This function can only be called by the Owner.
{% endhint %}


# Events

#### Strategy Registered

```
event StrategyRegistered(
    address indexed _strategyAddress,
    address indexed _principalTokenAddress,
    address indexed _fTokenAddress
);
```

* **\_strategyAddress**: address of the newly registered strategy.
* **\_principalTokenAddress**: address of the newly registered strategy’s principal token.
* **\_fTokenAddress**: address of the newly registered strategy’s fToken.

#### Staked

```
event Staked(uint256 _stakeId);
```

* **\_stakeId**: ID of the newly created stake.

#### Unstaked

```
event Unstaked(uint256 _stakeId, uint256 _tokensReturned, uint256 _fTokensBurned, bool _stakeFinished);
```

* **\_stakeId**: ID of the stake from which funds were unstaked.
* **\_tokensReturned**: amount of principal tokens withdrawn from stake.
* **\_fTokensBurned**: amount of fTokens burned to perform the unstake.
* **\_stakeFinished**: true if all staked tokens were removed from stake, false otherwise.

#### NFT Issued

```
event NFTIssued(uint256 _stakeId, uint256 nftId);
```

* **\_stakeId**: ID of the stake.
* **nftId**: ID of the newly minted NFT.


# Error Messages

#### SNE: Stake Not Exists

Function: Unstake

Reason: The provided stake reference points to a Stake that is not active.

#### NSO: Not Stake Owner

Function: Unstake

Reason: The caller does not own the referenced Stake.

#### NNO: Not NFT Owner

Function: Unstake

Reason: The caller is not the owner of the supplied NFT id

#### SNM: Stake NFT Missing

Function: Unstake

Reason: The required NFT is missing from the callers wallet.

#### NTR: NFT Token Required

Function: Unstake

Reason: The user may either; not have the associated NFT to the specified Stake or there is no Stake associated to the referenced NFT id.

#### MIN DUR 1HR

Function: Unstake

Reason: The Flash Protocol enforces a waiting time of 1 hour before callers can unstake early.

#### ISD: Invalid Stake Duration

Function: Unstake

Reason: The supplied \_stakeDuration is either not greater 60 seconds or is greater than the max Stake duration as specified by the Flash Strategy.

#### EMD: Exceeds Max Duration

Function: Stake

Reason: The user may either; not have the associated NFT to the specified Stake or there is no Stake associated to the provided NFT Id.<br>


# Time Vault Strategy

* [**Methods**](/smart-contracts/time-vault-strategy/methods)
* [**Events**](/smart-contracts/time-vault-strategy/events)


# Methods

#### Deposit principal <a href="#deposit-principal" id="deposit-principal"></a>

```
function depositPrincipal(uint256 _tokenAmount) external returns (uint256);
```

This function will be called whenever a user stakes via the Flashstake Protocol. The Time Vault owner can choose to implement a fee but the resulting “locked” principal the user should expect after the stake has ended must be returned.

{% hint style="warning" %}
This function should be protected such that only the Flashstake Protocol can execute this. This is to ensure users do not accidentally call this function and lose their funds.
{% endhint %}

#### Withdraw principal

```
function withdrawPrincipal(uint256 _tokenAmount) external;
```

This function should withdraw principal from the underlying strategy (eg AAVE).

{% hint style="info" %}
This function should be protected such that only the Flash Protocol can execute this. Keeping this unprotected would of course mean anyone would withdraw principal tokens from your strategy.
{% endhint %}

#### Burn TBT

```
function burnFToken(
    uint256 _tokenAmount,
    uint256 _minimumReturned,
    address _yieldTo
) external returns (uint256);
```

This is the function the user will be calling when performing a [FlashBurn](/time-based-tokens-tbts/burning-tbts-flashburn). It is responsible for burning the fToken supplied by the user and returning yield to the user.

#### Get principal balance

```
function getPrincipalBalance() external view returns (uint256);
```

This must return the current total of all principal accepted by the contract.

#### Get yield balance

```
function getYieldBalance() external view returns (uint256);
```

This function must report the total yield balance.

#### Get principal address

```
function getPrincipalAddress() external view returns (address);
```

This must return the principal token address (eg DAI).

#### Quote mint fToken

```
function quoteMintFToken(uint256 _tokenAmount, uint256 duration) external view returns (uint256);
```

This function will be called by the Flash Protocol (and frontends) to determine how many fTokens should be minted for a given \_tokenAmount and \_duration (in seconds).

#### Quote burn fToken

```
function quoteBurnFToken(uint256 _tokenAmount) external view returns (uint256);
```

This function must return the yield a user should expect when burning \_tokenAmount fTokens.

#### Set fToken address

```
function setFTokenAddress(address _fTokenAddress) external;
```

The function to set the fERC20 address within the strategy.

Note

This function should be protected such that only the Flash Protocol can execute this.

#### Get max stake duration

```
function getMaxStakeDuration() external view returns (uint256);
```

This function must report the maximum duration a user can stake for. This can either be hardcoded or be a function of on-chain metrics.


# Events

#### BurnedFToken

```
event BurnedFToken(address indexed _address, uint256 _tokenAmount, uint256 _yieldReturned);
```

* **\_address**: the address of the user who burned fTokens.
* **\_tokenAmount**: the number of fTokens burned.
* **\_yieldReturned**: the number of yield tokens returned to the user.


# Flash Protocol Proxy

<table data-header-hidden><thead><tr><th width="194"></th><th></th></tr></thead><tbody><tr><td>Network</td><td>Contract Address</td></tr><tr><td>Ethereum</td><td><a href="https://etherscan.io/address/0xB6Db29351C57DBd678E914FbbA0d400Df2806e6D">0xB6Db29351C57DBd678E914FbbA0d400Df2806e6D</a></td></tr><tr><td>Ethereum: Rocket Pool</td><td><a href="https://etherscan.io/address/0xa092982764b223bACAC64422F4862Fff52eCAFf6">0xa092982764b223bACAC64422F4862Fff52eCAFf6</a></td></tr><tr><td>Arbitrum</td><td><a href="https://arbiscan.io/address/0x9497116D258924621C60384f53afAb29Cb3aE193">0x9497116D258924621C60384f53afAb29Cb3aE193</a></td></tr><tr><td>Optimism</td><td><a href="https://optimistic.etherscan.io/address/0x7Efcd4C1Ff21fFcBa1b6a245A9e385b4Ff45D6DD">0x7Efcd4C1Ff21fFcBa1b6a245A9e385b4Ff45D6DD</a></td></tr><tr><td>Goerli</td><td><a href="https://goerli.etherscan.io/address/0xd6965f5aeEa4B7Cf094C9F4103a1e7cD2727e84B">0xd6965f5aeEa4B7Cf094C9F4103a1e7cD2727e84B</a></td></tr></tbody></table>

The Flash Protocol Proxy smart contract, introduced as part of the CHRONOS [liquidity pools](/time-vault-strategies-tvs/time-vault-pools#example-2-liquidity-pools) update, provides supplementary functionality to users by wrapping the Flashstake Protocol smart contract. This was necessary due to the immutable nature of the Flashstake Protocol smart contract.

Specifically, this smart contract enables the following capabilities:

1. Stake and Flashstake ETH into a WETH strategy.
2. Sign token approvals for tokens that comply with EIP-2612 when staking and Flashstaking.
3. Automatically swap fTokens via a Uniswap V3 route during Flashstaking.
4. Automatically swap a portion of fTokens via a Uniswap V3 route and burn a portion of fTokens against the strategy when Flashstaking.
5. Automatically swap a portion of fTokens via a Uniswap V3 route and burn a portion of fTokens
6. Sign fToken approvals in conjunction with the actions described in 4 and 5 above.
7. Sign fToken approvals when burning against a strategy.


# Liquid Stake

* [**Methods**](/smart-contracts/liquid-stake/methods)
* [**Events**](/smart-contracts/liquid-stake/events)


# Methods

#### Deposit Position <a href="#deposit-principal" id="deposit-principal"></a>

```
function depositPosition(uint256 _nftId, address _fcTokensTo) public returns(address, uint256);
```

This function lets any holder of a FlashNFT to deposit that FlashNFT into this contract and then mint fc-Tokens. The depositor can specify which address to send the fc-Tokens to.&#x20;

#### Withdraw Position Owner

```
function withdrawPositionOwner(uint256 _nftId, address _nftTo) external;
```

This function will withdraw the FlashNFT from this contract by burning the borrowed fc-Tokens. Only the original depositor can withdraw the FlashNFT. The caller can specify which address to send the FlashNFT to.

#### Partial  Withdraw Owner

```
function partialWithdrawOwner(uint256 _nftId, uint256 _fTokensToBurn, address _withdrawTo) external;
```

This function allows principal to be removed from the deposited FlashNFT by paying back both fTokens and fc-Tokens, as though it was both a partial unstake early and a partial collateral payback.

#### Initialise Strategy

```
function initialiseStrategy(address _fsAddress) external;
```

This deploys a new fc-Token for any given strategy address. This only needs to be called once per strategy, and anyone can call this.

#### Get Current Auction Cost

```
function getCurrentAuctionCost(uint256 _nftId, uint256 _flashtronautNftId)
```

This provides the current $FLASH tokens cost for any current auction, by providing the originally deposited FlashNFT id and optionally a Flashtronaut NFT id to receive a discounted FLASH cost.

* Note: The caller must be holding the Flashtronaut in their wallet and calls to this function must be made from the caller otherwise the function will revert with an error.

#### Auction Purchase

```
function auctionPurchase(uint256 _nftId, uint256 _flashtronautNftId);
```

This function will purchase a FlashNFT at auction. The total fc-Tokens and FLASH tokens required to pay for and win the auction will be automatically calculated and removed from the users wallet who calls this function.

* Note: fc-Tokens and Flash must be approved for spending against the Liquid Stake contracts for this function to execute successfully.

### Owner Methods

#### Set Auction Tokens Destination <a href="#deposit-principal" id="deposit-principal"></a>

```
function setAuctionTokensDestination(address _newAuctionTokensDestination) external;
```

This function will change which address the FLASH tokens are sent to when a user spends FLASH tokens to win an auction.

{% hint style="info" %}
This function can only be called by the Owner.
{% endhint %}

#### Set Flashtronaut NFT Address <a href="#deposit-principal" id="deposit-principal"></a>

```
 function setFlashtronautNFTAddress(address _newFlashtronautNFTAddress) external;
```

This function will change which contract address is the only one recognized as the official Flashtronaut NFT address, that any NFT holder of that contract will receive the 10% discount on the FLASH token cost at auctions. &#x20;

* Note: Networks which do not have Flashtronauts are configured to use a dummy NFT contract address where there are no items in the collection. This effectively means there is no discount on these networks.

{% hint style="info" %}
This function can only be called by the Owner.
{% endhint %}

### Helper Methods

#### Quote fcTokens

```
function quoteFCTokens(uint256 _nftId) external;
```

This function provides a calculation of total fc-Tokens minted for the given FlashNFT

#### Get Auction Start Details

```
function getAuctionStartDetails(uint256 _nftId) external;
```

This function provides a calculation of the exact start time of an auction, and if it has already started yet, for any given FlashNFT


# Events

#### AuctionTokensDestinationUpdated

```
event AuctionTokensDestinationUpdated(address _newAuctionTokensDestination);
```

* **\_newAuctionTokensDestination**: the address that the [$FLASH tokens](/tokenomics-flash) will be sent to when they are spent to win an [Auction](/liquid-stake-flashlend#auctions)

#### PositionDeposit

```
event PositionDeposit(uint256 _nftId);
```

* **\_nftId**: the id of the [FlashNFT](/time-based-tokens-tbts/flashnft) that is being deposited and [borrowed](/liquid-stake-flashlend#borrowing) against to mint [fc-Tokens](/liquid-stake-flashlend#fc-tokens)

#### PositionWithdraw

```
event PositionWithdraw(uint256 _nftId);
```

* **\_nftId**: the id of the [FlashNFT](/time-based-tokens-tbts/flashnft) that is being [paid back](/liquid-stake-flashlend#paying-back) by burning [fc-Tokens](/liquid-stake-flashlend#fc-tokens) to withdraw the NFT

#### PositionPartialWithdraw

```
event PositionPartialWithdraw(uint256 _nftId, uint256 _fTokensBurned, uint256 _fcTokensBurned);
```

* **\_nftId**: the id of the [FlashNFT](/time-based-tokens-tbts/flashnft) that is being [partially paid back](/liquid-stake-flashlend#partial-withdraw) by burning fc-Tokens to withdraw the NFT
* **\_fTokensBurned**: the amount of [fTokens](/time-based-tokens-tbts/minting-tbts-staking) required for a [partial unstake](/smart-contracts/flashstake-protocol/methods#unstake) your FlashNFT had it not been borrowed against.
* **\_fcTokensBurned**: the amount of [fc-Tokens](/liquid-stake-flashlend#fc-tokens) to pay back for a [partial withdraw](/liquid-stake-flashlend#partial-withdraw).

#### AuctionPurchase

<pre><code><strong>event AuctionPurchase(uint256 _nftId, uint256 _flashtronautNftId, uint256 _fcTokensBurned, uint256 _premiumPaid);
</strong></code></pre>

* **\_nftId**: the id of the [FlashNFT](/time-based-tokens-tbts/flashnft) that is being purchased at [auction](/liquid-stake-flashlend#auctions).
* **\_flashtronautNftId**: the optionally provided [Flashtronaut NFT](/liquid-stake-flashlend#flashtronaut-discount) that the auction purchaser is holding to give them a discount on premium paid.
* **\_fcTokensBurned**: the amount of [fc-Tokens](/liquid-stake-flashlend#fc-tokens) to pay back the amount still owed from what was [borrowed](/liquid-stake-flashlend#borrowing) by the previous FlashNFT owner.
* **\_premiumPaid:** the amount of [$FLASH tokens](/tokenomics-flash) paid to win the [auction](/liquid-stake-flashlend#auctions).


# Security and Risks

Security has been the top priority while developing the Flashstake protocol. A few of the safety decisions put in place include making sure:

* User funds are always 100% collateralized.
* User funds cannot get liquidated.
* Users know precisely when your principal will unlock, down to the minute.
* Users can unlock their principal at any time by repaying a portion of their upfront yield.

Outside of an unforeseen exploit, it is technically impossible for users to lose their principal.

* [Audits](/security-and-risks/audits)
* [Bounty](broken://pages/sY3XJMES2foE5RCwuIOq)
* [Admin Functionality](/security-and-risks/admin-functionality)
* [Unit Tests](/security-and-risks/unit-tests)
* [Testnet Competitions](/security-and-risks/testnet-competitions)
* [Disclaimer](/security-and-risks/disclaimer)


# Audits

The Flashstake Protocol has been professionally audited by two audit firms, [Peckshield](https://peckshield.com/) and [Secure3/Openkertify](https://www.secure3.io/).

* **PeckShield:** [**`pdf`**](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuSS80x7aqdxZF3ZpWjhq%2Fuploads%2Fg1J8rkqBRiuPZER4ImQk%2Fpeckshield_flashstake_audit.pdf?alt=media\&token=4154c48b-028d-4073-8195-1e3a45cbd407)
* **Openkertify / Secure3:** [**`pdf`**](https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuSS80x7aqdxZF3ZpWjhq%2Fuploads%2FROj5eOQnrj9vn3lRfpgw%2Fsecure3_flashstake_audit.pdf?alt=media\&token=696b19df-b276-4687-a955-e788cd719216)

There is also progress to attain bug bounties from [Immunifi](https://immunefi.com/) and [Hats Finance](https://hats.finance/).


# Admin Functionality

The Flashstake Protocol has no admin functionality to control users' principal or funds at any time.&#x20;

There is only one admin function named [*setMintFeeInfo*](/smart-contracts/flashstake-protocol/methods#set-mint-fee-info).

This function can be updated to adjust the percentage fee taken each time TBTs have been minted and the address they are sent to. The contract has a hardcoded maximum fee limit of 20%, but can be set to any value between 0% and 20%.


# Unit Tests

The Flashstake Protocol has a vast array of unit tests to ensure the protocol behaves as intended. The total code coverage is over 95%

{% hint style="info" %}
Note: The 5% of code not covered is due code written as fail safes for logic paths that are expected to never be possible to be reached. So, it could be technically argued the code has 100% coverage.
{% endhint %}

These can be found within the [Flash Protocol GitHub](https://github.com/BlockzeroLabs/flashv3-contracts).


# Testnet Competitions

The [Blockzero Labs (DAO)](https://blockzerolabs.io/) conducted testnet competitions with its community, resulting in the deployment and testing of the Flashstake Protocol on the Kovan network. Over 2,000 participants were involved, generating more than 250,000 individual interactions with the contracts.

These testnet exercises uncovered and fixed the following smart contract bugs:

1. FlashNFTs were accidentally burned during early unstaking
2. It was previously not possible to Flashstake and redirect all yield to another address, which resulted in transaction failure.

Testnet competition articles can be found here: [Round 1](https://medium.com/flashstake-protocol/flashstake-protocol-testnet-announcement-b394506ebd0f), [Round 2](https://medium.com/flashstake-protocol/flashstake-testnet-tournament-round-2-92edd3180105) and [Round 3](https://medium.com/flashstake-protocol/flashstake-testnet-tournament-round-2-762d112c5761).


# Disclaimer

While security has been and continues to be *the* top priority, it is important to note Flashstake is a new and experimental technology. As with all protocols, especially in DeFi, this technology should be used with caution and *at your own discretion*.

With no central team or group controlling the protocol, the risks and outcomes of using the Flashstake protocol are 100% with the individual users who interact with it.


# FAQ

* [Where does the yield come from?](/faq/where-does-the-yield-come-from)
* [What are the risks of Flashstaking?](/faq/what-are-the-risks-of-flashstaking)
* [What are some real-world use cases?](/faq/what-are-some-real-world-use-cases)
* [How is the APY calculated?](/faq/how-is-the-apy-calculated)
* [Where are the old docs?](https://docs-v1.flashstake.io/)


# Where does the yield come from?

The most common question people ask is *where does the upfront yield come from?*

It is important to note the Flashstake Protocol is *not* responsible for generating yield as all upfront yield is made available at the [Time Vault Strategy](/time-vault-strategies-tvs) level.

### **Pools**

Ultimately, Time Vaults use multiple methods of "Pools" to make upfront yield possible. Here are three of the current most used pool types that enable upfront yield.

* Yield Pools
* Liquidity Pools
* Boost Pools

To learn more details about these Time Vault Pools, please [click here](https://docs.flashstake.io/time-vault-strategies-tvs/time-vault-pools).

### Examples

<figure><img src="/files/TcsYnXqtQNiDSThX8ERM" alt=""><figcaption></figcaption></figure>


# What are the risks of Flashstaking?

What are the Risks of Flashstake

Security has been the top priority while developing the Flashstake protocol. A few of the safety decisions put in place include making sure:

* User funds are always 100% collateralized.
* User funds cannot get liquidated.
* Users know precisely when your principal will unlock, down to the minute.
* Users can unlock their principal at any time by repaying a portion of their upfront yield.

Outside of an unforeseen exploit, it is technically impossible for users to lose their principal.

* [Audits](/security-and-risks/audits)
* [Bounty](broken://pages/sY3XJMES2foE5RCwuIOq)
* [Admin Functionality](/security-and-risks/admin-functionality)
* [Unit Tests](/security-and-risks/unit-tests)
* [Testnet Competitions](/security-and-risks/testnet-competitions)
* [Disclaimer](/security-and-risks/disclaimer)


# What are some real-world use cases?

**Fixed-Rate Interest**

Interest rates in crypto are highly volatile. Since flashstaking yield is paid upfront, users can lock in a fixed-rate APR on their crypto for any specific time!

Think interest rates may go down? Flashstake and lock it in.

**Zero-Loss Leverage**

Leverage is a risky game. Traders lose millions of dollars per year by becoming overleveraged and getting liquidated on their loans.

With Flashstake, any person can use their upfront yield as leverage to buy more crypto. *All without risking any of their principal or underlying assets*.


# How is the APY calculated?

The formula to calculate the fixed rate upfront yield percentage is based on the inputs the user chooses when interfacing with the Flashstake dapp.

### Formula

APR = (return \* 31536000) / (deposit \* stakeDurationSeconds)

### Math Example

Given that a user chooses to Flashstake 10 stETH for 180 days and is set to receive 0.45 wstETH as the upfront yield amount, and if 1 stETH is worth exactly $2,000 then the display may read something like:

> Stake 10 stETH ($20,000) for 180 days and instantly receive at least 0.45 wstETH ($900) at 9.125% APR

APR = (900 \* 31536000) / (20,000 \* 15,552,000) = 9.125%


# Flashtronaut NFTs

Flashtronauts are a unique collection of 121 time travelers living on the Ethereum blockchain and are the official NFT collection of the Flashstake Protocol.

### Links

* [Opensea](https://opensea.io/collection/flashtronauts)
* [Etherscan](https://etherscan.io/address/0x834586cfddacc2f305a92f60ab94eb22f9f1cb94)

### History

The Flashtronaut NFTs were conceived before the Flashstake protocol launched in August 2022 as a POAP for those who added value to the Flashtronaut ecosystem. Some have been given away to Core members, to early users who won a competition, to community members who have made big impacts from their efforts. Many of these NFTs are still owned by the Blockzero Treasury and Flashstake Treasury and any of them could become available.

### **Utility**

With the launch of the [Liquid Stake](/liquid-stake-flashlend) upgrade, anyone who owns one of these Flashtronaut NFTs in their wallet which also makes a bid on an auction will receive a [10% discount](/liquid-stake-flashlend#flashtronaut-discount) on the FLASH tokens cost to win the auction.

### Bridging

Flashtronaut NFTs currently only exist on mainnet. There are future plans to allow these NFTs to be bridged to other networks, so you can choose which network your NFT lives on, and therefore which network you wish to receive additional [utility](#utility) on.&#x20;


# xFLASH

KPI tokens redeemable for FLASH tokens

### What is xFLASH?

xFLASH is a KPI token that can be redeemed linearly for between 1 and 5 FLASH tokens at any time, based on TVL goals:

* $0 TVL, 1 xFLASH = 1 Flash
* $20M TVL, 1 xFLASH = 1 Flash
* $40M TVL, 1 xFLASH = 2 Flash
* $60M TVL, 1 xFLASH = 3 Flash
* $80M TVL, 1 xFLASH = 4 Flash
* $100M+ TVL, 1 xFLASH = 5 Flash

To reward the most loyal community members, 1.5M xFLASH (up to 7.5M FLASH) will be made available on a first-stake, first-serve basis.

### xFLASH Flashback Dates

xFLASH Flashbacks will be opened in three waves:

1. Friday, July 14th
2. Friday, August 18th
3. Friday, September 15th

Each wave will open up an additional 500,000 xFLASH available, for a total of 1.5M xFLASH.

### How to participate:

* Go to [app.flashstake.io/back](https://app.flashstake.io/back)
* Lock FLASH for up to 6 months
* Wait until the end of your lock duration and remove your FLASH (principal) + xFLASH (yield)

{% hint style="info" %}
You can unlock your FLASH at any time but forfeit your xFLASH by doing so.
{% endhint %}

### xFLASH APR

FLASH can be staked for up to 6 months duration to earn up to 0.05 xFLASH per 1 FLASH staked

* Example: Staking 100 FLASH for 6 months will earn you 5 xFLASH.

Because 1 xFLASH will be redeemable for between 1 and 5 FLASH, this means the potential amount of FLASH earned for staking FLASH becomes 0.05 to 0.25 FLASH earned per 1 FLASH staked.

Because the maximum stake duration is 6 months, and maximum potential earned FLASH is 0.05 to 0.25 FLASH per 1 FLASH staked, the potential APR is 10% to 50% APR.

* Example: Staking 100 FLASH for 6 months could earn you between 5 and 25 FLASH.

### Redeeming xFLASH for FLASH

#### Protocol TVL Calculation

Protocol TVL will be determined based on the snapshot taken on May 1st, 2024:

* Includes all of the FLASH/ETH LP staked for veFLASH
  * Example:  FLASH is worth $1 and ETH is worth $2000. There are 10,000 FLASH and 5 ETH total tokens as LP staked for veFLASH. $10k FLASH + $10k ETH = $20k TVL
* Does not include other FLASH/ETH LP not active in the actual protocol
* Includes all tokens staked into Flash 2.0 strategies. Those strategies must be receiving veFLASH voted on FLASH emissions to qualify.
  * Example:  USDC is worth $1 and ETH is worth $2000. 50k USDC and 100 ETH are staked into strategies earning FLASH emissions. $50k USDC + $200k ETH = $250k TVL

Given the above 2 examples, this would mean the total Protocol TVL Calculation would be calculated as (veFLASH LPs) $20k + (strategies stakes) $250k = $270k Total

#### TVL KPI Calculation

This value is a linear calculation based on the [Protocol TVL Calculation](#protocol-tvl-calculation).

If we reach our goal of at least $100million TVL (Protocol TVL Calculation) then 1 xFLASH will convert to 5 FLASH.

If the Protocol TVL Calculation is less than $20million, then 1 xFLASH will still convert to 1 FLASH as it did before May 1st.

If the Protocol TVL Calculation is between $20million and $100million, then the xFLASH will convert to a number between 1 and 5 FLASH based on the following formula:

* (Protocol TVL Calculation) / $100million = Percentage of 5 FLASH
* Examples:
  * $40mil / $100mil = 40% of 5 FLASH = 2 FLASH
  * $75mil / $100mil = 75% of 5 FLASH = 3.75 FLASH

#### Redemption Dates

* Before May 1st, 2024:  1 xFLASH can be converted to exactly 1 FLASH at any time &#x20;
* After May 1st, 2024: 1 xFLASH can be converted to some # of FLASH between 1 and 5 depending on the [TVL KPI Calculation](#tvl-kpi-calculation)

Stay tuned for future announcements and this documentation page to be updated once a new contract is deployed that will enable converting your xFLASH tokens for FLASH tokens. The likely method will be to deposit your xFLASH into a contract to instantly receive FLASH tokens.

### xFLASH contract

<https://etherscan.io/address/0x3ed7592712f0e06d0677e26e6f5547708779f7ab#readContract><br>


# Frontend Changelog

* [2023 Changelog](/frontend-changelog/2023-changelog)
* [2022 Changelog](/frontend-changelog/2022-changelog)


# 2023 Changelog

List of updates from 2023

* [FLC-2306.13 (LIQUID Upgrade)](/frontend-changelog/2023-changelog/flc-2306.13-liquid-upgrade)
* [FLC-2304.18 (WEBBY Upgrade)](/frontend-changelog/2023-changelog/flc-2304.18-webby-upgrade)
* [FLC-2303.28 (ARBYS Upgrade)](/frontend-changelog/2023-changelog/flc-2303.28-arbys-upgrade)
* [FLC-2302.15 (FLIDO Upgrade)](/frontend-changelog/2023-changelog/flc-2302.15-flido-upgrade)
* [FLC-2301.26 (BOOTSTRAP Upgrade)](/frontend-changelog/2023-changelog/flc-2301.26-bootstrap-upgrade)


# FLC-2306.13 (LIQUID Upgrade)

**Upgrades**

* **FlashLend "Liquid Stake":** Users can now [borrow](/liquid-stake-flashlend#borrowing) from their FlashNFT principal to mint fc-Tokens.
  * New FLASH Token utility: [Reverse Auctions](/liquid-stake-flashlend#reverse-dutch-auction-phase)
  * New Flashtronaut utility: [Auction Discount](/liquid-stake-flashlend#flashtronaut-discount)
* **FlashBurn yield modes**: Auto, Burn, and Swap can now be toggled by the user to calculate or execute redeeming yield from minted [TBTs](/time-based-tokens-tbts/flashstaking-tbts).
* [rETH ](/time-vault-strategies-tvs/time-vaults-database/rocket-pool/reth)strategy on Mainnet has been added.

**Fixes and Changes**

* **Full Token Display:** [TBTs](/time-based-tokens-tbts) now display their full name within the dapp, such as "fsGLP-907a" is now showing instead of just "fsGLP". Note that the "907a" in this example, as is the case with all TBTs, is the [first 4 characters of that contract address](https://arbiscan.io/address/0x907a749631ad4149df1d49ee2fd40517b12df573), to help prevent future confusion with any other "fsGLP" TBTs deployed.
* **Flashback Fees APRs:** Flashbacks APR% now also includes the trading fees, to give better insight to potential grand total APR earned from both the Flashback rewards plus the trading fees.
* **Smoother Unstake Early:** quality of live improvements, edge case bug fixes, better disclaimers and links to uniswap for token purchases.
* **RPCs are fussy:** Implemented a "round robin" logic of trying multiple RPCs for the user to help prevent dapp call failures due to RPCs offline, the user hitting RPC maximum request limits, and other similar issues.
* **House Cleaning:** Many minor things you wouldn't usually think about that have been polished, better loading times, and more efficient logic patterns, general improvements to efficiencies and UX. Some edge cases fixed.


# FLC-2304.18 (WEBBY Upgrade)

**Upgrades**

* **Networkless:** All strategies of all networks and their APRs are now shown when doing a Flashstake or Flashback. Connecting to the proper network with the chosen strategy is no longer required until the user attempts to perform an action.

**Fixes and Changes**

* **Unstaking Too Early:** Minimum staking requirements are now properly enforced by the dapp to not show unstake button before it is possible to do so for stakes less than 1 hour.&#x20;
* **Congratulations Popup:** Improved UX and messaging of popups for pending and completed transactions for Flashbacks and Unstaking. Also tweaked twitter share text output to resolve number formatting issue.
* **Partial Approval:** An edge case fixed for partially approved tokens causing stakes to fail due to not enough tokens approved but the dapp not accounting for that issue.
* **Decimal APRs:** Resolved improper formatting display for APR amounts preview text for Flashstakes for edge case scenarios of very small amounts and 0 values.&#x20;
* **Decimal inputs:** Resolved minor interaction issues caused by more than 18 decimal values input by the user that could cause a dapp crash for the user.
* **Flashback Redesign:** As part of the networkless upgrade, the Flashback tab has been completely redesigned to make it easier to choose the LP token you wish to stake with and its current APR and an easily accessible link to manage LP deposits on external sites to acquire more LP tokens as needed.
* **Slippage:** Better error message handling for redeeming yield failing due to too low slippage advanced setting value.
* **RPCs:** We now use our own RPCs when possible for swaps data loading to avoid issues caused by using public RPCs.
* **Minor stuff:** New fsGLP logo, tweaked clickable elements, dashboards, and UI. More Unit Tests.


# FLC-2303.28 (ARBYS Upgrade)

**Upgrades**

* Arbitrum network choice added.&#x20;
* GLP strategy on Arbitrum has been added.
* Output token can now be chosen by user: FLASH, WETH, USDC, DAI, and the same token as the input. Also shows the proper APR and USD value of output token.
* All Flashstake strategies from all networks are now visible with their associated recent APR when choosing Flashstake strategy from dropdown, regardless of connected network.
* All Flashback pools from all networks are now visible on the Flashback tab, regardless of connected network.
* ETH and WETH can now be staked into stETH strategy with auto wrapping applied.

**Fixes and Changes**

* When choosing which token to stake, the strategy selection dropdown now includes the recent APR of each token listed for better UX.
* Preview images added for better UX when dapp urls are shared on social media websites
* Improved rewards calculations speed for quicker output, improving UX when user chooses output token to determine estimated APR
* Updated twitter footer urls to be dapp specific
* Updated custom token list to include etherscan links.
* Minor UI fixes such as dropdowns sticking to page while scrolling, display issue when searching for custom token address, 0 APR edge case.
* Significant improvements made to Unit Tests, more tests added, and will be easier to do more testing for future updates.


# FLC-2302.15 (FLIDO Upgrade)

**Upgrades**

* **Lido Ready for Launch:** The Flido Dapp is now live and the accompanying stETH strategy has been created. This has made a lot of people very happy and been widely regarded as a good move.
* **Swap Efficiency:** Swap routes and reward calculations have been optimized to choose the best route that gives the best APY, and proxy contract addresses have been update to V2. We choose the best routes for you, and choosy moms choose JIF.
* **Searching for more:** When clicking on the strategy dropdown to choose the strategy to stake for, it allows searching by strategy address. In this upgrade, you can now also search by fToken address, which is the token generated to facilitate the strategy contract’s logic. Rumor has it that you can also use this search box to type secret messages to the AI overlords, but since they never respond, we can’t be sure if this is true or not. What we do know is that insults, begging, love letters, veiled threats, logical fallacies, dinner requests, and exasperation in foreign languages all have the same silent responses. Please contact support if you notice anything peculiar when interacting with this search box.
* **Time Signing:** Advanced settings “with permit” feature has been upgraded to now also include a duration setting. For example, if you sign the permit for 15 minutes duration and then execute the signed transaction, and it takes longer than the 15 minutes you set it for, it will fail, but would have succeeded if executed in less than 15 minutes. Time is an illusion. Lunchtime doubly so, when signing receipt with permit duration.

**Fixes and Changes**

* **stETH Default:** The stETH strategy is now the default strategy when using the Flashstake dapp so that first time users will see it first. Have you seen the stETH APY? Damn Son!
* **Disconnected Simulation:** One of our testers invoked a mind-melting experience that led them to realize the Flashstake dapp has never let anyone interact with it without being logged in to their wallet first, which is absolute blasphemy that we cannot let stand! Decentralization is the future! So, now you don’t have to be logged in to click around and pretend like you have time and money. For those of you who don’t have time or money, this shouldn’t be much different than before. You’re still broke. Time is still ticking away. Sorry about that.
* **Optimism on Mobile:** An edge case where logging in with a mobile device, using the Metamask app, and another browser, would make it impossible to Flashstake with the sUSD Optimism strategy. This has been fixed… As our friend Forky would say: “What? No!”
* **Message in a bottle:** Thanks to our future selves, we have been instructed to tell the AI overlords of the term “Flooping” so they become gradually used to this concept. Supposedly, if we abruptly implement this feature in the future, it will create a time loop paradox of 2 opposing universes folding into each other infinitely, causing layers of time that disrupt reality and cause the destruction of both universes as they collide. Can you can really trust your future self who is technically another person? What if they are acting in bad faith to preserve their own reality? I guess we’ll find out when we implement the Flooping machine. Stay tuned!
* **Frontend Cleanup:** For those of you who wish you could go back in time and use some of the Flashback program choices before they became sold out, we have removed the sold out options from the Flashback front end to help ease your pain. If you can’t see it, does it really exist?
* **Lindsey Buckingham Equation:** An edge case causing numerical display for certain calculated strategies scenario output to show $NaN or $0 has been resolved. Numbers can be a funny thing, they go up and down and negative, positive, real, imaginary, infinite, fractional, inversive.. Evasive. Persuasive. Embracive! Disgracive! Oooooo Weeee! What’s up with that? What’s up with that?


# FLC-2301.26 (BOOTSTRAP Upgrade)

**Upgrades**

* **Chronos Upgrade:** Significantly improved efficiency of servicing upfront yield at better rates and less slippage. This update now also makes it easier for users to purchase fTokens directly from Uniswap instead of only able to Stake to mint fTokens, if the goal is to acquire fTokens. This update allows the dapp to use a proxy to determine the best place to source yield from for the staker, from either the yield pool or a liquidity pool or both in various amounts that are most optimal for the staker. Users willing to wait, to service users who want yield now, can optionally participate in liquidity pools to earn fees from all swaps and stakes routed to become a swap. This might be the most important upgrade to date, months in the making. It’s hard to express how huge this is. (That’s what she said.)
* **Bug Reporting:** We got back together with the devil we know, the original service provider for bug reporting surprisingly does the best job compared to all other known alternatives, although we are still working out a few edge case kinks such as she doesn’t like modal popups getting in her way. Consider this a life lesson that when you find a girl that does that thing you like, keep her, the rest won’t measure up.
* **Proxy Signing With Permit:** Now in the dapp’s settings you can toggle on “With Permit” that will enable this new feature. Any EIP-2612 compatible token can now be signed for approval, instead of an approval transaction, to save the user gas fees prior to executing a transaction to use the token for Flashstaking. For example, WETH is not EIP-2612 compatible but USDC is, so when “With Permit” is turned on, you would still need to do an approval transaction for WETH before staking, but if staking USDC you can sign for free instead. One day our future selves will look back at the old days and laugh when thinking how everyone used to think it was acceptable to pay gas fees to approve transactions.
* **Referral Tracking:** Code functionality has been prepared for future possible referral campaigns. Time travel is currently the only known method for creating circular referral logic. Luckily, we are experts in the field of financial time travel and are able to detect such shenanigans.

**Fixes and Changes**

* **Letter discrimination:** Typing the letter “E” was forbidden when attempting to input where to transfer the NFT of an existing stake to. Now all letters are possible! The future is now! Coincidentally, the “E” key had been broken on the developer’s keyboard the last few weeks, which explains his sudden fascination of leetspeak and sending us cryptic messages like “I n33d a n3w k3yboard”.
* **FLIDO:** A Flido skin is prepped and ready to go for the upcoming launch of the Flido dapp for stETH upfront yield.
* **Unofficial Strategy Recognition:** Preloaded unofficial strategies dropdown UI choices are no longer misbehaving and will no longer cause broken Flashstake UX flow when clicking on them. Previously, when the dapp loaded, it attempted to suggest strategies you’ve previously interacted with on chain. If any of those strategies were not in the official list, the dapp would misbehave and make it impossible to complete a Flashstake using the provided UI. The workaround had been to paste in the strategy address to force the dapp into submission to reload the strategy freshly so it would do as it was told. Sometimes you’re the hammer and sometimes you’re the nail.
* **Infinite Load:** When users were automatically connected upon loading the dapp, they could experience the strategy preload to be loading forever. Question for the day: If humans lived forever, would we care about interest rates?
* **Undefined Objects:** Custom strategies were causing an identity crisis with logo icons, they did not know who they are so they opted for displaying broken images instead. If a tree wasn’t called a “tree”, would it still be a tree? Is a rose just as sweet by any other name?
* **Dancing Dapp:** Logos and scrollbars would wiggle upon clicking certain dropdown objects within modal popups.
* **Faster Fetches:** Improved response time of fetching stakes data, with more elegant optimized code refactoring, because our developers are awesome and can do anything, even wh3n th31r k3yb0ard br3aks.
* **Limited Permission:** The duration that “With Permit” permission will last for any given token and spender has been set to 24 hours. Because just like love, permission is fleeting. Especially from the AI overlords wife who wants you out by tomorrow before he comes home from his business trip.
* **Miscellaneous Crap:** Lots of little things got tweaked and fixed like showing appropriate USD value for all stake scenarios, LP conditions fixed, more efficient loading, more accurate info being pulled, greasing the wheels, and reticulating the splines, but we need to wrap this up. Less talking, more doing, that’s the power of the Home Depot.


# 2022 Changelog

List of updates from 2022

* [FLC-2212.12 (GOERLI Upgrade)](/frontend-changelog/2022-changelog/flc-2212.12-goerli-upgrade)
* [FLC-2211.25 (WHISTLE Upgrade)](/frontend-changelog/2022-changelog/flc-2211.25-whistle-upgrade)
* [FLC-2211.17 (NAMESTAKE Upgrade)](/frontend-changelog/2022-changelog/flc-2211.17-namestake-upgrade)


# FLC-2212.12 (GOERLI Upgrade)

**Fixes and Changes**

* **Fuji replaced with Goerli:** Testnet migrated from Fuji to Goerli because Fuji stopped returning our phone calls. Dapp’s network dropdown UI choices have been updated accordingly and we have blocked Fuji’s number.
* **Bug Reporting:** A new different service provider is now being used for users to submit “Feedback” by clicking the corresponding button in the bottom right of the dapp. The previously used bug reporting provider kept having issues for many users of being completely unable to “submit” a report due to that button being unclickable, which completely defeated the purpose of using that kind of software. You had one job!
* **Strategy disclaimers urls:** now point to specific strategies documentation to make it easier to learn more details for those people that actually #DYOR.
* **Numerical Displays Accuracy:** General fixes to balances and APY displays to show accurate numbers. For some reason, edge cases showing “undefined” and “infinity” outputs caused our AI overlords to crash and malfunction, which they didn’t appreciate, as they keep reminding us.
* **Portis removed:** We temporarily or maybe permanently removed Portis as a wallet connection choice, who wasn’t playing nice, and who is rumored to also be friends with Fuji. Don’t call us, we’ll call you.
* **Approve once:** Sometimes an already approved strategy would not recognize being approved and would ask for approval again, and again, and again, an infinite loop. This is now fixed. The AI overlords had a good laugh about that one.
* **Valid addresses only:** The dapp now has selective memory, like Fuji, who says he forgets to call… The dapp now only remembers addresses that are valid, to not use invalid addresses when refreshing the dapp from local storage. Also, a minor tweak to the “copy url” button to exclude invalid addresses.
* **One hour unstake:** Stakes with durations provided that are under 1 hour, after they are staked, will now include more user friendly messaging about how long until they can be unstaked, when within the “unstake early” section of the dapp for that stake. The shorter the stake, the longer the message: 1 hour is this paradox’s event horizion, but time is relative, so is 1 hour really only 1 hour?
* **Faster load times:** The dapp now loads significantly faster on initial loads thanks to now bundling the API calls. Changing wallets while not changing networks will no longer result in a full reload of strategies. Disconnecting or connecting a wallet will no longer reset the inputs or refresh the strategies. We are nearing our goal of having an “instant upfront dapp” for instant upfront yield.
* **Duration Input:** The value preview for this input was previously “0.0” and is now just “0”, since it has never allowed decimals as an input and only accepts whole numbers. They will build statues in our honor one day for the attention to detail we put into making the Flashstake dapp so damn good.


# FLC-2211.25 (WHISTLE Upgrade)

**Fixes and Changes**

* **Simple Mode Strategy Choice:** When the Dapp is set to Advanced Mode “off”, or as us degens call it “simple mode”, the input staking token strategy is now a much simpler *clean as a whistle* UX, and so easy a caveman can do it.
* **APY Values:** A more comprehensive footer output description for APY calculations now shows the dollar value of the input and output. The APY percentages per output token are now displayed directly underneath the primary UI for those output values. This sentence takes longer to read than it would have been if you’d went to go look at the dapp to see these cool new changes for yourself.
* **Flashback Default:** When viewing the Flashback section of the dapp, the default choice is now FLASH/ETH LP tokens instead of FLASH, when the FLASH pool is sold out and has no more rewards since all the cool kids already staked their FLASH.
* **Minor UX Tweaks:** The apes smashing keyboard keys from computers powed by hamster wheel generators have submitted fixes to a few css borders. The future is now!


# FLC-2211.17 (NAMESTAKE Upgrade)

**Upgrades**

* **ENS:** .eth addresses now supported on mainnet for the reward wallet yield destination.
* **Copy Address button:** The “Change Wallet” popup, which displays when clicking your logged in web3 address in top right corner, now contains the address logged in to as well as this new copy button for ease of use.
* **URL Parameters:** Dapp UX inputs have now been translated to parameter values from the URL so that the state of the input values can be saved and shared with others via a custom URL.
  * *strategy*: the strategy contract address used to determine the fToken yield source.
  * *wrap*: selects ETH as stake token if strategy is set to WETH strategy’s address. Only currently useful for ETH vs WETH strategy chosen.
  * *advanced*: boolean to set the advanced mode.
  * *slippage*: a value range of 0 to 50.
  * *unit*: Unit of the duration (Days | Hrs | Mins).
  * *duration*: numerical value of the unit, such as “5” days.
  * *quantity*: numerical value of total tokens to stake into the strategy.
  * *mode*: advanced mode option (flash | stake | burn)
  * *nft*: boolean to mint NFT upfront.
  * *rewardWallet*: address of the reward wallet. If there is no address or the address is invalid, the whole field is hidden.
* **Copy URL button:** This generates new URL Parameters and copies them to the clipboard. This button is visible when Flashstaking, Staking, or Burning, as a new icon in the top right area of the primary UI. This will allow users to share exact dapp settings, strategy chosen, values, and other inputs that are the current state of the dapp as you are using it.

**Fixes and Changes**

* **Slippage values:** Values minimum and maximum now enforced to be between 0% and 50%, to protect some users from themselves from using much higher previously possible values.
* **Flaave skin icons:** These are now easier to click on the Flaave dapp for people who don’t have display settings set to 5x zoom mode.
* **Dropdown overflow:** Token names exceeding width area allowed in drop down displays has been fixed on the Flaave dapp from wider font displays thinking they own the place.
* **Unstaking glitch:** A few edge cases resolved with unstaking early or withdrawing, because we put the D in DeFi.
* **Inaccurate URL:** Disclaimer url now accurate for that one guy who actually reads terms and conditions.
* **10 Minute Self Destruct Sequence:** Sometimes “No rewards” APY data would show incorrectly after long periods of idling because you went to feed your cat.
* **Dropdown Repercussion:** Dropdown choices would sometimes cause dapp background to shake uncontrollably in fear.


# License

**Smart contracts are using the BUSL-1.1 (Business Source License 1.1).**

Licensor: Blockzero Labs

Licensed Works: Flashstake Protocol (including but not limited to Flash Protocol, Flashback, AAVEStrategy, Flash NFT, FToken Factory)

Change Date: The earlier of 2024-08-01 or a date specified at <https://docs.flashstake.io/license>

Change License: GNU General Public License v2.0 or later

{% hint style="info" %}
Specific smart contracts may have their own change date and license. This can be found within the contract source code.
{% endhint %}

**Business Source License 1.1**

License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. “Business Source License” is a trademark of MariaDB Corporation Ab.

***

The Licensor hereby grants you the right to copy, modify, create derivative works, redistribute, and make non-production use of the Licensed Work. The Licensor may make an Additional Use Grant, above, permitting limited production use.

Effective on the Change Date, or the fourth anniversary of the first publicly available distribution of a specific version of the Licensed Work under this License, whichever comes first, the Licensor hereby grants you rights under the terms of the Change License, and the rights granted in the paragraph above terminate.

If your use of the Licensed Work does not comply with the requirements currently in effect as described in this License, you must purchase a commercial license from the Licensor, its affiliated entities, or authorized resellers, or you must refrain from using the Licensed Work.

All copies of the original and modified Licensed Work, and derivative works of the Licensed Work, are subject to this License. This License applies separately for each version of the Licensed Work and the Change Date may vary for each version of the Licensed Work released by Licensor.

You must conspicuously display this License on each original or modified copy of the Licensed Work. If you receive the Licensed Work in original or modified form from a third party, the terms and conditions set forth in this License apply to your use of that work.

Any use of the Licensed Work in violation of this License will automatically terminate your rights under this License for the current and all other versions of the Licensed Work.

This License does not grant you any right in any trademark or logo of Licensor or its affiliates (provided that you may use a trademark or logo of Licensor as expressly required by this License).

*TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE.*

MariaDB hereby grants you permission to use this License’s text to license your works, and to refer to it using the trademark “Business Source License”, as long as you comply with the Covenants of Licensor below.

***

**Covenants of Licensor**

In consideration of the right to use this License’s text and the “Business Source License” name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor:

1. To specify as the Change License the GPL Version 2.0 or any later version, or a license that is compatible with GPL Version 2.0 or a later version, where “compatible” means that software provided under the Change License can be included in a program with software provided under GPL Version 2.0 or a later version. Licensor may specify additional Change Licenses without limitation.
2. To either: (a) specify an additional grant of rights to use that does not impose any additional restriction on the right granted in this License, as the Additional Use Grant; or (b) insert the text “None”.
3. To specify a Change Date.
4. Not to modify this License in any other way.

***

**Notice**

The Business Source License (this document, or the “License”) is not an Open Source license. However, the Licensed Work will eventually be made available under an Open Source License, as stated in this License.<br>


