SkillAgentSearch skills...

App

A proxy around Solana Stake Pools that diverts yield to public goods programs

Install / Use

/learn @sunrise-stake/App
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Sunrise Stake

What is Sunrise Stake?

Sunrise Stake is a ReFi staking protocol that directs staking yield to climate-positive projects.

At Sunrise Stake we believe in the power of Regenerative Finance to create positive outcomes for people and the planet. So we’ve created a non-custodial and permissionless protocol to send the yield earned through staking SOL towards retiring carbon tokens and other climate-positive projects.

Sunrise Stake is one of the first ReFi projects on the Solana blockchain; we provide a seamless way for holders of SOL to participate in the ReFi movement, while simultaneously strengthening the Solana blockchain.

For more details, visit the docs.

stake.gif

How it works

Note, for more details, visit the docs.

Step 1: Depositing SOL with Sunrise Stake

staking_white_without_comments.png

The staking process begins with you depositing your SOL via Sunrise Stake’s app.

Your SOL will be deposited into the underlying pools.

The majority of the SOL is deposited into a set of Stake Pools. At present, Sunrise Stake deposits into the Marinade Finance and SolBlaze pools. The stake pool tokens (mSOL and bSOL) are held by the protocol in a Program Derived Address (PDA).

A proportion of the deposited SOL is also deposited into the Marinade Unstake Pool. This pool is used during the unstaking process to provide fee-less unstaking, ensuring that users can withdraw their SOL at any time without incurring a fee.

When you deposit your SOL, you will receive an equivalent amount of gSOL in your wallet. gSOL can be used in the same way as SOL, by protocols or recipients that support it.

Step 2: Accruing yield

accruing_yield_white.png

Stake Pools

At the end of each epoch (every 2 or 3 days), yield gets paid out into stake accounts, and the value of the overall stake pool increases.

As mSOL and bSOL represent a share of their respective stake pools, the value of mSOL and bSOL also increases.

The yield accrued on the staked SOL is equal to the value of mSOL and bSOL held by Sunrise minus the value of SOL staked (calculated as the circulating supply of gSOL).

Liquidity Pool

The Marinade Unstake Pool also accrues yield through fees from the marinade liquid unstaking feature. The total value of the holdings of the Sunrise protocol are therefore:

  • The value of mSOL and bSOL held by Sunrise
  • The value of the liquidity pool tokens held by Sunrise

Step 3: Unstaking

unstaking_white_without_comments.png

If you unstake your SOL, Sunrise calculates how much of its share of the underlying stake and liquidity pools to sell, in order to receive your SOL.

Unstaking draws from the liquidity pool balance first, and then from the stake pools as needed.

For example, if you decide to unstake 100 SOL, and the value of the Sunrise-held liquidity pool tokens are currently at 90, Sunrise will withdraw 90 from the liquidity pool, and the remaining 10 from the stake pools.

Sunrise will also trigger a "rebalancing" transaction, that moves SOL from the stake pools into the liquidity pool, in order to maintain a 10% liquidity pool balance.

rebalancing_white.png

Treasury spending

Sunrise spends the yield earned through staking on purchasing and burning carbon tokens to offset carbon emissions for its users.

yield_controller_white_without_comments.png

1. Yield transfer to the treasury account

The yield earned from staking SOL is transferred to the treasury account.

It is a Program Derived Address (PDA) meaning that it is owned and controlled by a smart contract, not a private key.

This smart contract is known as the treasury controller. It can trigger a state change to buy or burn carbon tokens, thus retiring underlying carbon credits.

2. Purchasing carbon tokens

The carbon token used by Sunrise Stake is the Toucan Nature Carbon Tonne token.

NCT represents a tonne of CO2 or equivalent greenhouse gas removed from the atmosphere in various nature-based projects. It is issued on the Polygon and Celo blockchains and has been bridged to Solana via Wormhole.

The Solana bridged token mint address is 7sbtAMfAuSfsUvZKPWiXUXaizYCnpLL2BBnKNTU3wjfT.

3. Burning the Carbon Tokens

The Sunrise treasury controller purchases NCT from a DEX, and burns them.

NOTE: Until sufficient liquidity is present on Solana for NCT, Sunrise is maintaining a reserve of bridged NCT, and is automatically burning from this pot at a fixed price.

Quick Start

Install solana.

This project uses node v18 and yarn v1 If you have nvm installed, you can run nvm use to switch to the correct version, and nvm install to install it.

$ yarn
$ yarn program:build
$ yarn build
$ yarn anchor localnet

and in another shell.

$ yarn app:start

To run the tests, close the validator in the first shell and run

yarn test

Deployed Addresses:

| Account | Mainnet | Devnet | Description | Notes | |-------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------| | Sunrise Program | sunzv8N3A8dRHwUBvxgRDEbWKk8t7yiHR4FLRgFsTX6 | sunzv8N3A8dRHwUBvxgRDEbWKk8t7yiHR4FLRgFsTX6 | Program address for the main Sunrise Program | | | Sunrise State | 43m66crxGfXSJpmx5wXRoFuHubhHA1GCvtHgmHW6cM1P | Jpp29FzyV7rXdVRWFaiE9tBcVCaEMvj16gk87rC3S4z | State PDA describing the configuration of the Sunrise stake pool proxy. | | | State Update Authority | 48V9nmW9awiR9BmihdGhUL3ZpYJ8MCgGeUoSWbtqjicv | 48V9nmW9awiR9BmihdGhUL3ZpYJ8MCgGeUoSWbtqjicv | Update authority for the Sunrise state. In future this will be controlled by the DAO | | | gSOL Mint | gso1xA56hacfgTHTF4F7wN5r4jbnJsKh99vR595uybA | gso1xA56hacfgTHTF4F7wN5r4jbnJsKh99vR595uybA | Mint for the gSOL synthetic SOL derivative | | | TreasuryController Program | sbnbpcN3HVfcj9jTwzncwLeNvCzSwbfMwNmdAgX36VW | stcGmoLCBsr2KSu2vvcSuqMiEZx36F32ySUtCXjab5B | Program address for the treasury controller | | | TreasuryController State | DzyP73X4TWnh5jarfjapaNBxtjeEVsfknWVfToRYARDL | [8Z8BwUqZTD8XyJ6sdEEeWLaZ9Bg1J7TRDoYPfhkGS9Hr](https://explorer.solana.com/address/8Z8BwUqZTD8XyJ6sdEEeWLaZ9Bg1J7TRDoYPfhkGS

View on GitHub
GitHub Stars239
CategoryDevelopment
Updated15d ago
Forks6

Languages

HTML

Security Score

80/100

Audited on Mar 16, 2026

No findings