# Stake Exchange (STEX)

*STEX's first implementation is for the* [*stHYPE LST.*](https://app.valantis.xyz/)

Stake Exchange is a novel AMM for any liquid derivative with a redeem/withdraw function. The most premier example being Liquid Staking Tokens (LSTs), which can be redeemed for the native token after a 7-14 days 'unstaking' period. The STEX AMM design is a stepchange in LP effeciency for any redeemable derivative where the underlying can be retrieved- such as RWAs, yeild vaults, etc.

STEX solves secondary-market depeg losses for redeemable derivatives by never selling a derivative below its true value- and redeeming the derivative back for its underlying when beneficial. Today, Liquidity providers (LPs) on existing automated market makers (AMMs) incur losses by constantly selling LSTs at a discount to remain balanced.

## The Problem

Stable pair LPs on AMMs like Curve or Uniswap V3 constantly sell LSTs below their true value in order to keep their reserves balanced, giving up profits the LP could have retain by unstaking. We call this phenomenon **Loss Versus Unstaking** (LVU). LVU is typically not accounted for in traditional stable swap APY calculations, but liquidity providers are constantly subject to these depeg arbitrage losses.\
\
For example, even the highest TVL LSTs consistently sell at "depeg" rates on traditional AMMs. By selling at discount rates when the AMM is imbalanced, LPs must leaking profits to arbitraguers to rebalance.

<figure><img src="/files/Pqa6aMjvB2r2cwQ3pQ9O" alt=""><figcaption></figcaption></figure>

This leads to higher bootstrapping costs for LST teams due to degraded capital efficiency, lower returns for LPs, and poor pricing for traders.

## The Solution (Native Integration)

STEX solves this problem by never selling an LST below its true value, and integrating with an LST's native withdrawal mechanism to rebalance itself back to native token at the true rate.

LPs are forbidden from selling LSTs at a loss.

STEX is able to ***never depeg*** while remaining balanced because of its native integration with the LST protocol. Existing stable swap solutions can only rebalance themselves by selling LSTs at a discount when the pool is imbalanced. STEX is able to withdraw these assets at their true rate in these scenarios—rebalancing without loss via the [Withdrawal Submodule.](/design-space/modules/submodules.md)

<figure><img src="/files/rw24n01SQygXc5lIDkwq" alt=""><figcaption></figcaption></figure>

LPs collect fees as LSTs accumulate into the pool through a separate swap fee mechanism, the [Stepwise Fee Module](/staked-amm/smart-contracts/stepwisefeemodule.sol.md).

#### APY

Traditional Stable Swap APY usually does not account for depeg losses, since APY is generally represented as "fees" collected around the spot price. When the spot price on a depegged AMM is different from the underlying value of the asset, this APY number doesn't show losses from selling at a discount. Often times, LPs sell an LST for *depegged price + fee* that is below the true value of the LST. This risk is not often represented.\
\
Therefore, STEX represents more accurate yield numbers for LPs, by pricing the LST at its true value and allowing all fee accumulation to be a net gain. This safely allows LPs to accumulate yields denominated in Native Token without losing profits from depeg arbitrages.

STEX pools are also built with a [Lending Submodule](/staked-amm/lending-of-reserves.md), allowing idle native token reserves to be supplied into lending markets to boost passive yield and earn external rewards denominated in the Native Token.


---

# Agent Instructions: 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:

```
GET https://docs.valantis.xyz/staked-amm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
