The Sunrise Stake Yield Controller is a suite of Solana programs that govern how staking yield from the Sunrise Stake program is distributed to climate projects.
The current (v4) architecture diversifies yield routing to multiple potential recipients, each handling its own off-chain or on-chain distribution rules.
- The Sunrise Stake program sends yield to a PDA owned by the Yield Router program.
- The Yield Router stores a State account, which includes a list of destinations and their allocation percentages.
- When the
allocate_yield
instruction is called, the Yield Router splits incoming yield across the destinations according to each allocation percentage. - Each destination is typically another PDA that manages how to route funds
- to a specific climate project (e.g., bridging, retiring carbon credits, or other actions).
The Yield Controller Management Portal is a CLI application can be used both to monitor and adjust yield routing within Sunrise Stake.
Its intended users are:
- Administrators: Who can adjust allocation percentages, add or remove recipients, and update recipient addresses.
- Observers: Who can view the current state of the system and the allocation percentages.
- Crank-turners: Who can trigger the allocation of yield to recipients, and return of carbon retirement certificates to Sunrise, but only according to the configuration set by the administrators.
This section describes how to use the management portal to monitor and configure yield routing.
git clone https://github.com/sunrisestake/yield-controller.git
cd yield-controller
- ANCHOR_PROVIDER_URL: Point this to a valid Solana mainnet RPC URL.
- ANCHOR_WALLET: Point this to your local wallet keypair file.
Tip: In read-only mode, you can use any wallet address (no funds required).
yarn install
yarn manager
Once the portal starts, you’ll see the main dashboard:
The dashboard shows the current on-chain configuration of the Sunrise Stake yield router, including:
- The current recipients of funds.
- The amount of funds waiting to be allocated.
- Each recipient’s allocation percentage.
The Yield Controller Management Portal supports the following operations, split into two categories: permissionless and admin-only.
- Permissionless operations can be performed by anyone, such as "crank-turning" operations - allocating yield to recipients and storing certificates.
- Admin-only operations require the admin keypair to be present in the environment.
- Yield Allocation (Permissionless)
This is the most frequent operation, where funds are extracted from the Sunrise Pool and routed to an intermediary account for each recipient, based on the current allocation percentages.
Funds are not sent to the recipients immediately, rather they are passed to an intermediary account. This is done to allow controlled releases of funds, considering liquidity or other constraints.
- Route Funds to Recipients (Permissionless)
After yield is allocated to intermediary accounts, this operation sends funds to the recipients.
- Update Proportions (Admin Only)
Adjust the allocation percentages for each recipient.
- Update Recipient Addresses (Admin Only)
Modify the destination addresses where allocated yield is eventually sent.
- Add or Remove Recipients (Admin Only)
Includes or removes recipients from the overall yield distribution list.
- Store Certificates (Permissionless)
Moves carbon credit retirement NFTs back to the Sunrise Treasury after receipt from climate projects.
The Sunrise Stake Yield Controller has undergone several iterations to improve its functionality and decentralization.
- Used the
buy_burn_fixed
strategy to buy and burn Toucan NCT tokens at a fixed price. - NCT was manually bridged from Polygon to Solana and stored in a PDA.
- Downsides included centralization (manual price updates, manual bridging) and lack of off-chain transparency (no official Toucan registry updates).
- Replaced the manual pricing with a Switchboard oracle for NCT price.
- Other downsides of the initial release persisted.
- Introduced a bridge-buy-retire flow using the Offset Bridge.
- Yield was routed to Polygon, where NCT was automatically purchased and retired via Toucan.
- Required several “crank” steps to complete the process, though still permissionless.
- Uses the Yield Router program to route yield from Sunrise Stake to multiple PDAs, each representing a different climate project or offset approach.
- Allows the protocol to expand beyond Toucan NCT.