> For the complete documentation index, see [llms.txt](https://docs.parallel.best/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallel.best/developers-hub/parallel-governance-token-prl/tokenomics/key-operations-flows.md).

# Key Operations Flows

## 1. Key Operation Flows

### 1.1 Staking Flow

This section contains the flows related to the staking part of the protocol.

#### **1.1.1 sPRL1 Flow**

**1.1.1.1 sPRL1 Deposit**

* Transfer PRL tokens to the sPRL1 contract
* Mint sPRL1 tokens to the user equivalent to the amount of PRL tokens transferred

**1.1.1.2 sPRL1 Request Withdraw**

* Burn the amount of sPRL1 tokens that the user wants to withdraw
* Set the unlocking time for this request

**1.1.1.3 sPRL1 Withdraw**

* Calculate the penalty based on the time left before the unlocking time.
* Send the PRL tokens to the user
* mint sPRL1 tokens to the fee receiver equal to the amount slashed from the penalty.

**1.1.1.4 sPRL1 EmergencyWithdraw**

* Burn the amount of sPRL1 tokens that the user wants to withdraw
* Send the PRL tokens to the user without penalties.

#### **1.1.2 sPRL2 Flow**

This section contains the flows related to the sPRL2 contract.

**1.1.2.1 sPRL2 Deposit PRL/WETH or PRL/ETH**

* Transfer PRL/WETH or PRL/ETH to the sPRL2 contract
* Deposit ETH to WETH if needed
* Add PRL/WETH liquidity into the Balancer pool (80PRL/20WETH)
* Receive BPT tokens
* Stake BPT tokens in Aura
* mint sPRL2 tokens to the user equivalent to the amount of Aura BPT lp tokens received

**1.1.2.2 sPRL2 Deposit BPT 80PRL/20WETH**

* Transfer BPT to the sPRL2 contract
* Deposit BPT into Aura pool and stake it
* Mint sPRL2 tokens to the user equivalent to the amount of BPT transferred

**1.1.2.3 sPRL2 Request Withdraw**

* Burn the amount of sPRL2 tokens that the user wants to withdraw
* Set the unlocking time for this request

**1.1.2.4 sPRL2 Withdraw PRL/ETH or PRL/WETH**

* Calculate the penalty based on the time left before the unlocking time.
* Withdraw and unwrap the amount of Aura BPT
* Receive Balancer BPT tokens from Aura
* Withdraw the amount of PRL/WETH from the Balancer pool
* Send the PRL/WETH to the user or PRL/ETH to the user
* Send the BPT lp penalty to the fee receiver

**1.1.2.5 sPRL2 Withdraw BPT 80PRL/20WETH**

* Calculate the penalty based on the time left before the unlocking time.
* Withdraw the amount of Aura BPT from Aura
* Receive Balancer BPT tokens from Aura
* Send the BPT lp tokens to the user
* Send the BPT lp penalty to the fee receiver

**1.1.2.6 sPRL2 EmergencyWithdraw**

* Burn the amount of sPRL2 tokens that the user wants to withdraw
* Withdraw the amount of Aura BPT from Aura
* Receive Balancer BPT tokens from Aura
* Send the BPT tokens to the user without penalties.

### **1**.2 Reward Distribution Flow

* RewardMerkleDistributor will receive the fees from the MainFeeDistributor at any time.
* Using off-chain events and calculations, the protocol retrieve the total amount received during a specific period.
* Protocol will generate a merkle root based on the total amount received and the amount of rewards that will be distributed to the users.
* The merkle root will be updated in the RewardMerkleDistributor contract.
* Users will be able to claim their rewards using the merkle proof.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

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

```
GET https://docs.parallel.best/developers-hub/parallel-governance-token-prl/tokenomics/key-operations-flows.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

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