Skip to main content

stXTZ FAQ

What is the stXTZ token?#

stXTZ is an FA2 compliant token. Each stXTZ token represents a share of the stXTZ pool, which represents the sum of XTZ staked by stXTZ bakers.

How is the price of 1 stXTZ calculated?#

The price of stXTZ expressed XTZ (stXTZ/XTZ) can be calculated as follows: price = sum of all XTZ staked / circulating supply of stXTZ

The price of stXTZ/XTZ can be fetched via the view fetch_price the stXTZ pool contract

How can a user get stXTZ?#

Two ways:

  1. Deposit XTZ in the stXTZ pool, using the stacy.fi frontend or the deposit entrypoint on the stXTZ pool contract. Once the deposited XTZ get's staked, stXTZ will be minted to the account specified upon deposit. The price of stXTZ is tracked in the pool contract. A user receives the amount of stXTZ corresponding to the current price.

  2. Swap XTZ to stXTZ in the stXTZ/XTZ CPMM. The CPMM is a classic Constant Product Market Maker contract. Liquidity providers can deposit stXTZ and XTZ and earn trading fees. Traders can swap stXTZ to XTZ and vice versa. The price is determined by the liquidity in the CPMM and the tride size, as in any classic CPMM.

Why do I receive less stXTZ than I deposited XTZ?#

After a user deposited XTZ to the stXTZ pool, the user's amount is staked. At this time, the current price of stXTZ is fetched from the pool contract and an amount of stXTZ is minted to the account the user specified. The amount of stXTZ minted is calculated like this:

stXTZ to mint = Deposited XTZ} \ current stXTZ/XTZ price

When the user redeems stXTZ for XTZ, the same applies: The currently price of stXTZ/XTZ is fetched and the respective amount of XTZ will be unstaked and, after a waiting period will be paid out to the user. Note: Slashings which can occur aven after a user initiated the redemption, can impact the amount of XTZ paid out.

How long do I need to wait if I stake or unstake?#

Staking happens almost immediately after a deposit: After a user deposits XTZ to the contract, the automated baker is triggered to claim and stake the amount. In the same operation group, the respective amount of stXTZ will be minted to the account the user's account (or any other, which can be specified on the respective entry point).

Unstaking takes more time, due to protocol contraints. When a user unstakes, the unstake is immediately triggered, but the request will stay in a withdrawal queue until 4 cycles have passed (currently 4 days), then the user can request the final withdrawal of his XTZ. During these 4 days, new baking rewards will not be added to this amount but if slashings occur, the amount to be withdrawn will be slashed pro rata - mirroring the Tezos protocol to some extent.

Why is the price of stXTZ/XTZ on the staking pool different from the CPMM swap?#

While the stXTZ/XTZ price on the staking pool is determined by the amount of XTZ staked / amount of stXTZ in ciculation, the price on the CPMM is determined by market participants and liquidity providers. The CPMM is a classic Constant Product Market maker contract, which inlcudes slippage and fees, depending on the amounts traded and on the existing liqudity.