Skip to content

Stellaris is a decentralized interest rate protocol built on the Aptos blockchain.

Notifications You must be signed in to change notification settings

StarryDeserts/stellaris

Repository files navigation

Stellaris Protocol

Tokenize Tomorrow's Yield on Aptos.

Stellaris is a decentralized interest rate protocol built on the Aptos blockchain. It empowers users by tokenizing the future yield of interest-bearing assets, creating an efficient and flexible market for fixed-rate yields and interest rate speculation within the DeFi ecosystem.

🚀 The Problem

The majority of yields in DeFi are variable, creating uncertainty for both lenders and borrowers. Users seeking stable, predictable returns have limited options, while advanced traders lack sophisticated tools to hedge or speculate on interest rate fluctuations. Existing solutions are often complex and fragmented across different ecosystems.

✨ Our Solution: Yield Stripping

Stellaris introduces a novel mechanism called Yield Stripping to address this challenge. The protocol takes any yield-bearing asset (e.g., staked APT in the form of stAPT) and splits it into two distinct components:

  • Principal Token (PT): A zero-coupon bond that represents the underlying principal asset. At a pre-defined expiry date, one PT can be redeemed 1:1 for the underlying asset. Before expiry, PTs trade at a discount, with the discount rate representing the market-implied fixed yield for that period.
  • Yield Token (YT): This token represents the right to all the future yield generated by the underlying asset until the expiry date.

By creating a liquid market for PTs and YTs, Stellaris unlocks a new layer of financial primitives on Aptos.

Key Features

  • Lock in Fixed-Rate Yields: Purchase PTs at a discount and hold them until maturity to earn a predictable, fixed return, insulated from yield volatility.
  • Speculate & Hedge on Interest Rates: Trade YTs to express a view on where future yields are headed. Go long on yield by buying YTs, or hedge your existing yield-generating positions by selling them.
  • Enhanced Liquidity & Capital Efficiency: Provide liquidity to the PT/SY Automated Market Maker (AMM) to earn trading fees on top of your underlying yield.
  • Standardized Yield (SY Tokens): The protocol wraps various underlying yield-bearing assets into a standardized SY token format, ensuring fungibility and broad compatibility across the ecosystem.

🔩 Move Contract Architecture

Stellaris is built on a series of highly modular and composable Move contracts, designed for security, efficiency, and clarity.

Core Modules

  • sy (Standardized Yield): The entry point of the protocol. This module wraps various yield-bearing assets (like stAPT, liquid staking tokens, etc.) into a standardized SY token, which is the base asset for all other protocol operations.
  • py (Principal & Yield): The heart of the yield-stripping mechanism. This module takes SY tokens and splits them 1:1 into a PT (Principal Token) and a YT (Yield Token) for a specific expiry date. It also manages the burning of PT/YT pairs to redeem the underlying SY.
  • yield_factory: A factory contract responsible for creating and managing new PyState pools for different expiry dates. Each PyState pool tracks the total supply and other critical state variables for a specific PT/YT series.
  • market & market_factory: Implements a custom Automated Market Maker (AMM) designed specifically for trading PT against SY. The market_factory creates new instances of these markets.
  • router: A user-friendly router contract that simplifies interactions with the protocol. It allows users to perform complex, multi-step operations (e.g., "zap" single-sided liquidity) in a single atomic transaction.
  • oracle: Integrates with Chainlink Data Feeds to provide reliable, real-time price information for underlying assets. This is critical for calculating asset values, exchange rates, and ensuring the financial integrity of the protocol.
  • math Libraries (fixed_point64, log_exp_math, etc.): A comprehensive suite of high-precision fixed-point math libraries. These are crucial for performing complex financial calculations (like time-aware AMM pricing curves and interest accrual) safely and accurately on-chain.
  • Position Management (py_position, market_position): These modules define and manage the data structures that represent a user's holdings, including their PT/YT balances in PyPosition objects and their liquidity provider shares in MarketPosition objects.

Architectural Note: Internal Token Representation

A key architectural decision in the current, early phase of Stellaris is how Principal Tokens (PT) and Yield Tokens (YT) are represented. To streamline development and ensure the core logic—from asset splitting (SY -> PT/YT) to the time-decay AMM and swaps—is robust and verifiable, we have opted for an internal accounting system.

Instead of minting PTs and YTs as fully composable Fungible Assets (analogous to ERC20 tokens), their balances are tracked as simple numerical values within a user's PyPosition object. This means that PT and YT can currently only be traded and utilized within the Stellaris protocol's ecosystem.

This approach differs from protocols like Pendle Finance, where derivative tokens are externalized and can be freely used in other DeFi applications. While our current implementation prioritizes a solid core system, evolving PT and YT into fully-fledged Fungible Assets for broader DeFi composability is a key objective on our future roadmap.

💡 How It Works: A User Journey

  1. Deposit: Alice deposits her stAPT (a yield-bearing liquid staking token) into the sy module. In return, she receives an equivalent amount of SY-stAPT.
  2. Mint PT & YT: Alice takes her SY-stAPT to the yield_factory and chooses an expiry date (e.g., December 31, 2025). The protocol mints PT-stAPT-Dec2025 and YT-stAPT-Dec2025 for her.
  3. Choose a Strategy:
    • Fixed Rate: Alice believes the fixed rate offered by the market is attractive. She sells her YT-stAPT-Dec2025 on the Stellaris market for more SY-stAPT. She now holds PT and can hold it to maturity to realize a fixed yield, regardless of how stAPT rewards fluctuate.
    • Leveraged Yield: Bob thinks stAPT yields will increase. He buys Alice's YT-stAPT-Dec2025. He now has leveraged exposure to the yield generated by the underlying stAPT without needing to own the principal.
    • Provide Liquidity: Carol decides to earn trading fees. She pairs her PT-stAPT-Dec2025 with some of her SY-stAPT and deposits them into the market's liquidity pool, receiving LP tokens in return.
  4. Redemption: After December 31, 2025, Alice can redeem her PT-stAPT-Dec2025 1:1 for SY-stAPT, which she can then unwrap back into the base stAPT asset.

🛠️ Project Status & Future Work

The Stellaris protocol has a robust and nearly feature-complete contract layer ready for the Aptos ecosystem.

  • Completed:
    • Core protocol architecture and modular contract design.
    • Yield Stripping mechanism (SY -> PT + YT).
    • Custom time-aware AMM for PT/SY pairs.
    • Liquidity Provisioning (single-sided and dual-sided).
    • Full integration with Chainlink price feeds via the oracle module.
  • Future Work:
    • Evolve PT/YT from internal balances into fully composable Fungible Assets to enhance interoperability with other DeFi protocols.
    • Launch and UI integration of a dedicated Yield Token (YT) AMM.
    • Implementation of a governance module for decentralized parameter control.
    • Expansion to support a wider range of yield-bearing assets on Aptos.
    • Building sophisticated vault strategies on top of the Stellaris primitives.

Disclaimer: Stellaris is an experimental DeFi protocol. While audited and rigorously tested, all smart contracts come with inherent risks. Please do your own research (DYOR) and only invest funds you are willing to lose.

About

Stellaris is a decentralized interest rate protocol built on the Aptos blockchain.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages