|
| 1 | +# Integrating Tenderize **Sei** Native-Asset Multi-Validator LST (tSEI) |
| 2 | + |
| 3 | +> **Audience:** Oracle providers, lending protocol developers, ... |
| 4 | +
|
| 5 | +Tenderize's multi-validator Liquid Staking Token for **SEI (`tSEI`)** continuously accrues staking rewards and is fully backed by on-chain, non-custodial validator positions managed by the Tenderize Protocol on the Sei Network. |
| 6 | +This guide explains how developers can integrate **tSEI** into their protocols: |
| 7 | + |
| 8 | +1. **Redemption-Rate Oracles** – track the exchange-rate between an LST and its underlying native asset (e.g. `tSEI ⇆ SEI`). |
| 9 | +2. **Lending Protocols** – consume redemption-rate oracles, account for staking yield, and execute liquidations via Tenderize-specific mechanisms or third-party liquidity pools (`unstake`, `withdraw` or `flashUnstake`). |
| 10 | + |
| 11 | +For more information about Tenderize's Sei LSTs please refer to the [Sei adapter documentation](./README.md) |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## 1. Redemption-Rate Oracles |
| 16 | + |
| 17 | +### 1.1 What is the *redemption rate*? |
| 18 | + |
| 19 | +The redemption rate is the amount of underlying native asset redeemable per 1 unit of LST: |
| 20 | + |
| 21 | +$$R(t) = \frac{\text{Underlying Balance at } t}{\text{tSEI Supply at } t}$$ |
| 22 | + |
| 23 | +Because staking rewards are auto-compounded inside Tenderize, `R(t)` increases monotonically. |
| 24 | + |
| 25 | +### 1.2 Why use a redemption-rate oracle? |
| 26 | + |
| 27 | +• Removes reliance on secondary-market prices which can de-peg during stress. |
| 28 | +• Accurately reflects accrued rewards. |
| 29 | +• Enables lending protocols to value LST collateral precisely and trigger liquidations before the position becomes under-collateralized. |
| 30 | + |
| 31 | +### 1.3 Oracle reference implementation |
| 32 | + |
| 33 | +Oracle providers can derive `R(t)` directly from the **MultiValidatorLST** contract: |
| 34 | + |
| 35 | +```solidity |
| 36 | +interface IMultiValidatorLST { |
| 37 | + function exchangeRate() external view returns (uint256); |
| 38 | +} |
| 39 | +
|
| 40 | +contract SeiRedemptionOracle { |
| 41 | + IMultiValidatorLST public immutable tSEI; |
| 42 | +
|
| 43 | + constructor(address _tSEI) { |
| 44 | + tSEI = IMultiValidatorLST(_tSEI); |
| 45 | + } |
| 46 | +
|
| 47 | + // Returns the redemption rate scaled to 1e18 (uSEI per tSEI) |
| 48 | + function latestAnswer() external view returns (uint256) { |
| 49 | + return tSEI.exchangeRate(); |
| 50 | + } |
| 51 | +} |
| 52 | +``` |
| 53 | + |
| 54 | +`exchangeRate()` is a `1e18`-scaled fixed-point number representing **underlying SEI per 1 tSEI**. |
| 55 | + |
| 56 | +### 1.4 Recommended parameters |
| 57 | + |
| 58 | +• **Heartbeat:** 15 minutes – LSTs update slowly; more frequent pushes offer diminishing returns. |
| 59 | +• **Deviation threshold:** 0.01% – Redemption rate increments are small but monotonic; flag larger jumps. |
| 60 | +• **Decimals:** 18 – matches underlying native token. |
| 61 | + |
| 62 | +### 1.5 Sei-specific considerations |
| 63 | + |
| 64 | +• **Decimals:** Sei's native token uses **6 decimals** (`1 SEI = 1,000,000 uSEI`). `tSEI` keeps the standard **18 decimals**. The adapter internally scales values by `1e12` when interacting with the precompile. |
| 65 | +• **Validator IDs:** Tenderize represents validators as `bytes32`. The Sei adapter converts these to **bech32** validator addresses (`seivaloper…`) under the hood; integrators never need to supply bech32 manually. |
| 66 | +• **Conversion helpers:** For convenience, the `SeiAdapter` now exposes `validatorStringToBytes32()` and `validatorBytes32ToString()` so external tools can convert between the `seivaloper…` address format and the internal `bytes32` representation if desired. |
| 67 | +• **Unbonding period:** 21 days. |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +## 2. Lending Protocol Integration |
| 72 | + |
| 73 | +### 2.1 Valuing collateral |
| 74 | + |
| 75 | +Use the redemption-rate oracle to convert a user's LST balance to underlying native units, then price via your existing native-asset oracle. |
| 76 | + |
| 77 | +\[ |
| 78 | +\text{Collateral Value} = R(t) \times P_{\text{native}} |
| 79 | +\] |
| 80 | + |
| 81 | +Where `P_native` is the USD price of the native asset. |
| 82 | + |
| 83 | +### 2.2 Accounting for staking yield |
| 84 | + |
| 85 | +Because `R(t)` grows, collateral value increases automatically. |
| 86 | +No additional accounting is required from the protocol side. |
| 87 | + |
| 88 | +### 2.3 Liquidation workflow |
| 89 | + |
| 90 | +When a borrower falls below the liquidation threshold, governors may choose between four execution paths: |
| 91 | + |
| 92 | +1. **Unstake & Wait (gas-efficient)** |
| 93 | + • Call `unstake(shares, minAmount)` on the `tSEI` contract. The tx returns an `unstakeID`. |
| 94 | + • After the 21-day Sei unbonding period, call `withdraw(unstakeID)` to receive SEI. |
| 95 | + |
| 96 | +2. **Immediate withdraw (if mature)** |
| 97 | + If 21 days have already passed, go straight to `withdraw(unstakeID)` and seize the SEI. |
| 98 | + |
| 99 | +3. **Instant exit via Flash Unstake (`FlashUnstakeNative`)** |
| 100 | + Use the helper at ``FlashUnstakeNative.flashUnstake(...)` to unwrap the validator positions and swap into SEI within a single transaction. This uses TenderSwap underneath, the amount received depends on the available liquidity: |
| 101 | + |
| 102 | + ```solidity |
| 103 | + FlashUnstake(0xFlashUnstake).flashUnstake( |
| 104 | + 0xtSEI, // tSEI token address |
| 105 | + 0xTenderSwap, // TenderSwap pool that holds SEI liquidity |
| 106 | + tseiAmount, // amount of tSEI to liquidate |
| 107 | + minSeiOut // slippage guard |
| 108 | + ); |
| 109 | + ``` |
| 110 | + |
| 111 | +4. **Sell on DEX** |
| 112 | + If sufficient secondary-market liquidity exists, liquidators can simply swap `tSEI → SEI` on a DEX. |
| 113 | + |
| 114 | +Liquidators can choose between these paths based on gas costs, urgency, and liquidity conditions. |
| 115 | + |
| 116 | +--- |
| 117 | + |
| 118 | +## 3. Contract Addresses (Mainnet) |
| 119 | + |
| 120 | +| Name | Address | Description | |
| 121 | +|-------|--------|------------------------| |
| 122 | +| tSEI | `0x0027305D78Accd068d886ac4217B67922E9F490f` | Multi-validator LST token managed by the Tenderize protocol and governance | |
| 123 | +| FlashUnstake | `0x0724788Cdab1f059cA9d7FCD9AA9513BB9A984f8` | Wrapper that unwraps `tSEI` into single-validator LST parts and sells them on TenderSwap, used to instantly unstake `tSEI` without unstaking period | |
| 124 | +| TenderSwap (Sei) | `0x5c57F4E063a2A1302D78ac9ec2C902ec621200d3` | Instantly unstake staked SEI for a small fee | |
| 125 | +| Single-validator LST factory | `0xb0E174D9235f133333c71bB47120e4Cb26442386` | Create liquid staking vaults tied to a specific Sei validator, extending the delegation experience with liquid staking | |
0 commit comments