Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.saffron.finance/llms.txt

Use this file to discover all available pages before exploring further.

Proportional Share Calculation

variable side earnings are based on proportional ownership of total supply and total generated yield.
share = mulDiv(userTokens, totalEarnings, totalTokens);
  • Uses mulDiv to avoid rounding loss and overflow

Liquidity Tolerance Protection

To prevent misconfiguration or malicious deviation in liquidity provisioning, adapters enforce strict tolerance bounds. Example: 100 bps tolerance (±1%)
require(actualLiquidity >  targetLiquidity * 9900 / 10000,  "L");
require(actualLiquidity <= targetLiquidity * 10100 / 10000, "Excessive liquidity");
  • Ensures the deployed liquidity matches expectations within an acceptable error window