# stFLR Liquid Staking

## About SparkDEX's Liquid Staking Token (LST) Platform

<mark style="color:$info;">**stFLR**</mark> <mark style="color:$info;">**is SparkDEX’s liquid staking token for FLR.**</mark>

[<mark style="color:$primary;">**stFLR Token Contract Address:**</mark> ](https://flare-explorer.flare.network/address/0x0988C6ba244A90C07a917ebE609eB3264bE716fF)

It allows users to stake FLR while maintaining liquidity, enabling participation in staking rewards without locking funds for long periods.&#x20;

By issuing **stFLR** for staked FLR, SparkDEX enables users to maintain staking exposure and protocol rewards without sacrificing liquidity, maximizing the amount of staked capital that remains active across the broader Flare DeFi landscape.

### LST Fees

In order to limit onboarding friction and encourage participation, SparkDEX’s LST platform follows a minimalist fee structure, where no fees are charged to enter or mint stFLR.&#x20;

A 10% performance fee is applied to staking rewards generated by stFLR, and a small exit fee is applied upon redemption to cover operational costs and maintain system stability.

### Key Concepts

Before diving into the process, it’s helpful to understand a few core terms used throughout this documentation.

#### stFLR

stFLR is a liquid staking token that represents a user’s share of the total FLR staked through SparkDEX. As staking rewards are earned, the value of stFLR increases relative to FLR.

#### Buffer

The buffer is a portion of FLR/WFLR kept liquid inside the smart contract. Its purpose is to enable **instant withdrawals** without waiting for on-chain unstaking.

#### P-Chain

The **P-Chain (Platform Chain)** is Flare’s chain responsible for staking and validator coordination. Native FLR staking and delegation occur on the P-Chain and require a minimum staking duration.

#### Keepers

**Keeper** are automated services operated by SparkDEX. They perform routine protocol actions such as staking, unstaking, allocating rewards, and processing withdrawal requests according to predefined rules.

### 1. Staking (Deposit)

Users can deposit using **FLR or WFLR** into the stFLR contract.

* In return, the user receives **stFLR**, representing their proportional share of the total pooled FLR.
* The amount of stFLR minted depends on the current exchange rate between stFLR and the total pooled FLR.
* stFLR is transferable and can be used across DeFi while continuing to accrue staking rewards.

### 2. Buffering

A predefined **buffer ratio** of deposited funds is retained in the contract.

**Purpose of the buffer:**

* Enables **instant withdrawals** without waiting for P-Chain unstaking
* Reduces friction for users who need immediate liquidity

Only the required buffer amount is held liquid. Any excess funds are prepared for staking.

### 3. Deposit for P-Chain Staking

Once the buffer is filled, any remaining FLR/WFLR is marked as **pending for staking**.

* The Keeper periodically retrieves this pending amount.
* The funds are staked or delegated on the **most suitable P-Chain validator node**, based on protocol-defined criteria.

### 4. Instant Withdraw

If a user wishes to withdraw and the requested amount is **covered by the buffer**:

* The user can redeem stFLR immediately.
* An **instant withdrawal fee** is applied.
* Funds are received without interacting with P-Chain staking or waiting periods.

This option prioritizes speed and convenience.

### 5. Request Withdraw

If the buffer does not have sufficient funds:

* The user submits a **withdrawal request** for a specified amount.
* The request is added to a **withdrawal queue**.
* **Zero Fees** apply for normal withdrawal requests.

Requested withdrawals are processed in order of priority.

### 6. Finalization of Withdrawals

The Keeper continuously evaluates the withdrawal queue and available liquidity.

Finalization follows this order:

1. **Unstake from the P-Chain** if the buffer is insufficient
2. **Finalize requests** as soon as unstaked FLR becomes available
3. **Use the buffer** only if no P-Chain stake remains

### 7. Rewards Distribution

Staking and delegation rewards earned on the P-Chain are periodically handled by the Keeper.

* Rewards are uploaded to the stFLR contract on a **per-reward basis**.
* Rewards are processed the same way as deposits:
  1. First, they **fill the buffer**
  2. Any remaining portion is **set aside for P-Chain staking**

These rewards increase the total pooled FLR, which in turn increases the value of stFLR over time.
