Staking Flow
Read this page before you call the API methods. It explains how Faroo works on Pharos and which steps each action does.
Faroo is a liquid staking protocol on Pharos. You stake PROS into the Faroo vault, and the vault mints stPROS to your address. stPROS is a liquid token. Its exchange rate to PROS increases with the staking rewards. Faroo uses Bifrost SLPx to stake the PROS of the vault.
More information is available in the official Faroo app: https://faroo.xyz
Staking user journey
A high-level view of a Faroo position. Each box is a state of your funds. The arrows are the actions that move between them.
Staking parameters
Key parameters for planning a Faroo integration:
| Parameter | Value |
|---|---|
| Staking type | Liquid |
| Networks | Mainnet |
| API minimum | None |
| Stake activation | Immediate. The vault mints stPROS in the delegate transaction |
| Unbonding / lock when exiting | Withdrawal queue. The protocol sets a minimum unbonding period, and the entry also waits for liquidity. No fixed maximum time |
| Rewards model | Accrues in the exchange rate of stPROS (liquid). There is no claim action for rewards |
This table is a summary. For the current values, query the dedicated staking-info endpoint: GET /api/v1/pharos/faroo/staking-info. For Faroo, stake_deactivation_max_time is null, because the real wait depends on the liquidity of the vault.
Delegate
The delegate action stakes PROS into the Faroo vault.
- Stake PROS: Use the
delegatemethod with theamountof PROS. The transaction sends the PROS as its value. You do not need an approve transaction. - Transaction confirmation: When the transaction is confirmed, the vault mints stPROS to your address. The stake is active.
- Reward accrual: Rewards increase the exchange rate of stPROS. Read the PROS value of your stPROS as
staked_amountin the staking balance endpoint.
Undelegate
The undelegate action starts the exit of part or all of your position.
- Request the exit: Use the
undelegatemethod with theamountof PROS to exit. The API converts the amount to stPROS shares. - Withdrawal queue: The transaction adds an entry to the withdrawal queue of your address. The staking balance endpoint lists each entry in
staking_objects. - Full exit: To exit in full, send
staked_amountfrom the staking balance endpoint without a change. The API then redeems all of your stPROS and leaves no dust.
Each address can have a maximum of 5 entries in its withdrawal queue. When the queue is full, the API returns 400. Withdraw the claimable entries first, then try again.
Withdraw
The withdraw action pays out the claimable entries of your withdrawal queue.
- Check the queue: Read
stake_withdrawing_amountin the staking balance endpoint. It is the PROS that you can withdraw now. - Withdraw: When the value is greater than
0, use thewithdrawmethod. One transaction pays out every claimable entry of the address. The action has no request identifier. - Post-withdrawal: The PROS goes to your wallet.
An entry is claimable when the vault has the liquidity to pay it, not only when its unbonding period is complete. The vault can also pay a part of an entry. The paid part is in stake_withdrawing_amount, and the entry stays in the queue with the status deactivating.
Contracts
| Contract | Address on Pharos mainnet |
|---|---|
| stPROS vault | 0x6b0a44c64190279f7034b77c13a566e914fe5ec4 |
Every transaction that the API crafts for this protocol goes to the stPROS vault. Before you sign, make sure that payload.to is the vault address.
Conditions that block an action
The API simulates each transaction before it returns it. If the simulation fails, the API returns 422 with the reason and does not return a transaction.
- Paused vault: The operators of the protocol can pause the vault.
- Deposit limit: The API returns
400when the amount is more than the deposit limit of the vault. - Full withdrawal queue: The API returns
400when the address already has 5 entries in its withdrawal queue. - Nothing to withdraw: The API returns
400when the address has no claimable entry.
API interaction
All three actions use the same four steps.