Sol Synthetics
  • Welcome to Solana Synthetics
  • Trust & Security
  • Qualified-Access Products
    • Cash Management 101
    • Eligibility
    • Onboarding & KYC
  • Developers
    • Integration Guidelines for Protocols Supporting sUSD on Solana Synthetics
  • Solana Synthetics V1 β€” Vaults & LaaS
  • Legal
    • Terms of Service
    • Privacy Policy
    • Cookies Policy
    • Disclaimers
Powered by GitBook
On this page
  1. Developers

Integration Guidelines for Protocols Supporting sUSD on Solana Synthetics

PreviousOnboarding & KYCNextSolana Synthetics V1 β€” Vaults & LaaS

Last updated 3 months ago

sUSD and smUSD

sUSD sUSD (Solana Synthetic USD) is a tokenized note backed by short-term US Treasuries and stablecoins. Holders of sUSD earn yield from the underlying assets through an increasing redemption value, making sUSD an accumulating token. The sUSD token contract is an upgradeable SPL token. To hold, send, and receive sUSD, users must not be on the blocklist.

smUSD smUSD is the rebasing variant of sUSD, maintaining a fixed peg to $1. Yield is distributed through the issuance of additional smUSD tokens. Users can swap freely between sUSD and smUSD. A swapper UI will be available in October at .

Modeled after rebasing tokens like stETH, smUSD enables users to wrap sUSD into smUSD using the wrap(uint256) function. While the price of a single sUSD token increases over time, smUSD retains a constant price of $1, with yield distributed as additional tokens. To convert smUSD back to sUSD, users can call the unwrap(uint256) function and receive their corresponding sUSD amount.

smUSD fetches the USD value of locked sUSD through the DynamicRateOracle.sol contract. Since smUSD is a rebasing token, transfer restrictions for sUSD also apply to smUSD in the beforeTransfer(address,address,uint256) hook. smUSD rebases daily at 12:00 AM GMT.


Dynamic Rate Oracle for sUSD

The DynamicRateOracle.sol contract tracks the price evolution of sUSD. Admins set ranges with daily interest rates, and the contract calculates prices using the following formula:

mathematicaCopy codecurrentPrice = (Range.dailyInterestRate ** (Days Elapsed + 1)) * Range.lastSetPrice

If no new range is defined after a range ends, the oracle defaults to the maximum price of the previous range for all block.timestamp > Range.end. This ensures smooth price updates even in the absence of new ranges.


Integrating sUSD into Your Web3 Application

As users may hold either sUSD or smUSD, protocols should support both for seamless integration. Below are two approaches for enabling sUSD in your application.


Option 1: Native Integration

Enable users to interact with your contracts directly using smUSD. Your contracts should include logic to swap smUSD into sUSD before completing transactions. For example, this could be achieved with an automated swapper mechanism.

Example workflow for a pool:

  1. User deposits smUSD.

  2. Contract automatically swaps smUSD for sUSD.

  3. sUSD is deposited into the pool.


Option 2: Informative Integration

Guide users to convert their smUSD into sUSD before interacting with your protocol. For example, display a message like:

This approach is suitable for applications that do not handle the swap logic directly.


Smart Contract Details

  1. rSUSD.sol This contract manages interest-bearing functionality, enabling users to wrap and unwrap their sUSD. It includes access controls and mechanisms to ensure smooth operation and security for users.

  2. rSUSDFactory.sol A factory contract for deploying upgradeable smUSD contracts. It facilitates the creation of proxy contracts, ensuring upgradeability and scalability while maintaining access control through a guardian mechanism.

  3. DynamicRateOracle.sol The dynamic oracle tracks the price of sUSD over time based on predefined ranges and interest rates. It also includes controls for pausing operations and updating ranges as needed.

  4. IRWADynamicOracle.sol An interface for contracts fetching real-world asset-backed price data. It standardizes the getPrice() function for seamless interaction with dynamic oracles.


Legal Notice

This documentation is provided to facilitate understanding of the features and terms of sUSD and smUSD, and is subject to the terms and conditions outlined in the Tokenized Credit and Security Agreement, Subscription Agreement, and related governing documents of Solana Synthetics.

This documentation does not constitute an offer to sell or solicit an offer to buy any securities, including sUSD or smUSD tokens. Forward-looking statements included here are based on current expectations and are subject to risks and uncertainties.

Acquiring sUSD or smUSD tokens involves substantial risks, including the possibility of total loss of investment. These tokens are not offered or sold in jurisdictions where such offerings are restricted, including but not limited to the United States and other prohibited regions.

β€œTo supply sUSD, first swap your smUSD for sUSD at .”

sol-synthetics.com
sol-synthetics.com