ThesaurosDocs
Understand the system

Read and explain yield

Give customers a useful rate without confusing market observations, projections and accrued earnings.

An Earn product needs more than a percentage. It needs a rate with a source, an observation period and a clear relationship to the customer's own position.

Protocol-level yield

GET /yield/history/{asset} returns scope: "protocol", a current blend, observation count, historical points and a vault breakdown. The series is the same protocol reference data for every permitted caller.

The backend records vault APY observations and builds an allocation-weighted daily series. The current blend uses the latest recorded history when available, otherwise current vault data. A new deployment may have no recorded history yet.

Customer-level yield

A customer's position exposes principal, current value and accrued yield. These are different from the protocol's APY series. Use the position and its activity to describe that customer's balance, and keep reporting calculations distinct from confirmed transaction receipts.

Choose precise labels

Value Useful label Avoid
Latest recorded annualized rate Current APY, with an observation timestamp Guaranteed return
A rate averaged over seven days 7-day average APY Yield earned in seven days
Estimated value from a rate assumption Projected value Available balance
Position's accrued value above principal Accrued yield Protocol-wide APY
No observations History not available yet A generated performance chart

Format the fields correctly

APY fields are decimal fractions. Multiply by 100 for the displayed percentage. Do not multiply an already formatted percentage a second time.

javascript
const formatApy = value =>
  new Intl.NumberFormat('en-US', {
    style: 'percent',
    maximumFractionDigits: 2,
  }).format(value);

formatApy(0.052); // "5.2%"

See amounts and units for timestamp, allocation and revenue-share conventions.

Build with us.

Bring your product flow. We'll map the integration together.

Discuss your integration
Continue readingHow allocation changes

Find an integration guide, API method or SDK example.

Thesauros documentationSearch runs in your browser