Skip to main content

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:

ParameterValue
Staking typeLiquid
NetworksMainnet
API minimumNone
Stake activationImmediate. The vault mints stPROS in the delegate transaction
Unbonding / lock when exitingWithdrawal queue. The protocol sets a minimum unbonding period, and the entry also waits for liquidity. No fixed maximum time
Rewards modelAccrues in the exchange rate of stPROS (liquid). There is no claim action for rewards
Real-time staking data

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.

  1. Stake PROS: Use the delegate method with the amount of PROS. The transaction sends the PROS as its value. You do not need an approve transaction.
  2. Transaction confirmation: When the transaction is confirmed, the vault mints stPROS to your address. The stake is active.
  3. Reward accrual: Rewards increase the exchange rate of stPROS. Read the PROS value of your stPROS as staked_amount in the staking balance endpoint.

Undelegate​

The undelegate action starts the exit of part or all of your position.

  1. Request the exit: Use the undelegate method with the amount of PROS to exit. The API converts the amount to stPROS shares.
  2. Withdrawal queue: The transaction adds an entry to the withdrawal queue of your address. The staking balance endpoint lists each entry in staking_objects.
  3. Full exit: To exit in full, send staked_amount from 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.

  1. Check the queue: Read stake_withdrawing_amount in the staking balance endpoint. It is the PROS that you can withdraw now.
  2. Withdraw: When the value is greater than 0, use the withdraw method. One transaction pays out every claimable entry of the address. The action has no request identifier.
  3. 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​

ContractAddress on Pharos mainnet
stPROS vault0x6b0a44c64190279f7034b77c13a566e914fe5ec4

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 400 when the amount is more than the deposit limit of the vault.
  • Full withdrawal queue: The API returns 400 when the address already has 5 entries in its withdrawal queue.
  • Nothing to withdraw: The API returns 400 when the address has no claimable entry.

API interaction​

All three actions use the same four steps.