Skip to content

Yield

In SAI Wallet, yield strategies are presented as a user function: strategy selection, quota acquisition (preview), operation execution, and position display. The user interface unifies work with various protocols, and the domain model relies on a unified set of entities and states.

The technical implementation of staking (contract contour StakeRouter/IStake, transaction assembly, step idempotency, and position updates) is described in the architecture section:
Staking Architecture.

Module Purpose and Boundaries

The Yield module is responsible for:

  • maintaining a catalog of strategies and their parameters (network, asset, yield type, constraints);
  • forming entry/exit operations from strategies as a set of steps (local or cross-chain);
  • calculating expected results and breaking down costs by components;
  • recording positions and updating them based on network data and execution events.

The Yield section does not contain descriptions of the internal logic of specific protocols. For the product level, the model is sufficient: input asset → strategy → position → result.

Domain Model

Minimum set of entities:

  • Strategy — description of a strategy into which funds are deposited and from which funds are withdrawn.
  • Position — user state in a strategy (shares/underlying, valuation, network, asset).
  • Operation — specific execution (deposit/withdraw), linked to a quota and operationId identifier.

A strategy is described by metadata:

  • strategyId — stable strategy identifier in the catalog;
  • chain — execution network (or destination network if the operation is cross-chain);
  • asset — strategy asset (e.g., USDT in the selected network).

Operation Assembly and Execution

A yield operation follows the standard contour:

  1. Quota (quote) — calculation of expected results and cost estimation.
  2. Step formation — local operation or cross-chain route.
  3. Execution — sending transactions and receiving confirmations.
  4. Position update — recording shares/underlying and current valuation.

Simplified scheme (execution logic; actual steps depend on the network):

Execution Flow

Result and Cost Estimation

For yield operations, SAI Wallet separately shows:

  • expected strategy yield ($APY$, if available);
  • one-time and operational route costs;
  • application fee, if it applies.

The cost model uses the sum of components:

$$F_{all} = F_{gas} + F_{infra} + F_{swap} + F_{prot} + F_{app}$$

where:

  • $F_{gas}$ — network fees (in USD equivalent);
  • $F_{infra}$ — cross-chain step costs (if present);
  • $F_{swap}$ — exchange losses (applicable only if the route includes a swap);
  • $F_{prot}$ — strategy protocol fees (if any);
  • $F_{app}$ — SAI Wallet fee (if applicable).

The $F_{swap}$ component relates to exchange operations: this is pool fees and price deviation at execution (often set via the minOut parameter). For staking, it is more correct to use the conversion model “asset ↔ share” and account for share valuation changes over time.

Extensibility: Adding a New Strategy

Adding a new strategy includes:

  1. registering the strategy in the catalog (metadata, network, asset, constraints);
  2. defining quota parameters and position format;
  3. connecting protocol implementation at the architecture level (see Staking Architecture).

Thus, new strategies are added without changing the user model: “strategy selection → quota → execution → position”.

The final result of yield operations is determined by protocol parameters (e.g., APY) and execution costs (gas, swap, cross-chain step, application fee). The methodology for calculating net results and break-even points for one-time fees is given in the “Methodology for Calculating Yield and Fees” section on the Economics page.