This is the full developer documentation for Sunrise
# đ Sunrise
> The base layer for Interliquid Networks.
Danger
Cosmos Sunrise shuts down on **5 October 2026 at 12:00 UTC**, at the v2.0.0 upgrade (block **6,504,000**). The network, app, and explorer stop. Holdings on this network are carried over to Sunrise Edge. You do not need to move funds or use the current app before shutdown.
Details are on [Sunrise Edge](https://sunriselayer.io/). Until shutdown, the previous site remains at [cosmos.sunriselayer.io](https://cosmos.sunriselayer.io/).
**The base layer for Interliquid Networks.**
Sunrise is a next-generation Layer 1 blockchain that combines high-throughput data availability with a native liquidity hub. It integrates **ProofâŻofâŻLiquidity (PoL)** and **fee abstraction**, delivering immediate liquidity and flexible gasâpayment options to rollups and application chains. Validators secure the network by staking RISE and/or vRISE. Liquidity providers supply liquidity to pools and earn vRISE and trading fees. Sunrise interoperates with [Rollup and L2 Blockchain](/build/l2-blockchains), allowing developers to adopt Sunrise with minimal integration effort.
Caution
Feature requests or ideas? Open a thread on our [GitHub Discussions](https://github.com/orgs/sunriselayer/discussions).
## Key Features
[Section titled âKey Featuresâ](#key-features)
| Feature | Description |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Proof of Liquidity (PoL)** | Validators secure the network by staking RISE and/or vRISE, aligning security *and* liquidity. Liquidity providers earn vRISE and trading fees. |
| **Fee Abstraction** | Any token can pay gas; Sunrise swaps a tiny slice to RISE under the hood. No need to hold multiple tokens for gas. |
| **Offâchain Data Availability** | Large data blobs are propagated and stored off-chain, while only a metadata URI pointing to these erasure-coded data shares are kept on-chain. Optimized for high-throughput rollups. |
## Blazing Fast Data Availability
[Section titled âBlazing Fast Data Availabilityâ](#blazing-fast-data-availability)
Sunriseâs offâchain data availability design unlocks unmatched throughput and costâefficiency without sacrificing onâchain security.
1. **Offâchain Erasure Coding**\
â Dramatically cuts validator compute & storage: only coded shards live on chain, full data reconstruction happens offâchain.
2. **Offâchain Blob Propagation**\
â Keeps the mempool lightweight and scales to **5âŻ+âŻMB/s**âvalidators sample availability while nodes fetch or prune blobs on demand.
3. **KZG Commitments**\
â Cryptographic anchors onâchain enable subâsecond proof verification and instant challenge resolution.
## Data Availability Features
[Section titled âData Availability Featuresâ](#data-availability-features)
Sunrise moves heavy data work offâchain while keeping onâchain proofs lean and verifiable.
1. **Off-chain Erasure Encoding**\
Dramatically cuts validator compute & storage: only a metadata URI pointing to these erasure-coded data shares on chain, full data reconstruction happens offâchain.
2. **Off-chain Storage Integration**\
Utilizing decentralized storage solutions such as IPFS and Arweave, data shards are stored externally. MsgPublishData includes only a metadata URI pointing to these erasure-coded data shares, reducing the on-chain block size requirements for blob transactions and enhancing scalability.
See [Data Availability](/learn/sunrise/data-availability) for more details.
## Why build on Sunrise?
[Section titled âWhy build on Sunrise?â](#why-build-on-sunrise)
1. **Gasless onboarding** â Users donât need a special gas token; your projectâs token works.
2. **Instant liquidity** â Provide liquidity and earn vRISE gauge rewards and trading fees.
3. **Rollkit / OPâStack ready** â Dropâin adapters for sovereign or Ethereumâsettled rollups.
## Core Modules
[Section titled âCore Modulesâ](#core-modules)
| Module | Purpose |
| ------------------------------------------------------------ | --------------------------------------------------- |
| [`x/da`](/learn/sunrise/data-availability) | Data Availlability layer data publication and proof |
| [`x/liquiditypool`](/learn/sunrise/liquidity-pool) | PoL pools & Providing liquidity |
| [`x/liquidityincentive`](/learn/sunrise/liquidity-incentive) | Gauge Voting for vRISE allocations & Bribes |
| [`x/swap`](/learn/sunrise/swap) | AMM router supporting token swap |
| [`x/tokenconverter`](/learn/sunrise/token-converter) | Conversion from vRISE to RISE |
| [`x/fee`](/learn/sunrise/fee) | fee abstraction & revenue split |
| [`x/lockup`](/learn/sunrise/lockup) | Locking of RISE for a certain period |
| [`x/shareclass`](/learn/sunrise/shareclass) | Staking RISE to secure the network |
## Revenue Streams
[Section titled âRevenue Streamsâ](#revenue-streams)
* **Tx fees** â Paid by RISE on sending transactions
* **Swap fees** â Paid to liquidity providers
## Next Steps
[Section titled âNext Stepsâ](#next-steps)
| Action | Link |
| ---------------------- | ------------------------------------------------------- |
| **Install a node** | [Node Setup Guide](/run-a-sunrise-node/types/consensus) |
| **Launch a rollup** | [Rollkit Guide](/build/l2-blockchains/rollkit) |
| **Become a validator** | [Validator Guide](/build/validators) |
| **Join Discord** | [Discord Community](https://discord.gg/sunriselayer) |
# Client
> The Sunrise client libraries let you query the chain, submit blobs and sign / broadcast transactions from your application without having to run custom protobuf tooling or handâ...
The Sunrise client libraries let you **query** the chain, **submit blobs** and **sign / broadcast transactions** from your application without having to run custom protobuf tooling or handâcraft Tendermint JSONâRPC calls.
## Available SDKs
[Section titled âAvailable SDKsâ](#available-sdks)
* **JavaScript / TypeScript** - Primary SDK available on npm
* **Rust** - gRPC + protobuf type generation with Buf/Prost
* **Go** and **Python** bindings - Coming soon (contributions welcome)
## JavaScript / TypeScript SDK
[Section titled âJavaScript / TypeScript SDKâ](#javascript--typescript-sdk)
[Sunrise Client](https://github.com/sunriselayer/sunrise-client-js)
### Installation
[Section titled âInstallationâ](#installation)
```bash
npm install @sunriselayer/client @cosmjs/proto-signing @cosmjs/stargate
# or
pnpm add @sunriselayer/client @cosmjs/proto-signing @cosmjs/stargate
# or
yarn add @sunriselayer/client @cosmjs/proto-signing @cosmjs/stargate
```
### Basic Usage
[Section titled âBasic Usageâ](#basic-usage)
The client is designed to be used with [CosmJS](https://cosmos.github.io/cosmjs/), the standard library for interacting with Cosmos SDK chains.
Hereâs an example of how to create a concentrated liquidity position:
```typescript
import {
createEncodeObject,
sunriseTypesRegistry,
} from "@sunriselayer/client";
// The schemas and types for all modules are exported from the client.
// Here, we import the schema for the `MsgCreatePosition` message.
import { MsgCreatePositionSchema } from "@sunriselayer/client/types/liquiditypool";
import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing";
import { SigningStargateClient, coin } from "@cosmjs/stargate";
const RPC = "https://goldberg-rpc.sunrise.node"; // Replace with your node
const SENDER_MNEMONIC = process.env.MNEMONIC!; // Never commit private keys
// This is a simplified example. In a real application, you would fetch pool details
// from a query client and calculate ticks from user-provided prices.
const MOCK_POOL_ID = 1n; // NOTE: Use BigInt for uint64 fields
const MOCK_LOWER_TICK = -20000n;
const MOCK_UPPER_TICK = 20000n;
async function main() {
// 1. Create a wallet and a signer from a mnemonic
const signer = await DirectSecp256k1HdWallet.fromMnemonic(SENDER_MNEMONIC, {
prefix: "sunrise", // The Bech32 address prefix for Sunrise
});
const [account] = await signer.getAccounts();
const senderAddress = account.address;
console.log("Sender address:", senderAddress);
// 2. Create a signing client with the signer and type registry
const client = await SigningStargateClient.connectWithSigner(RPC, signer, {
registry: sunriseTypesRegistry, // The custom type registry for Sunrise messages
});
console.log("Successfully connected to", RPC);
// 3. Prepare a 'Create Position' transaction message
// All message fields are fully typed and validated.
const msg = createEncodeObject(MsgCreatePositionSchema, {
sender: senderAddress,
poolId: MOCK_POOL_ID,
lowerTick: MOCK_LOWER_TICK,
upperTick: MOCK_UPPER_TICK,
// Use the `coin` helper from @cosmjs/stargate to create Coin objects
tokenBase: coin("1000000", "urise"), // 1 RISE
tokenQuote: coin("5000000", "uusdc"), // 5 USDC (example)
minAmountBase: "0", // Slippage protection
minAmountQuote: "0", // Slippage protection
});
// 4. Define the fee and sign and broadcast the transaction
const fee = {
amount: [coin("10000", "uusdrise")],
gas: "400000", // Gas limit
};
const memo = "Created position via @sunriselayer/client";
console.log("Broadcasting transaction...");
const { transactionHash } = await client.signAndBroadcast(
senderAddress,
[msg],
fee,
memo
);
console.log("Successfully created position!");
console.log("Transaction hash:", transactionHash);
}
main().catch(console.error);
```
All methods are fully typed when using TypeScript.
## Rust SDK (Coming Soon)
[Section titled âRust SDK (Coming Soon)â](#rust-sdk-coming-soon)
The Rust SDK is currently implemented through protobuf generation. Hereâs how to set it up:
### Project Structure
[Section titled âProject Structureâ](#project-structure)
```plaintext
my-sunrise-client/
âââ src/
â âââ main.rs
âââ buf.yaml
âââ buf.gen.yaml
```
### Configuration Files
[Section titled âConfiguration Filesâ](#configuration-files)
1. `buf.yaml`:
```yaml
version: v2
deps:
- buf.build/cosmos/cosmos-sdk
- buf.build/cosmos/cosmos-proto
- buf.build/cosmos/gogo-proto
- buf.build/protocolbuffers/wellknowntypes
```
2. `buf.gen.yaml`:
```yaml
version: v2
managed:
enabled: true
plugins:
- remote: buf.build/community/neoeinstein-prost:v0.4.0
out: src
opt:
- compile_well_known_types
- extern_path=.google.protobuf=::pbjson_types
- remote: buf.build/community/neoeinstein-prost-serde:v0.3.1
out: src
- remote: buf.build/community/neoeinstein-tonic:v0.4.1
out: src
opt:
- compile_well_known_types
- extern_path=.google.protobuf=::pbjson_types
inputs:
- git_repo: https://github.com/sunriselayer/sunrise.git
branch: main
subdir: proto
```
### Setup and Generation
[Section titled âSetup and Generationâ](#setup-and-generation)
```bash
# Add required dependencies
cargo add tonic tonic-build pbjson-types
# Update dependencies and generate code
buf dep update
buf generate
```
### Example Usage
[Section titled âExample Usageâ](#example-usage)
```rust
use tonic::transport::Channel;
use sunriselayer::sunrise::da::v1::query_client::QueryClient;
use sunriselayer::sunrise::da::v1::ParamsRequest;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let mut client = QueryClient::connect("http://localhost:9090").await?;
let resp = client.params(ParamsRequest {}).await?;
println!("DA params: {:?}", resp.into_inner());
Ok(())
}
```
## Additional Resources
[Section titled âAdditional Resourcesâ](#additional-resources)
* [Full JavaScript Method Reference](https://github.com/SunriseLayer/gitbook/blob/main/build/client/reference/README.md)
* [Rollup Integration Examples](/build/l2-blockchains)
* [Data Availability Proofs](/build/validators)
## Troubleshooting
[Section titled âTroubleshootingâ](#troubleshooting)
| Problem | Solution |
| -------------------- | ---------------------------------------------------------- |
| Connection refused | Verify RPC URL and ensure DA node is running |
| Authentication error | Ensure account has sufficient funds |
| Rust build failure | Update to Rust 1.74+ and run `cargo clean && buf generate` |
# L2 Blockchains
> It is recommended to run the full consensus node locally, without relying on an external RPC. This ensures better reliability and control over your L2 deployment.
## Sunrise Documents
[Section titled âSunrise Documentsâ](#sunrise-documents)
* [Rollkit](/build/l2-blockchains/rollkit)
* [Sunrise Data](/build/l2-blockchains/rollkit/sunrise-data) - Configure and run the Sunrise DA relay
* [Rollkit L2 Chain](/build/l2-blockchains/rollkit/rollkit) - Build and deploy a Rollkit-based L2
* [Optimism OP Stack](/build/l2-blockchains/optimism)
* [Sunrise Data](/build/l2-blockchains/optimism/sunrise-data) - Set up Sunrise DA for OP Stack
* [OP Stack L2 Chain](/build/l2-blockchains/optimism/op-stack) - Deploy an OP Stack L2 with Sunrise
## How to create L2
[Section titled âHow to create L2â](#how-to-create-l2)
It is recommended to run the full consensus node locally, without relying on an external RPC. This ensures better reliability and control over your L2 deployment.
[Sunrise Consensus Node Document](/run-a-sunrise-node/types/consensus)
### Rollkit
[Section titled âRollkitâ](#rollkit)
`sunrise-data`, and `rollkit` need to be run. The integration provides:
* Native data availability through Sunrise
* Sovereign rollup capabilities
* Customizable execution environment
* Simple configuration and deployment
### OP Stack
[Section titled âOP Stackâ](#op-stack)
`sunrise-data`, `optimism` and `op-geth` need to be run. Key points:
* The local EVM L1 chain is only used to meet OP Stack requirements
* The actual data (metadata) is stored in Sunrise
* Use Ganache, Hardhat, Anvil or similar for local L1 chain
* Sunrise handles the actual data availability
## Requirements
[Section titled âRequirementsâ](#requirements)
| Type | CPU | Architecture | Mem | Disk | Bandwidth | Purpose |
| ----------------------- | ------ | ------------ | ----- | -------- | --------- | ----------------------- |
| Rollkit + Sunrise Data | 4 Core | x86\_64 | 16 GB | 1 TB SSD | 1 Gbps | Development and testing |
| OP Stack + Sunrise Data | 6 Core | x86\_64 | 32 GB | 1 TB SSD | 1 Gbps | Production deployment |
Additional considerations:
* SSD should be enterprise-grade for production
* Bandwidth requirements increase with transaction volume
* Memory requirements scale with state size
## Official Document
[Section titled âOfficial Documentâ](#official-document)
* [Rollkit](https://rollkit.dev/learn/intro)
* [BeaconKit (option)](https://rollkit.dev/tutorials/execution/beaconkit): By combining BeaconKit and Rollkit, EVM compatible L2 blockchain is possible to develop.
* Provides full EVM compatibility while maintaining Sunrise DA benefits
* [OP Stack](https://docs.optimism.io/stack/getting-started)
* Comprehensive documentation for OP Stack deployment
* Integration guides for various components
## Integration Architecture
[Section titled âIntegration Architectureâ](#integration-architecture)
```plaintext
âââââââââââââââââââ âââââââââââââââââââ âââââââââââââââââââ
â â â â â â
â L2 Blockchain ââââââ¶â Sunrise DA ââââââ¶â Validator â
â â â Layer â â Network â
âââââââââââââââââââ âââââââââââââââââââ âââââââââââââââââââ
â â âČ
â â â
⌠⌠â
âââââââââââââââââââ âââââââââââââââââââ â
â â â â â
â User â â DA Proof âââââââââââââââ
â Applications â â Verification â
âââââââââââââââââââ âââââââââââââââââââ
```
## Common Integration Steps
[Section titled âCommon Integration Stepsâ](#common-integration-steps)
1. **Setup Sunrise DA Node**
* Deploy a Sunrise node or connect to the testnet
* Configure network parameters
* Set up validator if needed
* Verify node synchronization
2. **Configure L2 Framework**
* Install required dependencies
* Set up configuration files
* Connect to Sunrise DA layer
* Configure network parameters
3. **Implement DA Integration**
* Configure blob submission
* Set up proof verification
* Implement fee handling
* Set up monitoring
4. **Testing and Deployment**
* Test on testnet
* Verify DA proofs
* Deploy to production
* Monitor performance
## Configuration Examples
[Section titled âConfiguration Examplesâ](#configuration-examples)
### Rollkit Configuration
[Section titled âRollkit Configurationâ](#rollkit-configuration)
```yaml
[da]
rpc_address = "http://localhost:26657"
fee_denom = "uusdrise"
gas_price = "0.025"
[rollup]
chain_id = "my-rollup-1"
```
### OP Stack Configuration
[Section titled âOP Stack Configurationâ](#op-stack-configuration)
```bash
# Environment variables
DA_SERVER=http://localhost:8547
BLOB_RPC=http://localhost:26657
```
## Best Practices
[Section titled âBest Practicesâ](#best-practices)
1. **Security**
* Always verify DA proofs
* Use secure RPC endpoints
* Implement proper error handling
* Regular security audits
2. **Performance**
* Optimize blob sizes
* Implement proper caching
* Monitor gas costs
* Regular performance testing
3. **Reliability**
* Implement retry mechanisms
* Monitor DA proof status
* Set up proper logging
* Regular backups
## Troubleshooting
[Section titled âTroubleshootingâ](#troubleshooting)
| Issue | Solution | Prevention |
| ----------------------- | -------------------------------------------------- | ------------------------------- |
| DA proofs not verifying | Check RPC connection and proof format | Regular connection testing |
| High gas costs | Optimize blob size and frequency | Monitor and adjust gas settings |
| Connection issues | Verify network configuration and firewall settings | Regular network monitoring |
## Additional Resources
[Section titled âAdditional Resourcesâ](#additional-resources)
* [Rollkit Documentation](/build/l2-blockchains/rollkit)
* [OP Stack Integration](/build/l2-blockchains/optimism)
* [Data Availability Proofs](/build/validators/data-availability-proof)
* [Fee Abstraction](https://github.com/SunriseLayer/gitbook/blob/main/learn/sunrise/fee-abstraction.md)
# OP Stack
> Sunrise's Data Availability Layer supports Layer 2 blockchains created using [OP Stack](https://github.com/ethereum-optimism/optimism)
Sunriseâs Data Availability Layer supports Layer 2 blockchains created using [OP Stack](https://github.com/ethereum-optimism/optimism)
This is a guide to connecting an L2 chain created using OP Stack to Sunrise chain with [Sunrise Data](https://github.com/sunriselayer/sunrise-data). Data Availability layer is supported in Sunrise v0.3.0 and later.
## Sunrise Data
[Section titled âSunrise Dataâ](#sunrise-data)
**Before optimism start, set up sunrise-data.** [Sunrise Data Document](/build/l2-blockchains/optimism/sunrise-data)
It is recommended to run the full consensus node locally, without relying on an external RPC. [Sunrise Consensus Node Document](/run-a-sunrise-node/types/consensus)
## OP Stack
[Section titled âOP Stackâ](#op-stack)
Start your OP Stack L2 chain with [Alt-DA mode](https://docs.optimism.io/operators/chain-operators/features/alt-da-mode).
Follow the latest documentation. It may be necessary to have a local EVM chain to meet the requirements.
[OP Stack L2 Chain Document](/build/l2-blockchains/optimism/op-stack)
# OP Stack L2 Chain
> Sunrise's Data Availability Layer supports Layer 2 blockchains created using [OP Stack](https://github.com/ethereum-optimism/optimism)
Sunriseâs Data Availability Layer supports Layer 2 blockchains created using [OP Stack](https://github.com/ethereum-optimism/optimism) This is a guide to connecting an L2 chain created using OP Stack to Sunrise chain with [Sunrise Data](/build/l2-blockchains/optimism/sunrise-data). Data Availability layer is supported in Sunrise v0.3.0 and later.
This version of the OP Stack requires the L1 EVM chain for operation. Use some kind of testnet or local chain.
## How to set up OP Stack
[Section titled âHow to set up OP Stackâ](#how-to-set-up-op-stack)
As an example, here is how to use OP Stack to create an L2 chain and run it on the Sunriseâs Data Availability Layer.
This guide uses the Ethereum Sepolia testnet to meet the OP Stack requirements, but a local EVM chain will also work.
```
sequenceDiagram
autonumber
L2 ->> Ethereum Sepolia: Send Tx (e.g. token transfer)
Ethereum Sepolia --> L2: API & Tx Response
L2 ->> Sunrise: Send Block Data and Save
```
### Dependencies
[Section titled âDependenciesâ](#dependencies)
Dependencies and general installation instructions for Ubuntu 22.04.
* node
```bash
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - && sudo apt-get install -y nodejs
```
* [pnpm](https://pnpm.io/ja/installation)
```bash
curl -fsSL https://get.pnpm.io/install.sh | sh -
```
* [foundry](https://book.getfoundry.sh/getting-started/installation)
```bash
curl -L https://foundry.paradigm.xyz | bash
```
* just
```bash
wget -qO - 'https://proget.makedeb.org/debian-feeds/prebuilt-mpr.pub' | gpg --dearmor | sudo tee /usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg 1> /dev/null
echo "deb [arch=all,$(dpkg --print-architecture) signed-by=/usr/share/keyrings/prebuilt-mpr-archive-keyring.gpg] https://proget.makedeb.org prebuilt-mpr $(lsb_release -cs)" | sudo tee /etc/apt/sources.list.d/prebuilt-mpr.list
sudo apt update
sudo apt install just
```
### Set up Optimism Rollup Testnet
[Section titled âSet up Optimism Rollup Testnetâ](#set-up-optimism-rollup-testnet)
### Optimism
[Section titled âOptimismâ](#optimism)
1. **Clone the optimism repo**
```bash
git clone https://github.com/ethereum-optimism/optimism.git
```
2. Check out the correct branch
```bash
cd optimism
git checkout v1.9.1
```
ăWe have confirmed the operation with the latest version at the time of document update. If you use other versions, please check the differences.
1. **Run the following to check you have all dependencies**
```bash
./packages/contracts-bedrock/scripts/getting-started/versions.sh
```
2. Build all packages associated with Optimism
```bash
make op-node op-batcher op-proposer
```
If you are having issues with this step, make sure your versions match those in the optimism docs. Specifically, you may have to downgrade your go version.
3. Clone and build op-geth
```bash
cd ~
git clone https://github.com/ethereum-optimism/op-geth.git
cd op-geth
make geth
```
ă For more information on supported \`op-geth, please check the [Production Releases](https://github.com/ethereum-optimism/optimism/tree/v1.12.0?tab=readme-ov-file#production-releases) in the optimism repository.
1. Fill out environment variables
```bash
cd ~/optimism
cp .envrc.example .envrc
```
Run the script to generate addresses with the following command in the optimism repo: `./packages/contracts-bedrock/scripts/getting-started/wallets.sh`
The output will look like the following which will you need to paste into the environment file as well:
```bash
##################################################
# Getting Started #
##################################################
# Admin account
export GS_ADMIN_ADDRESS=0x82eeB61600f290ce3F9400d345aAEcBe5faF7AEB
export GS_ADMIN_PRIVATE_KEY=0x7c726817d047ee62cbb060312fe2620ba5462495e34f7e8279ba22faa96bca20
# Batcher account
export GS_BATCHER_ADDRESS=0x7BECbC4C747922d92e4F917951D9D8c3Ada7eb60
export GS_BATCHER_PRIVATE_KEY=0xc7dfaa7b8449f00480196377da50d29318b2397fd0296d0ab4f11d48ee3cf723
# Proposer account
export GS_PROPOSER_ADDRESS=0x773F4527fECc889d6DD3Cd7d044F4AC1Ad765a31
export GS_PROPOSER_PRIVATE_KEY=0xed6029a5928e83c5d2a28d9574304bae9a825e19f7f18a50d34edc13b505afed
# Sequencer account
export GS_SEQUENCER_ADDRESS=0x2B43c41FCbabc5437A6E1B97F47cA085a4B16f61
export GS_SEQUENCER_PRIVATE_KEY=0x0a7d4ce467fe4d00b8930215c98335e06c16db34cd501c8c3f3173015487662e
##################################################
# Chain Information #
##################################################
# L1 chain information
export L1_CHAIN_ID=11155111
export L1_BLOCK_TIME=12
# L2 chain information
export L2_CHAIN_ID=42069
export L2_BLOCK_TIME=2
##################################################
# op-node Configuration #
##################################################
# The kind of RPC provider, used to inform optimal transactions receipts
# fetching. Valid options: alchemy, quicknode, infura, parity, nethermind,
# debug_geth, erigon, basic, any.
export L1_RPC_KIND=infura
##################################################
# Contract Deployment #
##################################################
# RPC URL for the L1 network to interact with
export L1_RPC_URL=https://sepolia.infura.io/v3/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```
API key for RPC URL can be found in [Infura](https://www.infura.io/) or other providers.
2. Fund the addresses with enough Sepolia ETH, the optimism docs recommend the following:
* Admin â 0.5 Sepolia ETH
* Proposer â 0.2 Sepolia ETH
* Batcher â 0.1 Sepolia ETH
Ref: [Sepolia PoW Faucet](https://sepolia-faucet.pk910.de/)
3. Load environment variables with direnv `direnv allow` You should see something similar to this after:
```bash
direnv: loading ~/optimism/.envrc direnv: export +DEPLOYMENT_CONTEXT +ETHERSCAN_API_KEY +GS_ADMIN_ADDRESS +GS_ADMIN_PRIVATE_KEY +GS_BATCHER_ADDRESS +GS_BATCHER_PRIVATE_KEY +GS_PROPOSER_ADDRESS +GS_PROPOSER_PRIVATE_KEY +GS_SEQUENCER_ADDRESS +GS_SEQUENCER_PRIVATE_KEY +IMPL_SALT +L1_RPC_KIND +L1_RPC_URL +PRIVATE_KEY +TENDERLY_PROJECT +TENDERLY_USERNAME
```
If you do not see any output, try
`nano ~/.zshrc`
`nano ~/.bashrc`
Add the following line depending on whether you use bash or zsh
```bash
eval "$(direnv hook zsh)"
```
```bash
eval "$(direnv hook bash)"
```
Save the changes with
`source ~/.zshrc`
`source ~/.bashrc`
4. Configure the network
```bash
cd ~/optimism/packages/contracts-bedrock
./scripts/getting-started/config.sh
```
You can view the config in the **`deploy-config/getting-started.json`** file Add the following at the bottom of the config generated
```bash
nano deploy-config/getting-started.json
```
```json
...
"preimageOracleMinProposalSize": 1800000,
"preimageOracleChallengePeriod": 300,
"useAltDA": true,
"daCommitmentType": "GenericCommitment",
"daChallengeWindow": 160,
"daResolveWindow": 160,
"daBondSize": 1000000,
"daResolverRefundPercentage": 0
}
```
5. Deploy the L1 contracts
```bash
just install
DEPLOYMENT_OUTFILE=deployments/artifact.json \
DEPLOY_CONFIG_PATH=deploy-config/getting-started.json \
forge script scripts/deploy/Deploy.s.sol:Deploy \
--broadcast --private-key $GS_ADMIN_PRIVATE_KEY \
--rpc-url $L1_RPC_URL --slow
```
L2 Allocs
```bash
CONTRACT_ADDRESSES_PATH=deployments/artifact.json \
DEPLOY_CONFIG_PATH=deploy-config/getting-started.json \
STATE_DUMP_PATH=deploy-config/statedump.json \
forge script scripts/L2Genesis.s.sol:L2Genesis \
--sig 'runWithStateDump()' \
--chain 42069
```
Use your L2 chain id in `--chain`.
> If you see a nondescript error that includes `EvmError: Revert` and `Script failed` then you likely need to change the `IMPL_SALT` environment variable. This variable determines the addresses of various smart contracts that are deployed via [CREATE2(opens in a new tab)](https://eips.ethereum.org/EIPS/eip-1014). If the same `IMPL_SALT` is used to deploy the same contracts twice, the second deployment will fail. **You can generate a new `IMPL_SALT` by running `direnv allow` anywhere in the Optimism Monorepo.**
6. Generate the L2 config files
```bash
cd ~/optimism/op-node
./bin/op-node genesis l2 \
--deploy-config ../packages/contracts-bedrock/deploy-config/getting-started.json \
--l1-deployments ../packages/contracts-bedrock/deployments/artifact.json \
--outfile.l2 genesis.json \
--outfile.rollup rollup.json \
--l1-rpc $L1_RPC_URL \
--l2-allocs ../packages/contracts-bedrock/deploy-config/statedump.json
```
Check the end of the generated `rollup.json`
```json
"alt_da": {
"da_challenge_contract_address": "0x0000000000000000000000000000000000000000",
"da_commitment_type": "GenericCommitment",
"da_challenge_window": 160,
"da_resolve_window": 160
}
```
7. Create an authentication key
```bash
openssl rand -hex 32 > jwt.txt
```
8. Copy genesis files into op-geth directory
```bash
cp genesis.json ~/op-geth
cp jwt.txt ~/op-geth
```
9. Initialize `op-geth`
```bash
cd ~/op-geth
mkdir datadir
make geth
build/bin/geth init --datadir=datadir genesis.json
```
## Start L2
[Section titled âStart L2â](#start-l2)
**Before optimism start, set up `sunrised` & `sunrise-data`, etc.**
[**Sunrise Data**](/build/l2-blockchains/optimism/sunrise-data)
1. Start `op-geth`
```bash
./build/bin/geth \
--datadir ./datadir \
--http \
--http.corsdomain="*" \
--http.vhosts="*" \
--http.addr=0.0.0.0 \
--http.port=9545 \
--http.api=web3,debug,eth,txpool,net,engine \
--ws \
--ws.addr=0.0.0.0 \
--ws.port=9546 \
--ws.origins="*" \
--ws.api=debug,eth,txpool,net,engine \
--syncmode=full \
--nodiscover \
--maxpeers=0 \
--networkid=42069 \
--authrpc.vhosts="*" \
--authrpc.addr=0.0.0.0 \
--authrpc.port=9551 \
--authrpc.jwtsecret=./jwt.txt \
--rollup.disabletxpoolgossip=true
```
2. Start `op-node`
```bash
cd ~/optimism/op-node
./bin/op-node \
--l2=http://localhost:9551 \
--l2.jwt-secret=./jwt.txt \
--sequencer.enabled \
--sequencer.l1-confs=5 \
--verifier.l1-confs=4 \
--rollup.config=./rollup.json \
--rpc.addr=0.0.0.0 \
--rpc.port=8547 \
--p2p.disable \
--rpc.enable-admin \
--p2p.sequencer.key=$GS_SEQUENCER_PRIVATE_KEY \
--l1=$L1_RPC_URL \
--l1.rpckind=$L1_RPC_KIND \
--altda.enabled=true \
--altda.da-server=http://localhost:3100 \
--altda.da-service=true \
--l1.beacon.ignore=true
```
âaltda.da-server is your da-sererâs http URL
3. Start `op-batcher`
```bash
cd ~/optimism/op-batcher
./bin/op-batcher \
--l2-eth-rpc=http://localhost:9545 \
--rollup-rpc=http://localhost:8547 \
--poll-interval=1s \
--sub-safety-margin=6 \
--num-confirmations=1 \
--safe-abort-nonce-too-low-count=3 \
--resubmission-timeout=30s \
--rpc.addr=0.0.0.0 \
--rpc.port=8548 \
--rpc.enable-admin \
--max-channel-duration=1 \
--l1-eth-rpc=$L1_RPC_URL \
--private-key=$GS_BATCHER_PRIVATE_KEY \
--altda.enabled=true \
--altda.da-service=true \
--altda.da-server=http://localhost:3100
```
4. Start `op-proposer`
```bash
cd ~/optimism/op-proposer
./bin/op-proposer \
--poll-interval=12s \
--rpc.port=9560 \
--rollup-rpc=http://localhost:8547 \
--l2oo-address=$(cat ../packages/contracts-bedrock/deployments/42069-deploy.json | jq -r .L2OutputOracleProxy) \
--private-key=$GS_PROPOSER_PRIVATE_KEY \
--l1-eth-rpc=$L1_RPC_URL
```
5. Work
# Sunrise Data
> [Sunrise Data](https://github.com/sunriselayer/sunrise-data) acts as a relay server connecting the L2 chain to the Sunrise DA layer.
[Sunrise Data](https://github.com/sunriselayer/sunrise-data) acts as a relay server connecting the L2 chain to the Sunrise DA layer.
## Sunrise Consensus Node
[Section titled âSunrise Consensus Nodeâ](#sunrise-consensus-node)
Requires a networked Sunrise node to operate. [Networks](/run-a-sunrise-node/networks) running Sunrise v0.3.0 or higher support Data Availability Layer.
Follow the [Node Guide](/run-a-sunrise-node/types/consensus) on how to create a consensus node.
### How to set up sunrise-data
[Section titled âHow to set up sunrise-dataâ](#how-to-set-up-sunrise-data)
1. Running `sunrised` See [Consensus Node](https://github.com/SunriseLayer/gitbook/blob/main/build/node/types/consensus/full-consensus-node.md) for setting up.
2. Clone sunrise-data repo
```bash
cd ~
git clone https://github.com/sunriselayer/sunrise-data.git
cd sunrise-data
make install
```
3. Create and edit `config.toml`
```bash
cp config.default.toml config.toml
nano config.toml
```
To connect to a local IPFS daemon, leave the `ipfs_api_url` field empty
Change `home_path` to your .sunrise directory and `publisher_account` to your sunrised keyâs name
```toml
[api]
port = 8000
ipfs_api_url = ""
ipfs_addrinfo = ""
[chain]
address_prefix="sunrise"
home_path="/home/ubuntu/.sunrise"
keyring_backend="test"
sunrised_rpc="http://localhost:26657"
[publish]
publisher_account="your_publisher_account"
publish_fees="10000uusdrise"
[optimism]
listen_address="127.0.0.1"
port=3100
data_shard_count=10
parity_shard_count=10
```
ă `home_path`, `keyring_backend`, `publisher_account` must be entered values on your sunrised keyring. See [Local Key Pair document](/run-a-sunrise-node/types/consensus/full-consensus-node#create-or-restore-a-local-key-pair) and set with `--keyring-backend test` option. For `home_path`, enter the path where the sunrise keyring exists. ă For `sunrised_rpc`, it is preferable to run sunrised locally, but if this is not possible, use the published RPC. See our [Network Document](/run-a-sunrise-node/networks). A local key pair is still required in such cases.
The other fields can be left as is.
### Run IPFS on local
[Section titled âRun IPFS on localâ](#run-ipfs-on-local)
1. Run IPFS
```bash
wget https://dist.ipfs.tech/kubo/v0.31.0/kubo_v0.31.0_linux-amd64.tar.gz
tar -xvzf kubo_v0.31.0_linux-amd64.tar.gz
cd kubo
sudo ./install.sh
ipfs init --profile=lowpower
ipfs daemon
```
2. Check the IPFS node ID and optionally share and add a remote peer
```bash
ipfs id
```
### Start
[Section titled âStartâ](#start)
```bash
sunrise-data optimism
```
# Rollkit
> Sunrise's Data Availability Layer supports Layer 2 blockchains created using [Rollkit](https://github.com/rollkit/rollkit)
Sunriseâs Data Availability Layer supports Layer 2 blockchains created using [Rollkit](https://github.com/rollkit/rollkit)
This is a guide to connecting an L2 chain created using Rollkit to Sunrise chain with [Sunrise Data](https://github.com/sunriselayer/sunrise-data). Data Availability layer is supported in Sunrise v0.3.1-rc1 and later.
## Sunrise Data
[Section titled âSunrise Dataâ](#sunrise-data)
**Before optimism start, set up sunrise-data.**[Sunrise Data Document](/build/l2-blockchains/rollkit/sunrise-data)
It is recommended to run the full consensus node locally, without relying on an external RPC.[Sunrise Consensus Node Document](/run-a-sunrise-node/types/consensus)
## Rollkit
[Section titled âRollkitâ](#rollkit)
Start your Rollkit L2 chain.
[Rollkit L2 Chain Document](/build/l2-blockchains/rollkit/rollkit)
# How to run Sunrise Rollkit
> As an example, here is how to use Rollkit to create an L2 chain and run it on the Sunrise's Data Availability Layer.
As an example, here is how to use Rollkit to create an L2 chain and run it on the Sunriseâs Data Availability Layer.
## Dependencies
[Section titled âDependenciesâ](#dependencies)
Dependencies and general installation instructions for Ubuntu 22.04.
## Set up Sunrise Data
[Section titled âSet up Sunrise Dataâ](#set-up-sunrise-data)
Rollkit support is provided via a server included in sunrise-data. See [Rollkit documentation](https://rollkit.dev/tutorials/da/overview) for the role of the DA server.
See [Sunrise Data document](/build/l2-blockchains/rollkit/sunrise-data) to set it up. By default, the GRPC server for Rollkit support listens on port 7980.
## Run Rollkit
[Section titled âRun Rollkitâ](#run-rollkit)
1. Clone rollkit repo
```bash
cd ~
git clone https://github.com/rollkit/rollkit.git
cd rollkit
git checkout v0.14.1 # latest major version
make install
```
2. Start rollkit chain Use `--rollkit.da_address` option to connect to the DA server. The other port specification options are used to avoid conflicts when running sunrised locally. See [Rollkit documentation](https://rollkit.dev/) for other chain configuration.
```bash
rollkit start --rollkit.aggregator \
--rollkit.sequencer_rollup_id sunrise \
--rollkit.da_address grpc://localhost:7980 \
--p2p.laddr tcp://0.0.0.0:25656 --rpc.laddr tcp://127.0.0.1:25657
```
3. Work
## Links
[Section titled âLinksâ](#links)
* [Rollkit](https://rollkit.dev/learn/intro)
# Sunrise Data
> [Sunrise Data](https://github.com/sunriselayer/sunrise-data) acts as a relay server connecting the L2 chain to the Sunrise DA layer.
[Sunrise Data](https://github.com/sunriselayer/sunrise-data) acts as a relay server connecting the L2 chain to the Sunrise DA layer.
## Sunrise Consensus Node
[Section titled âSunrise Consensus Nodeâ](#sunrise-consensus-node)
Requires a networked Sunrise node to operate. [Networks](/run-a-sunrise-node/networks) running Sunrise v0.3.0 or higher support Data Availability Layer.
Follow the [Node Guide](/run-a-sunrise-node/types/consensus) on how to create a consensus node.
### How to set up sunrise-data
[Section titled âHow to set up sunrise-dataâ](#how-to-set-up-sunrise-data)
1. Running `sunrised` See [Consensus Node](https://github.com/SunriseLayer/gitbook/blob/main/build/node/types/consensus/full-consensus-node.md) for setting up.
2. Clone sunrise-data repo
```bash
cd ~
git clone https://github.com/sunriselayer/sunrise-data.git
cd sunrise-data
make install
```
3. Create and edit `config.toml`
```bash
cp config.default.toml config.toml
nano config.toml
```
To connect to a local IPFS daemon, leave the `ipfs_api_url` field empty
Change `home_path` to your .sunrise directory and `publisher_account` to your sunrised keyâs name
```toml
[api]
port = 8000
ipfs_api_url = ""
ipfs_addrinfo = ""
[chain]
address_prefix="sunrise"
home_path="/home/ubuntu/.sunrise"
keyring_backend="test"
sunrised_rpc="http://localhost:26657"
[publish]
publisher_account="your_publisher_account"
publish_fees="10000uusdrise"
[rollkit]
port=7980
data_shard_count=5
parity_shard_count=5
```
`home_path`, `keyring_backend`, `publisher_account` must be entered values on your sunrised keyring. See [Local Key Pair document](/run-a-sunrise-node/types/consensus/full-consensus-node#create-or-restore-a-local-key-pair) and set with `--keyring-backend test` option. For `home_path`, enter the path where the sunrise keyring exists. ă For `sunrised_rpc`, it is preferable to run sunrised locally, but if this is not possible, use the published RPC. See our [Network Document](/run-a-sunrise-node/networks). A local key pair is still required in such cases.
The other fields can be left as is.
### Run IPFS on local
[Section titled âRun IPFS on localâ](#run-ipfs-on-local)
1. Run IPFS
```bash
wget https://dist.ipfs.tech/kubo/v0.31.0/kubo_v0.31.0_linux-amd64.tar.gz
tar -xvzf kubo_v0.31.0_linux-amd64.tar.gz
cd kubo
sudo ./install.sh
ipfs init --profile=lowpower
ipfs daemon
```
2. Check the IPFS node ID and optionally share and add a remote peer
```bash
ipfs id
```
### Start
[Section titled âStartâ](#start)
```bash
sunrise-data rollkit
```
# đ Quick Start
> Get a local Sunrise DA node, a minimal Rollkit-based sovereign rollup, and a sample dApp running in 20 minutes.
> Get a local Sunrise DA node, a minimal Rollkitâbased sovereign rollup, and a sample dApp running in **†20 minutes**.
Note
For a comprehensive guide covering all aspects of building on Sunrise, including detailed module references, and advanced integration patterns, check out the [Sunrise Builders Kit](https://cauchye.notion.site/Sunrise-Builders-Kit-1e02cd22bc1680f3bebcd4f02f2fbc18?pvs=4).
This guide will walk you through setting up a complete development environment for building on Sunrise Layer. Youâll learn how to:
* Set up a local Sunrise Data Availability (DA) node
* Create a minimal sovereign rollup using Rollkit
* Interact with the network using the Sunrise client
* Run a sample dApp that demonstrates key features
For a more comprehensive guide covering all aspects of building on Sunrise, check out the [Sunrise Builders Kit](https://cauchye.notion.site/Sunrise-Builders-Kit-1e02cd22bc1680f3bebcd4f02f2fbc18?pvs=4).
***
## Prerequisites
[Section titled âPrerequisitesâ](#prerequisites)
Before you begin, ensure you have the following tools installed:
| Tool | Version | Purpose |
| --------------------------- | -------- | ------------------------------------------------------ |
| **Go** | `>=1.22` | Build Sunrise binaries and core components |
| **Rust + Cargo** | stable | Build Rollkit demo chain and smart contracts |
| **Node.js** | `>=20` | Run JS client, scripts, and web applications |
| **Docker + Docker Compose** | latest | Run containerized services and development stack |
| (Optional) **direnv** | any | Automatically load environment variables in your shell |
```bash
# macOS (brew) example
brew install go rustup node docker direnv
rustup default stable
```
## 1. Clone the repositories
[Section titled â1. Clone the repositoriesâ](#1-clone-the-repositories)
Weâll create a development playground with three main components:
```bash
mkdir sunrise-playground && cd $_
git clone https://github.com/sunriselayer/network sunrise-da
git clone https://github.com/rollkit/rollkit rollkit
git clone https://github.com/sunriselayer/examples examples
```
* `sunrise-da`: The core Sunrise network implementation
* `rollkit`: A framework for building sovereign rollups
* `examples`: Sample applications and integration examples
## 2. Spin up a local Sunrise DA node
[Section titled â2. Spin up a local Sunrise DA nodeâ](#2-spin-up-a-local-sunrise-da-node)
The Sunrise DA node is the foundation of the network, providing data availability services for rollups:
```bash
cd sunrise-da
make install # builds 'sunrised'
sunrised init dev --chain-id goldberg-local
sunrised start
```
Tip
Want it in Docker instead?
```bash
docker compose -f docker/local-da.yml up --build
```
### Ports
[Section titled âPortsâ](#ports)
| Service | Port | Purpose |
| -------------- | ----- | ------------------------------------------------- |
| Tendermint RPC | 26657 | Main RPC endpoint for transactions and queries |
| gRPC | 9090 | Protocol buffer interface for advanced operations |
## 3. Fund an account (faucet)
[Section titled â3. Fund an account (faucet)â](#3-fund-an-account-faucet)
Create and fund a test account to interact with the network:
```bash
sunrised keys add alice --keyring-backend test
sunrised tx bank mint $(sunrised keys show alice -a) 1000000000urise \
--from alice --keyring-backend test --yes
```
This creates a new account named âaliceâ and mints 1 billion micro-RISE tokens (`urise`) for testing.
## 4. Launch a minimal Rollkit sovereign rollup
[Section titled â4. Launch a minimal Rollkit sovereign rollupâ](#4-launch-a-minimal-rollkit-sovereign-rollup)
Rollkit is a framework for building sovereign rollups that can use Sunrise for data availability:
```bash
cd ../rollkit
make demo # builds demo binary 'demo-rollup'
# Configure Rollkit to store blobs on Sunrise DA
cat < rollup.config.toml
[da]
rpc_address = "http://localhost:26657"
fee_denom = "uusdrise"
gas_price = "0.025"
[rollup]
chain_id = "demo-rollup-1"
EOF
./demo-rollup start --config rollup.config.toml
```
The rollup automatically publishes its block data to Sunrise and retrieves DA proofs.
## 5. Post and verify a blob with @sunriselayer/client
[Section titled â5. Post and verify a blob with @sunriselayer/clientâ](#5-post-and-verify-a-blob-with-sunriselayerclient)
The Sunrise client is a JavaScript/TypeScript library for interacting with the Sunrise network. Hereâs how to use it:
```bash
# inside the root playground directory
npm create vite@latest js-client-demo -- --template vanilla
cd js-client-demo && npm i @sunriselayer/client
cat <<'JS' > src/index.js
import { SunriseClient } from "@sunriselayer/client";
const rpc = "http://localhost:26657";
const main = async () => {
const client = await SunriseClient.connect(rpc);
const { transactionHash } = await client.da.submitBlob(
"Hello Sunrise!",
{ gasLimit: 200_000, feeDenom: "uusdrise", gasPrice: "0.025" }
);
console.log("Blob tx:", transactionHash);
const proof = await client.da.getBlobProof(transactionHash);
console.log("Inclusion proof:", proof);
};
main();
JS
node src/index.js
```
This example demonstrates:
* Connecting to a Sunrise node
* Submitting a data blob
* Retrieving a Merkle proof of inclusion
## 6. Run the sample dApp (token swap)
[Section titled â6. Run the sample dApp (token swap)â](#6-run-the-sample-dapp-token-swap)
The example dApp demonstrates a token swap using Sunriseâs liquidity pool module:
```bash
cd ../../examples/swap-demo
npm i
npm run dev # opens http://localhost:5173
```
The demo UI:
* connects to @sunriselayer/client
* swaps testâtokens via the rollupâs x/swap module
* shows live balances pulled from Sunrise DA
## 7. Next steps
[Section titled â7. Next stepsâ](#7-next-steps)
| What | Where | Description |
| -------------------------------- | ---------------------------------------------- | --------------------------------------------------- |
| Full client reference | [Client Documentation](/build/client) | Complete API documentation for @sunriselayer/client |
| Build a production Rollkit chain | [Rollkit Guide](/build/l2-blockchains/rollkit) | Guide to deploying a production rollup |
| Validators & DA proofs | [Validators Guide](/build/validators) | Learn about validator setup and DA proof generation |
| Conceptual deep dives | [Learn Section](/learn/sunrise) | Understanding Sunriseâs core concepts |
## Troubleshooting
[Section titled âTroubleshootingâ](#troubleshooting)
| Symptom | Fix | Explanation |
| -------------------------- | ---------------------------------------------------- | ---------------------------------------------------- |
| ECONNREFUSED on port 26657 | sunrised start not running or wrong RPC URL | Ensure the Sunrise node is running and accessible |
| Rollkit cannot post blobs | Check \~/.sunrise/config/app.toml for min-gas-prices | Verify gas price settings match network requirements |
| Blob tx stuck in mempool | Low gas price â use âgas-prices 0.025urise | Increase gas price to ensure transaction processing |
## Clean up
[Section titled âClean upâ](#clean-up)
```bash
pkill sunrised demo-rollup || true
docker compose -f docker/local-da.yml down -v || true
rm -rf ~/sunrise-playground
```
Happy hacking! đ
# Validators
> In addition to producing and verifying blocks, validators on Sunrise play a crucial role in the security and stability of the network. This section provides an overview of a val...
In addition to producing and verifying blocks, validators on Sunrise play a crucial role in the security and stability of the network. This section provides an overview of a validatorâs responsibilities, setup, and related operations.
## How to Become a Validator
[Section titled âHow to Become a Validatorâ](#how-to-become-a-validator)
To become a validator on Sunrise, you must stake a minimum of **1 vRISE**. vRISE is a non-transferable governance token that can only be obtained as an incentive for providing liquidity.
For detailed instructions on creating and setting up a validator, please refer to the following document:
* [How to Become a Validator](/build/validators/validator)
## Key Responsibilities and Setup
[Section titled âKey Responsibilities and Setupâ](#key-responsibilities-and-setup)
### Data Availability Verification
[Section titled âData Availability Verificationâ](#data-availability-verification)
Beyond generating blocks, Sunrise validators have the critical duty of verifying data on the Data Availability (DA) layer that has been flagged as potentially fraudulent.
To automate this verification process, a validator node must constantly run the following three daemons:
1. `sunrised` (Integration with Cosmovisor is recommended)
2. `sunrise-data validator`
3. `IPFS Daemon`
For more details on the DA verification mechanism and setup, please see here:
* [Data Availability Proof](/build/validators/data-availability-proof)
## Self-Delegating RISE
[Section titled âSelf-Delegating RISEâ](#self-delegating-rise)
Validators can delegate their own RISE (from either a regular or a locked balance) to themselves. This self-delegation can increase their block production allocation and allow them to earn more staking rewards.
The specific methods for self-delegation are detailed in the following document:
* [Self Delegation](/build/validators/self-delegation)
# Proof of Data Availability
> Sunrise's Data Availability Layer is validated by validators. Validators must validate data that may not be valid and send the proofs to chain.
Sunriseâs Data Availability Layer is validated by validators. Validators must validate data that may not be valid and send the proofs to chain.
This section describes how validators prove data.
## Proof
[Section titled âProofâ](#proof)
The only data that require proof are those that have been sent MsgSubmitInvalidity and the status has been changed to `CHALLENGING`.
The threshold for `CHALLENGING` is when MsgSubmitInvalidity is sent for 33% (the default in genesis) of the entire shards.
The validator is then validated. If more than a certain number of shards are proved, the status changes to `VERIFIED` as usual. If not, the status changes to `REJECTED`.
See [Data Availability](/learn/sunrise/data-availability) for status and proof of data in the Data Availability Layer.
## Sunrise-Data for Validator
[Section titled âSunrise-Data for Validatorâ](#sunrise-data-for-validator)
sunrise-data provides validators with the functions to monitor and prove data that has become `CHALLENGING`.
### Register proof deputy of your validator
[Section titled âRegister proof deputy of your validatorâ](#register-proof-deputy-of-your-validator)
Although validators can send tx themselves to send proof data, it is recommended to use a deputy address to prevent leakage of keys.
First, create a new account to serve as the deputy.
```bash
sunrised keys add your_deputy_account --keyring-backend=test
```
Next, send some `uusdrise` to this account using the `tx bank send` command. This will be used to pay for gas fees when submitting `SubmitValidityProof` transactions.
```bash
DEPUTY_ADDRESS=$(sunrised keys show your_deputy_account -a --keyring-backend=test)
sunrised tx bank send [your_validator_key] $DEPUTY_ADDRESS 1000000uusdrise \
--chain-id=$CHAIN_ID \
--gas-prices=0.025uusdrise --gas-adjustment 1.2 \
--gas=auto \
-y
```
Finally, register the deputy address with your validator. This transaction must be sent from your validatorâs account and only needs to be done once.
```bash
sunrised tx da register-proof-deputy $DEPUTY_ADDRESS \
--from [your_validator_key] \
--chain-id=$CHAIN_ID \
--gas-prices=0.025uusdrise --gas-adjustment 1.2 \
--gas=auto \
-y
```
Register the address of the deputy to be used on `sunrise-data`.
### How to set up
[Section titled âHow to set upâ](#how-to-set-up)
1. Running `sunrised` as a validator See [Validator Node](/run-a-sunrise-node/types/consensus/validator-node) for setting up.
2. Clone sunrise-data repo
```bash
cd ~
git clone https://github.com/sunriselayer/sunrise-data.git
cd sunrise-data
make install
```
3. Create and edit `config.toml`
```bash
cp config.default.toml config.toml
vi config.toml
```
To connect to a local IPFS daemon, leave the `ipfs_api_url` field empty
Change `home_path` to your .sunrise directory, `proof_deputy_account` to your sunrised keyâs name and `validator_address` to your validator address.
```toml
[api]
port = 8000
ipfs_api_url = ""
ipfs_address_info = ""
[chain]
address_prefix="sunrise"
home_path="/home/ubuntu/.sunrise"
keyring_backend="test"
sunrised_rpc="http://localhost:26657"
[validator]
proof_deputy_account="your_deputy_account"
validator_address="sunrisevaloper1a8jcsmla6heu99ldtazc27dna4qcd4jyv75vcz"
proof_fees="10000uusdrise"
proof_interval=5
```
### Run IPFS on local
[Section titled âRun IPFS on localâ](#run-ipfs-on-local)
1. Run IPFS
```bash
wget https://dist.ipfs.tech/kubo/v0.31.0/kubo_v0.31.0_linux-amd64.tar.gz
tar -xvzf kubo_v0.31.0_linux-amd64.tar.gz
cd kubo
sudo ./install.sh
ipfs init --profile=lowpower
ipfs daemon
```
2. Check the IPFS node ID and optionally share and add a remote peer
```bash
ipfs id
```
### Start to proof data
[Section titled âStart to proof dataâ](#start-to-proof-data)
On your sunrise-data directory,
```bash
sunrise-data validator
```
Or register as a service
```bash
vi /etc/systemd/system/sunrise-data.service
systemctl enable sunrise-data
systemctl start sunrise-data
```
```ini
[Unit]
Description = sunrise-data validator daemon
After=network-online.target
[Service]
User=ubuntu
WorkingDirectory=/home/ubuntu/sunrise-data
ExecStart = /home/ubuntu/go/bin/sunrise-data validator
Restart=on-failure
RestartSec=3
LimitNOFILE=1400000
[Install]
WantedBy = multi-user.target
```
If the setup is successful, the display will look like this
```bash
$ sunrise-data validator
{"level":"info","time":"2025-02-19T18:32:52+09:00","message":"Starting validator task"}
{"level":"info","time":"2025-02-19T18:32:52+09:00","message":"validator: sunrisevaloper1a8jcsmla6heu99ldtazc27dna4qcd4jyv75vcz deputy: sunrise155u042u8wk3al32h3vzxu989jj76k4zcc6d03n"}
{"level":"info","time":"2025-02-19T18:32:52+09:00","message":"On-chain data is checked every 5 sec"}
```
# Self-Delegating RISE
> Validators can self-delegate RISE to themselves to earn staking rewards.
Validators can self-delegate RISE to themselves to earn staking rewards.
Caution
**Note**: Unlike delegating vRISE, delegating RISE does not grant any governance voting power.
The method for delegating RISE differs depending on whether the tokens are in a regular wallet balance or a lockup account. The module and command used will be different for each case.
***
## Delegating from a Regular Balance (`x/shareclass`)
[Section titled âDelegating from a Regular Balance (x/shareclass)â](#delegating-from-a-regular-balance-xshareclass)
To delegate RISE held directly in your wallet, use the `non-voting-delegate` command from the `x/shareclass` module.
### How to Delegate
[Section titled âHow to Delegateâ](#how-to-delegate)
**Usage:**
```bash
sunrised tx shareclass non-voting-delegate [validator_address] [amount] [flags]
```
**Example:**
```bash
# Get validator address
VALIDATOR_ADDRESS=$(sunrised keys show --bech val -a)
# Execute delegation
sunrised tx shareclass non-voting-delegate $VALIDATOR_ADDRESS 10000000urise \
--from \
--chain-id \
--gas-prices=0.025uusdrise --gas-adjustment 1.2 \
--gas=auto \
-y
```
### How to Claim Rewards
[Section titled âHow to Claim Rewardsâ](#how-to-claim-rewards)
Use the `claim-rewards` command from the `x/shareclass` module to claim your accumulated staking rewards. The rewards will be sent to your wallet.
**Usage:**
```bash
sunrised tx shareclass claim-rewards [validator_address] [flags]
```
**Example:**
```bash
VALIDATOR_ADDRESS=$(sunrised keys show --bech val -a)
sunrised tx shareclass claim-rewards $VALIDATOR_ADDRESS \
--from \
--chain-id \
--gas-prices=0.025uusdrise --gas-adjustment 1.2 \
--gas=auto \
-y
```
***
## Delegating from a Lockup Account (`x/lockup`)
[Section titled âDelegating from a Lockup Account (x/lockup)â](#delegating-from-a-lockup-account-xlockup)
To delegate RISE that is part of a lockup (e.g., from an airdrop), you must use the `x/lockup` module.
### 1. Find Your Lockup Account ID
[Section titled â1. Find Your Lockup Account IDâ](#1-find-your-lockup-account-id)
First, you need to identify the ID of the lockup account you wish to delegate from. You can list all lockup accounts owned by your key using the `lockup-accounts` query.
**Usage:**
```bash
sunrised query lockup lockup-accounts [owner] [flags]
```
**Example:**
```bash
OWNER_ADDRESS=$(sunrised keys show -a)
sunrised query lockup lockup-accounts $OWNER_ADDRESS --output json
```
From the output of this command, find the correct account and note its `id`.
### 2. How to Delegate
[Section titled â2. How to Delegateâ](#2-how-to-delegate)
Once you have the lockup account ID, use the `non-voting-delegate` command from the `x/lockup` module.
**Usage:**
```bash
sunrised tx lockup non-voting-delegate [lockup_account_id] [validator_address] [amount] [flags]
```
**Example:**
```bash
LOCKUP_ID=""
VALIDATOR_ADDRESS=$(sunrised keys show --bech val -a)
sunrised tx lockup non-voting-delegate $LOCKUP_ID $VALIDATOR_ADDRESS 10000000urise \
--from \
--chain-id \
--gas-prices=0.025uusdrise --gas-adjustment 1.2 \
--gas=auto \
-y
```
### 3. How to Claim Rewards
[Section titled â3. How to Claim Rewardsâ](#3-how-to-claim-rewards)
Use the `claim-rewards` command from the `x/lockup` module.
Note
**Important**: Rewards claimed from a lockup delegation are sent back to the lockup account itself, not your main wallet. The RISE portion of the rewards will be subject to the original lockup schedule.
**Usage:**
```bash
sunrised tx lockup claim-rewards [lockup_account_id] [flags]
```
**Example:**
```bash
LOCKUP_ID=""
sunrised tx lockup claim-rewards $LOCKUP_ID \
--from \
--chain-id \
--gas-prices=0.025uusdrise --gas-adjustment 1.2 \
--gas=auto \
-y
```
***
## Using the Sunrise App
[Section titled âUsing the Sunrise Appâ](#using-the-sunrise-app)
These delegation and reward claiming operations can also be performed easily through the **Sunrise App** interface.
For more details, please refer to the following documents:
* **For regular delegation:** [Governance](/learn/sunrise-app/gov)
* **For delegating locked assets:** [Lockup](/learn/sunrise-app/lockup)
# How to Become a Validator
> This document explains the steps to become a validator on the Sunrise chain.
This document explains the steps to become a validator on the Sunrise chain.
## Prerequisites
[Section titled âPrerequisitesâ](#prerequisites)
Before operating a validator, you must set up a [Full Consensus Node](/run-a-sunrise-node/types/consensus/full-consensus-node) and be fully synchronized with the network.
## Data Availability Verification
[Section titled âData Availability Verificationâ](#data-availability-verification)
Caution
Validators on the Sunrise network are required to verify data for the Data Availability (DA) layer. This is a crucial responsibility. Please see the [Proof of the Data Availability Layer](/build/validators/data-availability-proof) guide for instructions on how to set this up.
## Setup Cosmovisor
[Section titled âSetup Cosmovisorâ](#setup-cosmovisor)
For mainnet, it is strongly recommended to use Cosmovisor to run your node. Cosmovisor allows you to perform chain upgrades smoothly with minimal downtime.
Follow the [Cosmovisor setup tutorial](/run-a-sunrise-node/types/consensus/setup-cosmovisor) for details.
It is recommended to set the following environment variable to enable automatic upgrades:
```bash
export DAEMON_ALLOW_DOWNLOAD_BINARIES=true
```
## Binary and Genesis File
[Section titled âBinary and Genesis Fileâ](#binary-and-genesis-file)
When setting up a validator, it is crucial to use the correct version of the binary and `genesis.json`.
* **Binary:** The latest binary can be downloaded from the [GitHub releases](https://github.com/sunriselayer/sunrise/releases/tag/v1.0.0).
* **Genesis File:** The `genesis.json` file is located in the [network repository](https://github.com/sunriselayer/network/tree/main/sunrise-1).
## Creating a Validator
[Section titled âCreating a Validatorâ](#creating-a-validator)
There are two ways to create a validator: joining at genesis and joining after the chain has started.
### Join as a Genesis Validator (Gentx)
[Section titled âJoin as a Genesis Validator (Gentx)â](#join-as-a-genesis-validator-gentx)
To join as a validator before the network starts (as a genesis validator), you need to generate and submit a `gentx` (genesis transaction).
For detailed instructions, please refer to the [README in the sunriselayer/network repository](https://github.com/sunriselayer/network/blob/main/sunrise-1/gentx/README.md).
### Join as a Validator After the Chain Has Started
[Section titled âJoin as a Validator After the Chain Has Startedâ](#join-as-a-validator-after-the-chain-has-started)
If the chain is already running, you can create a validator with the following method.
#### `tx staking create-validator`
[Section titled âtx staking create-validatorâ](#tx-staking-create-validator)
This is the standard Cosmos SDK method, which uses a `validator.json` file to create a validator. This method requires `vRISE` for self-delegation. This method requires `vRISE` for self-delegation.
1. **Get the Validatorâs Public Key**
Run the `sunrised tendermint show-validator` command to get the validatorâs public key (pubkey).
```bash
sunrised tendermint show-validator
```
2. **Create the `validator.json` file**
Create a `validator.json` file with the following content. Set the `pubkey` with the value obtained above.
```json
{
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"oWg2ISpLF405Jcm2vXV+2v4fnjodh6aafuIdeoW+rUw="},
"amount": "1000000uvrise",
"moniker": "myvalidator",
"identity": "optional identity signature (ex. UPort or Keybase)",
"website": "validator's (optional) website",
"security": "validator's (optional) security contact email",
"details": "validator's (optional) details",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
```
* The `amount` is specified in `uvrise`.
* The `min-self-delegation` is also the amount of `vRISE`.
3. **Send the `create-validator` transaction**
```bash
sunrised tx staking create-validator path/to/validator.json --from --chain-id --gas="auto" --gas-prices= -y
```
**Usage:**
```bash
sunrised tx staking create-validator [path/to/validator.json] [flags]
```
## Backup
[Section titled âBackupâ](#backup)
Backing up key files is crucial for validator operations. Please back up the following files to a secure location:
* `~/.sunrise/config/priv_validator_key.json`
* `~/.sunrise/config/node_key.json`
It is strongly recommended to encrypt these backup files.
# đŽ $GLU
> $GLU token is the native token of the Gluon rollup on Sunrise. It was formerly $GUU token on UnUniFi Layer 1 app chain.
$GLU token is the native token of the Gluon rollup on Sunrise. It was formerly $GUU token on UnUniFi Layer 1 app chain.
# đŠ Gluon
> Gluon is an orderâbook Layerâ2 blockchain built with [Rollkit](https://rollkit.dev/) and secured by Sunrise, a next-generation L1 combining data availability and liquidity.\
Gluon is an orderâbook Layerâ2 blockchain built with [Rollkit](https://rollkit.dev/) and secured by Sunrise, a next-generation L1 combining data availability and liquidity.\
The base layer for Interliquid Networks.\
The rollup implements Sunriseâs ProofâofâLiquidity (PoL) and leverages IBC for seamless asset movement.
***
## Key Features
[Section titled âKey Featuresâ](#key-features)
| Category | Description |
| -------------------------- | ------------------------------------------------------------------------------------------------------ |
| **Orderâbook DEX** | Deterministic matching logic, priceâtime priority, and onâchain settlement. |
| **Web2âstyle onboarding** | OAuth registration abstracts privateâkey management; user keys never leave the client device. |
| **Offâchain matching** | Highâthroughput matching engine batches trades before finalising them on chain. |
| **Doubleâsignature model** | All funding transactions require both user and operator signatures, preventing unilateral withdrawals. |
| **IBC deposits/withdraws** | Native IBC channels connect Gluon to external CosmosâSDK chains for trustâminimised transfers. |
***
## Developer Overview
[Section titled âDeveloper Overviewâ](#developer-overview)
* **Source code:**
* **Sunrise Rollkit adapter:**
* **Modules used:** `x/order`, `x/perp`, `x/customauth` (see protobuf definitions).
***
## Authentication & Key Management
[Section titled âAuthentication & Key Managementâ](#authentication--key-management)
Gluon introduces a *CustomAuth* flow that pairs a webâgenerated ECDSA key with an onâchain account:
1. **OAuth signâup** â server deterministically derives user address.
2. **Device pairing** â browser generates an AES key and an ECDSA key; the latter is AESâencrypted and stored serverâside.
3. **Verification key** is submitted on chain (pairing transaction).
### Signâup Flow
[Section titled âSignâup Flowâ](#signup-flow)
The sign-up process is intentionally simple and user-friendly:
* Users can sign up using familiar OAuth providers (Google, GitHub, etc.)
* The application automatically derives a Sunrise address for the user
* No manual wallet setup or seed phrase management required
```
sequenceDiagram
autonumber
User ->> App : OAuth signâup
App --> App : Derive Sunrise address
```
This streamlined process ensures users can start trading quickly without blockchain complexity.
### DeviceâPairing Flow
[Section titled âDeviceâPairing Flowâ](#devicepairing-flow)
The device pairing process implements several security measures:
* Generates unique encryption keys for each device
* Keeps sensitive ECDSA keys encrypted and secure
* Establishes a verification mechanism for future transactions
```
sequenceDiagram
autonumber
User ->> Browser : Initiate pairing
Browser --> Browser : Generate AES key
Browser --> Browser : Generate ECDSA key
Browser --> Browser : Encrypt ECDSA with AES
Browser ->> App : Upload encrypted key + verification key
App ->> Gluon : Tx: register verification key
```
This multi-step process ensures secure key management while maintaining user control.
### Order Creation (offâchain)
[Section titled âOrder Creation (offâchain)â](#order-creation-offchain)
The off-chain order creation process enables high-performance trading:
* Orders are signed locally using the userâs encrypted key
* Signatures are verified before being accepted
* Orders remain off-chain until batched for matching
```
sequenceDiagram
autonumber
User ->> Browser : Place order
Browser --> Browser : Decrypt ECDSA key
Browser --> Browser : Sign order payload
Browser ->> App : Order + signature
```
This approach allows for sub-second order placement while maintaining security.
### Order Cancellation (onâchain)
[Section titled âOrder Cancellation (onâchain)â](#order-cancellation-onchain)
The cancellation process ensures order integrity:
* Cancellations are recorded on-chain for transparency
* Prevents replay attacks of old signatures
* Provides immutable proof of cancellation
```
sequenceDiagram
autonumber
User ->> App : Cancel order
App ->> Gluon : Tx: register order + cancel
```
This on-chain record is crucial for maintaining order book integrity.
### Withdrawal (IBC)
[Section titled âWithdrawal (IBC)â](#withdrawal-ibc)
The withdrawal process implements multiple security layers:
* Requires dual signatures from both user and operator
* Implements a 24-hour security delay for new key pairs
* Uses IBC for trust-minimized cross-chain transfers
```
sequenceDiagram
autonumber
User ->> Browser : Withdraw request
Browser --> Browser : Decrypt ECDSA key & sign tx
Browser ->> App : Signed withdrawal
App --> App : Operator signs tx
App ->> Gluon : Tx with dual signatures
Gluon --> Gluon : Verify signatures & 24âŻh keyâpairing delay
Gluon ->> ChainX : IBC transfer
```
This multi-layered approach ensures secure and reliable asset transfers across chains.
> No external wallets (e.g., MetaMask) are required; keys remain clientâside and are revocable onâchain.
## Trading Lifecycle
[Section titled âTrading Lifecycleâ](#trading-lifecycle)
### Order Creation (offâchain)
[Section titled âOrder Creation (offâchain)â](#order-creation-offchain-1)
Orders reside offâchain until batched in the first matching transaction, enabling subâsecond UX.
```
sequenceDiagram
autonumber
User ->> Browser : Place order
Browser --> Browser : Decrypt ECDSA key
Browser --> Browser : Sign order payload
Browser ->> App : Order + signature
```
### Order Cancellation (onâchain)
[Section titled âOrder Cancellation (onâchain)â](#order-cancellation-onchain-1)
An onâchain record prevents operators from replaying stale user signatures.
```
sequenceDiagram
autonumber
User ->> App : Cancel order
App ->> Gluon : Tx: register order + cancel
```
### Withdrawal (IBC)
[Section titled âWithdrawal (IBC)â](#withdrawal-ibc-1)
A 24âhour latency between keyâpairing and fund movements mitigates operatorâkey compromise.
```
sequenceDiagram
autonumber
User ->> Browser : Withdraw request
Browser --> Browser : Decrypt ECDSA key & sign tx
Browser ->> App : Signed withdrawal
App --> App : Operator signs tx
App ->> Gluon : Tx with dual signatures
Gluon --> Gluon : Verify signatures & 24âŻh keyâpairing delay
Gluon ->> ChainX : IBC transfer
```
## Order Module (protobuf)
[Section titled âOrder Module (protobuf)â](#order-module-protobuf)
The order subsystem is defined in `gluon/order/*`. Core types:
The `BaseOrder` message defines the fundamental structure for all orders in the system:
* Each order is associated with a specific user address and trading pair
* Orders can be either limit orders (with a specified price) or market orders
* The expiry timestamp prevents replay attacks and ensures order freshness
* Amount and price are stored as strings to handle arbitrary precision
```go
message BaseOrder {
string address = 1; // bech32 user address
string denom_base = 2; // e.g., "uatom"
string denom_quote = 3; // e.g., "uusdc"
OrderDirection direction = 4; // BUY / SELL
string amount = 5; // base amount
string limit_price = 6; // optional
google.protobuf.Timestamp expiry = 7; // antiâreplay
}
enum OrderDirection {
ORDER_DIRECTION_UNSPECIFIED = 0;
ORDER_DIRECTION_BUY = 1;
ORDER_DIRECTION_SELL = 2;
}
```
The `OrderDirection` enum provides a type-safe way to specify order sides:
* Uses standard protobuf enum conventions with an UNSPECIFIED default
* Clearly distinguishes between buy and sell orders
* Helps prevent order-side related bugs through compile-time checking
# đŽ RISE
> RISE token is the native token of Sunrise network. Fees are paid in USDrise. A part of the USDrise tx fee will be swapped to RISE and then burnt in the [Fee](/learn/sunrise/fee)...
RISE token is the native token of Sunrise network. Fees are paid in USDrise. A part of the USDrise tx fee will be swapped to RISE and then burnt in the [Fee](/learn/sunrise/fee) module.
RISE is preserved as `urise` in the Sunrise blockchain. `1000000urise` on the Sunrise network converts to 1 RISE in the real world.
* Ticker: $SUNRISE
* Denomination on blockchain: `urise`
RISE can be minted by burning vRISE 1 to 1.
## vRISE
[Section titled âvRISEâ](#vrise)
vRISE token is a non-transferable token for staking. The staked amount will be calculated as a voting power for the governance.
* Denomination on blockchain: `uvrise`
vRISE can be staked to the Sunrise network. The staked amount will be calculated as voting power for governance. Furthermore, the rewards for stakers will be distributed in proportion to the staked amount.
To get vRISE, users need to provide liquidity in [Liquidity Pool](/learn/sunrise/liquidity-pool).
## Usage of Tokens
[Section titled âUsage of Tokensâ](#usage-of-tokens)
| Function | Token(s) | Details |
| ------------------ | ------------------------------------------------------------------ | ------------------------------------------------------ |
| Security |  RISE +  vRISE | Both vRISE & RISE can be staked for Consensus |
| Governance |  vRISE | vRISE is used for On-chain governance and Gauge Voting |
| Security Emissions |  RISE | RISE is distributed for stakers as consensus rewards |
| LP Emissions |  vRISE | vRISE is distributed for LPs as incentives |
| Fee | Any (swapped to  USDrise) | USDrise is used as a transaction fee |
**Legend:**\
 = RISE  = vRISE  = USDrise
## Tokenomics
[Section titled âTokenomicsâ](#tokenomics)
### Summary
[Section titled âSummaryâ](#summary)
* `[Supply] = [Supply of RISE] + [Supply of vRISE]`
* Supply cap is 1,000,000,000.
* It means `[Supply of RISE] + [Supply of vRISE] <= 1,000,000,000`
* Initial Inflation Rate Cap is 10%.
* Inflation Rate Cap will gradually diminish by 8% per year.
* For example, Inflation Rate of 2nd year is 9.2%.
* A part of tx fees (paid in USDrise) is swapped to RISE and burnt.
* Supply will grow with following the Supply Cap and Inflation Rate Cap.
* Observed Inflation Rate is different from Inflation Rate Cap.
* Inflationally minted vRISE will be distributed among stakers validators and delegators for rewards.
### Formal expression
[Section titled âFormal expressionâ](#formal-expression)
* Year: tâ{0, 1, 2, âŠ}
* Supply of RISE: stRISEâ
* Supply of vRISE: stvRISEâ
* Supply: stâ=stRISEâ+stvRISEâ
* Initial Supply: s0â=500,000,000
* Initial Inflation Rate Cap: ÏË\_0=0.1=10%
* Disinflation rate: ÎŽ=0.08=8%
* Supply Cap: sË=1,000,000,000
* It must be satisfied: stââ€sË
* Inflation Rate Cap: ÏË\_t
* Tx fee burnt RISE: btâ
* Supply transition: s\_t+1=min{(1+ÏË\_t)(stââbtâ), sË}
* Inflation Rate Cap transition: ÏË\_t+1=max{(1âÎŽ)ÏËtâ, 0.02}
* It means: mintâÏË\_t=0.02=2%
* Observed Inflation Rate: Ïât=stâsât+1âstââ
#### Simulation
[Section titled âSimulationâ](#simulation)
This simulation assumes that btâ=0
which means that tx fee is not burnt.
* During year 0 to 10, actual Inflation Rate will be lower than this simulation because there must be burnt tx fees.
* Zero Observed Inflation Rate doesnât mean zero rewards for validators and stakers. If btâ>0 , then b\_t amount of vRISE will be minted for rewards
* Inflation Rate Cap is strictly complied, so there is also a possibility of Observed Inflation Rate being negative value.
| Year | Inflation Rate Cap | Total Supply | Observed Inflation Rate |
| ---- | -----------------: | ------------: | ----------------------: |
| 0 | 10.00% | 500,000,000 | 10.00% |
| 1 | 9.20% | 550,000,000 | 9.20% |
| 2 | 8.46% | 600,600,000 | 8.46% |
| 3 | 7.79% | 651,434,784 | 7.79% |
| 4 | 7.16% | 702,161,229 | 7.16% |
| 5 | 6.59% | 752,463,565 | 6.59% |
| 6 | 6.06% | 802,057,048 | 6.06% |
| 7 | 5.58% | 850,690,179 | 5.58% |
| 8 | 5.13% | 898,145,641 | 5.13% |
| 9 | 4.72% | 944,240,170 | 4.72% |
| 10 | 4.34% | 988,823,543 | 1.13% |
| 11 | 4.00% | 1,000,000,000 | 0.00% |
| 12 | 3.68% | 1,000,000,000 | 0.00% |
| 13 | 3.38% | 1,000,000,000 | 0.00% |
| 14 | 3.11% | 1,000,000,000 | 0.00% |
| 15 | 2.86% | 1,000,000,000 | 0.00% |
| 16 | 2.63% | 1,000,000,000 | 0.00% |
| 17 | 2.42% | 1,000,000,000 | 0.00% |
| 18 | 2.23% | 1,000,000,000 | 0.00% |
| 19 | 2.05% | 1,000,000,000 | 0.00% |
| 20 | 2.00% | 1,000,000,000 | 0.00% |
| 21 | 2.00% | 1,000,000,000 | 0.00% |
## Supported wallet applications
[Section titled âSupported wallet applicationsâ](#supported-wallet-applications)
### Wallets that support Cosmos blockchains
[Section titled âWallets that support Cosmos blockchainsâ](#wallets-that-support-cosmos-blockchains)
* Keplr
* Leap
### Command Line Interface (CLI)
[Section titled âCommand Line Interface (CLI)â](#command-line-interface-cli)
* sunrised
## Listed exchanges
[Section titled âListed exchangesâ](#listed-exchanges)
* Coming soon
# Allocations
> Some parts will be converted to RISE in the genesis.
| SEGMENT | TOTAL SUPPLY IN % | RELEASE SCHEDULE |
| ------------------------------------------------ | ----------------- | -------------------------------------------------------------------------------------- |
| Community Airdrop (Kaito not included) | 6.8% | 25% unlocked at TGE, 75% fully locked for 6 months and unlocked linearly for 24 months |
| Community Contributors & Grants (Kaito included) | 30% | Fully locked for 3 months after TGE, unlocked linearly for 24 months |
| Community Round | 1.5% | 100% unlocked at TGE |
| Ecosystem | 27.2% | 25% unlocked at TGE, 75% unlocked linearly for 18 months |
| Early backers | 14.5% | 5% unlocked at TGE, 95% fully locked for 3 months and unlocked linearly for 12 months |
| Initial Core Contributors | 20% | Fully locked for 6 months and unlocked linearly for 18 months |
Some parts will be converted to RISE in the genesis.
# đ Sunrise
> đ Sunrise
# đ
App
> Sunrise is a decentralized application (dApp) that provides a comprehensive suite of tools for interacting with the Sunrise blockchain and its ecosystem. This guide provides an ...
Sunrise is a decentralized application (dApp) that provides a comprehensive suite of tools for interacting with the Sunrise blockchain and its ecosystem. This guide provides an overview of the key concepts and features to get you started.
## The Sunrise Token Trio: RISE, vRISE, and USDrise
[Section titled âThe Sunrise Token Trio: RISE, vRISE, and USDriseâ](#the-sunrise-token-trio-rise-vrise-and-usdrise)
The Sunrise ecosystem is powered by three distinct tokens, each with a specific purpose.
*  **RISE**: The primary value-accrual and consensus token of the network. It can be staked to help secure the network and earn rewards.
*  **vRISE**: The non-transferable governance and utility token. **vRISE is essential for participating in the protocolâs governance.**
* **How to Earn vRISE**: You can only earn vRISE by providing liquidity in the [**Liquidity Pool**](/learn/sunrise-app/liquidity-pool).
* **How to Use vRISE**: Stake your vRISE to gain voting power for [**Governance**](/learn/sunrise-app/gov) proposals and to direct liquidity pool incentives through Gauge Voting.
*  **USDrise**: The native stablecoin of the protocol. It is used as the base currency for all transaction fees.
## Core Features
[Section titled âCore Featuresâ](#core-features)
Hereâs a quick overview of the primary sections of the app. Each feature has its own detailed documentation page.
* [**Liquidity Pool**](/learn/sunrise-app/liquidity-pool)
* Provide liquidity to various token pairs to earn trading fees and **vRISE rewards**. Managing your liquidity positions is the key to earning vRISE.
* [**Swap**](/learn/sunrise-app/swap)
* Exchange tokens seamlessly across different blockchains.
* [**Governance**](/learn/sunrise-app/gov)
* Use your staked **vRISE** to vote on governance proposals and liquidity pool incentives. You can also stake RISE to earn consensus rewards.
* [**Lockup**](/learn/sunrise-app/lockup)
* Manage your locked tokens received from airdrops or other programs. You can stake these locked tokens to earn rewards while they vest.
* [**Point Program**](/learn/sunrise-app/point-program)
* Earn points by participating in various activities within the ecosystem, such as staking, providing liquidity, and referring new users.
## Understanding Fees on Sunrise
[Section titled âUnderstanding Fees on Sunriseâ](#understanding-fees-on-sunrise)
The Sunrise Chain uses a Fee Abstraction mechanism, making transactions smooth for users.
* **USDrise is the Core Fee Token**: All transaction fees on the network are calculated and paid in USDrise.
* **Pay with (Almost) Any Token**: Thanks to Fee Abstraction, you can select another token you hold to pay for fees. The protocol automatically handles the swap to USDrise on-chain as part of the transaction.
For a more detailed explanation of how fees work and how to configure your preferred fee token, please see the [**Fee Documentation**](/learn/sunrise-app/fee).
## Connecting Your Wallet
[Section titled âConnecting Your Walletâ](#connecting-your-wallet)
To get started, youâll need to connect a Cosmos wallet. Sunrise currently supports the following wallets:
* Keplr
* Leap
### How to Connect
[Section titled âHow to Connectâ](#how-to-connect)
1. Click the **âConnect Walletâ** button, usually found in the header.
2. A list of supported wallets (Keplr or Leap) will be displayed.
3. Select the wallet you want to use and approve the connection request within the wallet extension.
Once connected, your address will appear in the header, and you can click it to copy the address or disconnect.
## Settings
[Section titled âSettingsâ](#settings)
You can customize your app experience through the **Settings** menu, accessible via the gear icon in the header.
* **Theme**: Choose between System, Light, or Dark mode to suit your preference.
* **Fee Token**: Select which token you prefer to use for paying transaction fees.
* **Assets Visibility**: Manage which tokens from external blockchains are visible throughout the app.
* **Node Selection**: Advanced users can select specific RPC nodes to connect to for network interactions.
# Fee
> The Sunrise Chain utilizes a Fee Abstraction mechanism for paying transaction fees.
The Sunrise Chain utilizes a **Fee Abstraction** mechanism for paying transaction fees.
## Base Currency for Transaction Fees
[Section titled âBase Currency for Transaction Feesâ](#base-currency-for-transaction-fees)
The base currency for transaction fees on the Sunrise Chain is  **USDrise** . All transaction fees are internally calculated and processed in USDrise.
For more details on USDrise, please refer to this document:
* [What is USDrise?](/learn/usdrise)
## Fee Abstraction
[Section titled âFee Abstractionâ](#fee-abstraction)
Fee Abstraction is a feature that allows users to pay transaction fees with tokens other than USDrise. This feature enables users to use the tokens they hold directly for fees.
Even when a token other than USDrise is set as the fee token using this feature, the fee displayed in your wallet (e.g., Keplr) will still be denominated in USDrise. When the transaction is executed, the selected token is automatically swapped to USDrise at the current swap rate to pay the fee.
### Available Tokens for Fees
[Section titled âAvailable Tokens for Feesâ](#available-tokens-for-fees)
Only tokens that have a liquidity pair with USDrise in a liquidity pool can be set as a fee token through Fee Abstraction.
***
## How to Configure the Fee Token
[Section titled âHow to Configure the Fee Tokenâ](#how-to-configure-the-fee-token)
You can change the token used for transaction fees from the applicationâs settings screen.
1. **Open Settings**: Click the gear icon in the application header to open the settings menu.
2. **Fee Token Section**: In the settings menu, you will find a âFee Tokenâ section.
3. **Select a Token**: Choose your desired fee token from the dropdown menu. Only tokens that are swappable with USDrise will be displayed.
After selection, future transactions will use the specified token for fees.
***
## USDrise Converter Guide
[Section titled âUSDrise Converter Guideâ](#usdrise-converter-guide)
The USDrise Converter is a utility that allows eligible users to convert a fixed amount of RISE into USDrise. This is intended as a one-time opportunity for early participants in the ecosystem.
### Eligibility
[Section titled âEligibilityâ](#eligibility)
To use the USDrise Converter, your wallet address must be included in the official whitelist. This list is comprised of accounts from the `genesis.json` file, which includes participants from events like the Airdrop and Public Sale.
If your connected wallet address is on the whitelist, the âUSDrise Converterâ button will automatically appear in the applicationâs header. If the button is not visible, your address is not eligible.
### How to Use
[Section titled âHow to Useâ](#how-to-use)
1. **Connect Your Wallet**: Start by connecting the wallet that holds your whitelisted address.
2. **Find the Converter Button**: If eligible, you will see a âUSDrise Converterâ button in the header menu.
3. **Open the Converter**: Click the button to open the conversion dialog.
4. **Review and Confirm**: The dialog will display the fixed conversion rate:
* **You Send**:  0.625 RISE
* **You Receive**:  0.05 USDrise
5. **Submit the Request**: Click the âSend Requestâ button to proceed. The transaction will be processed, and you will receive USDrise in your wallet.
### Important Notes
[Section titled âImportant Notesâ](#important-notes)
* **Fixed Rate**: The conversion amounts are fixed and cannot be changed.
* **One-Time Action**: Each whitelisted address can only use the converter once.
* **TGE Price**: Please be aware that this conversion rate may be lower than the TGE (Token Generation Event) price of RISE.
# Governance
> Sunrise's governance system allows you to contribute to the network's security and participate in shaping the protocol's future by staking (delegating) your vRISE or RISE tokens.
Sunriseâs governance system allows you to contribute to the networkâs security and participate in shaping the protocolâs future by staking (delegating) your vRISE or RISE tokens.
There are two main aspects to governance:
* **Governance Proposals**: Chain-wide decisions such as protocol upgrades, parameter changes, and use of community pool funds.
* **Gauge Voting**: Voting to determine the allocation of incentives (vRISE emissions) to liquidity pools.
Note
**Important**: To get voting power in both Governance Proposals and Gauge Voting, you must stake **vRISE**. Staking RISE does not grant voting power, but you will still earn staking rewards.
## Staking (Delegation)
[Section titled âStaking (Delegation)â](#staking-delegation)
You can earn staking rewards by delegating your tokens to a validator. The characteristics of delegating differ between vRISE and RISE.
| Feature | ă vRISE |  RISE |
| ------------------- | ---------------------------------- | ------------------------------ |
| **Voting Power** | Yes (Proposals & Gauges) | No |
| **Staking Rewards** | Yes (Auto-compounding) | Yes (Manual claim) |
| **Transferability** | No | Yes |
| **Redelegation** | Yes | No |
### How to Stake
[Section titled âHow to Stakeâ](#how-to-stake)
1. Click the âStakeâ button on the Governance page or navigate to the âDelegateâ page.
2. Select the âvRISEâ or âRISEâ tab.
3. Choose a validator to delegate to from the list.
4. Enter the amount of tokens you want to delegate and approve the transaction.
Caution
To stake locked RISE, you must do so from the [**Lockup**](/learn/sunrise-app/lockup) page, not this one. Please refer to the âLockupâ documentation for details.
### Managing Your Delegations
[Section titled âManaging Your Delegationsâ](#managing-your-delegations)
On the âDelegationsâ page, you can manage your current delegated positions.
* **vRISE**:
* **Rewards**: Rewards are automatically compounded into your staked position, so no manual claim is necessary.
* **Redelegate**: Instantly switch your delegation to another validator without unstaking.
* **Undelegate**: Unstake your delegation. There is an unbonding period before the tokens become available.
* **RISE**:
* **Claim Rewards**: Manually claim your accrued staking rewards, which will be sent to your wallet.
* **Undelegate**: Unstake your delegation. Like vRISE, an unbonding period applies.
You can check the status of your unbonding delegations on the âPending Unstakeâ page within the âDelegationsâ section.
## Governance Proposals
[Section titled âGovernance Proposalsâ](#governance-proposals)
Important protocol decisions, such as chain parameter changes or the use of community funds, are made through governance proposals.
### Viewing and Voting on Proposals
[Section titled âViewing and Voting on Proposalsâ](#viewing-and-voting-on-proposals)
1. On the âProposalsâ page, you can see a list of current and past proposals.
2. Click on a proposal to view its details, current voting status (percentage of Yes, No, Abstain votes), and the voting period.
3. If a proposal is in its voting period, you can cast your vote using your voting power (based on your staked vRISE amount). The voting options are:
* **Yes**
* **No**
* **Abstain**
* **No With Veto**: A strong âNoâ vote that can override a proposal and burn the deposit.
## Gauge Voting
[Section titled âGauge Votingâ](#gauge-voting)
Gauge Voting is the mechanism for deciding how vRISE incentives are allocated to the various liquidity pools in the next epoch.
### How Gauge Voting Works
[Section titled âHow Gauge Voting Worksâ](#how-gauge-voting-works)
* **Voting Power**: Your voting power is determined by the amount of vRISE you have staked.
* **Voting**: On the âYour Voteâ page in the âGauge Votingâ section, you can allocate your voting power to different liquidity pools by percentage. The total must add up to 100%.
* **Epochs**: Voting occurs in periods called epochs. When a new epoch begins, the vRISE reward distribution rate for each pool is determined based on the voting results.
### Bribes
[Section titled âBribesâ](#bribes)
Bribes are incentives offered to encourage users to vote for a specific pool.
* **Offering a Bribe**: Users can offer a bribe (e.g., in RISE) for a specific pool to attract votes. This can be done from the âRegister Bribeâ page in the âBribesâ section.
* **Earning Bribes**: Users who vote for a pool with bribes will earn a share of those bribes, proportional to their voting power cast on that pool. Bribes can be claimed from the âClaimableâ page in the âBribesâ section.
# Liquidity Pool
> Sunrise's Liquidity Pools (LPs) are a core feature of the decentralized exchange (DEX), allowing users to deposit tokens to provide liquidity and earn rewards such as trading fe...
Sunriseâs Liquidity Pools (LPs) are a core feature of the decentralized exchange (DEX), allowing users to deposit tokens to provide liquidity and earn rewards such as trading fees and vRISE tokens in return.
## Pool List
[Section titled âPool Listâ](#pool-list)
On the Liquidity Pool page, you can see a list of all available pools.
Each pool displays the following information:
* **Pair**: The pair of tokens that make up the pool.
* **ID**: The identification number of the pool.
* **TVL**: Total Value Locked in the pool.
* **Fees (24h)**: Trading fees generated in the last 24 hours.
* **Volume (24h)**: Trading volume in the last 24 hours.
* **vRISE Reward Allocation**: The amount of vRISE rewards allocated to this pool.
* **APR (Fees + vRISE)**: The Annual Percentage Rate, combining fees and vRISE rewards.
From the âView Your Positionsâ button at the top of the page, you can check all the liquidity positions you are providing.
## Pool Details
[Section titled âPool Detailsâ](#pool-details)
Selecting a specific pool from the list will take you to its details page.
* **Rewards For Liquidity Providers**: Details on the rewards that liquidity providers can earn in this pool.
* **Fee Rate**: The trading fee rate for swaps in the pool.
* **vRISE Reward APR**: The APR from vRISE token rewards. This value fluctuates based on gauge votes.
* **Price Chart**: A chart showing the price fluctuations of the token pair.
* **Statistics**: Statistical information such as TVL, 24h volume, 24h fees, and average APR.
* **Your Liquidity**: A list of your liquidity positions in this pool.
## Managing Liquidity
[Section titled âManaging Liquidityâ](#managing-liquidity)
### Adding Liquidity
[Section titled âAdding Liquidityâ](#adding-liquidity)
You can add liquidity by clicking the âAdd Liquidityâ button on the pool details page or your positions page.
#### 1. Set Price Range
[Section titled â1. Set Price Rangeâ](#1-set-price-range)
Select the price range for which you want to provide liquidity.
* **Full Range**: Sets the price range from zero to infinity. This allows you to provide liquidity continuously regardless of price fluctuations, but it is less capital-efficient.
* **Custom**: Set a specific price range. Liquidity will only be provided and earn fees when the price is within your set range. This is more capital-efficient, but you will not earn fees if the price goes out of range.
* You can use the `log±X%` buttons to quickly set a range based on a percentage from the current price, or manually adjust the range with the slider.
#### 2. Enter Token Amounts
[Section titled â2. Enter Token Amountsâ](#2-enter-token-amounts)
Enter the amount of tokens you want to provide. When you enter the amount for one token, the amount for the other token will be automatically calculated based on the selected price range.
Note
If your set price range is entirely above or below the current price, the amount for one of the tokens will be fixed at 0.
### Viewing Your Positions
[Section titled âViewing Your Positionsâ](#viewing-your-positions)
You can view your liquidity positions on the âView Your Positionsâ page or at the bottom of each poolâs detail page.
Selecting a position will show the following details:
* **Position Status**: Indicates whether the current price is `IN RANGE` or `OUT OF RANGE` of your set prices.
* **Price Range**: The price range you have set for providing liquidity.
* **Claimable Rewards**: The unclaimed trading fees generated by your position.
* **Assets in Position**: The amount of assets currently in your position.
### Increasing Liquidity
[Section titled âIncreasing Liquidityâ](#increasing-liquidity)
You can add more liquidity to an existing position by selecting âIncrease Liquidityâ on the position details page.
Caution
**Important**: When you increase liquidity, your existing position is liquidated and a new one is created. In this process, any unclaimed rewards are automatically sent to your wallet.
### Decreasing Liquidity
[Section titled âDecreasing Liquidityâ](#decreasing-liquidity)
You can withdraw some or all of your liquidity from a position by selecting âDecrease Liquidityâ on the position details page. You can choose the percentage to withdraw (25%, 50%, 75%, 100%) using the slider or buttons.
### Claiming Rewards
[Section titled âClaiming Rewardsâ](#claiming-rewards)
You can claim your accumulated trading fees from the âClaimâ button on the position details or pool details page. If you have multiple positions, you can also claim all rewards at once.
# Lockup
> The Lockup feature is for managing tokens that have been distributed through airdrops or other incentive programs and are locked for a specific period. These tokens are progress...
The Lockup feature is for managing tokens that have been distributed through airdrops or other incentive programs and are locked for a specific period. These tokens are progressively unlocked over the set duration.
## Lockup Overview
[Section titled âLockup Overviewâ](#lockup-overview)
On the main âLockupâ page, you can see a list of all your lockup accounts. Each account displays details of the locked assets and the lockup period.
Clicking on an item in the list will take you to the details page for that lockup account.
## Lockup Account Details
[Section titled âLockup Account Detailsâ](#lockup-account-details)
The details page provides a comprehensive view of the current state of your locked assets.
* **Original/Additional Locking**: The original and any additional amounts of the lockup.
* **Lockup Start/End**: The date and time when the lockup started and when it will fully end.
* **Currently Locked/Unlocked**: A breakdown of currently locked and unlocked assets.
* **Delegated (Locked/Unlocked)**: A breakdown of the assets being staked, showing both locked and unlocked portions.
From this page, you can perform three main actions related to your lockup account.
### 1. Staking Locked Assets (Delegate)
[Section titled â1. Staking Locked Assets (Delegate)â](#1-staking-locked-assets-delegate)
You can delegate your locked RISE to a validator to earn staking rewards.
Danger
**Important**: While you can earn staking rewards from delegating via a lockup account, this **does not grant you voting power** in Governance Proposals or Gauge Voting.
* **How to operate**: Select âDelegateâ on the lockup details page, choose a validator and amount, and delegate your assets.
### 2. Managing Delegations
[Section titled â2. Managing Delegationsâ](#2-managing-delegations)
Check the status of and manage your currently delegated assets.
* **Claim Rewards**: Manually claim the accrued staking rewards and return them to your lockup account.
* **Undelegate**: Unstake your assets.
* Undelegated tokens do not become available immediately; they enter an **unbonding period** (a waiting period).
* You can check the status of your unbonding assets on the âPending Unstakeâ page.
### 3. Withdrawing Unlocked Assets
[Section titled â3. Withdrawing Unlocked Assetsâ](#3-withdrawing-unlocked-assets)
You can withdraw assets that have completed their lockup period and are not delegated to your main wallet.
* **Withdrawal Conditions**: You can only withdraw assets that are both **unlocked** and **not delegated**.
* **To withdraw delegated assets**: You must first undelegate them and wait for the unbonding period to end. After the period is over, the assets will become available for withdrawal.
* **How to operate**: Select âWithdrawâ on the lockup details page and enter the amount of unlocked assets you wish to withdraw.
# Point Program
> A sustainable, multi-layered point system rewarding long-term alignment with the Sunrise ecosystem.
A sustainable, multi-layered point system rewarding long-term alignment with the Sunrise ecosystem.
## Program Overview
[Section titled âProgram Overviewâ](#program-overview)
Sunrise Point Program rewards users across multiple dimensions:
### Daily Activities
[Section titled âDaily Activitiesâ](#daily-activities)
* Staking vRISE
* Providing Liquidity (LP)
### Ongoing (Up to specific time)
[Section titled âOngoing (Up to specific time)â](#ongoing-up-to-specific-time)
* Referring new users
### One-time Actions
[Section titled âOne-time Actionsâ](#one-time-actions)
* Connecting EVM wallet
* Connecting X (Twitter)
***
## Daily:  vRISE Staking
[Section titled âDaily: vRISE Stakingâ](#daily--vrise-staking)
Claim your staking points once every 24 hours. Points are calculated based on your current staking amount.
Note
Acquiring vRISE requires providing liquidity.
**Formula: `1 vRISE = 100 points / day`**
Note
Only delegations to `Bonded` validators are eligible. If the validator you are delegating to becomes unbonded, you can redelegate to another `Bonded` validator to continue earning points.
The dashboard shows:
* Your available points to claim
* Your current staked amount
* Your staking distribution across validators
* The remaining cooldown timer
## Daily: Liquidity Provision (LP)
[Section titled âDaily: Liquidity Provision (LP)â](#daily-liquidity-provision-lp)
Claim your LP points once every 24 hours. Points are based on your active LP positions.
Note
Creating a position with RISE will be possible after the RISE token is launched through the Token Generation Event (TGE).
Note
An LP position is considered `valid` when the current price is within the price range you set for the position. Invalid positions do not earn points.
### Point Calculation
[Section titled âPoint Calculationâ](#point-calculation)
Points are calculated based on the USD value of your liquidity.
* **USDrise / USDN LP**: `1 USD equivalent = 120 points`
* **Other LP**: `1 USD equivalent = 100 points`
The dashboard shows:
* Your claimable LP points
* Your active LP balance
* Your valid vs. invalid positions
* The remaining cooldown timer
***
## Referral Program
[Section titled âReferral Programâ](#referral-program)
### How It Works
[Section titled âHow It Worksâ](#how-it-works)
* Share your unique referral link to earn additional points.
* You earn **10% of your refereeâs points** each time they make a successful claim.
* Referral bonuses are calculated and awarded independently for each referee.
### Referral Cap
[Section titled âReferral Capâ](#referral-cap)
Note
There is a limit to the number of users you can invite. No points can be earned from users invited beyond this limit. The cap is updated at regular intervals.
***
## NFT Holder Boost
[Section titled âNFT Holder Boostâ](#nft-holder-boost)
Caution
This feature is planned for a future update and is not yet active.
Holding a specific NFT provides a boost to your earnings.
### With NFT
[Section titled âWith NFTâ](#with-nft)
* Your daily points are multiplied: `Daily points Ă (1 + x%)`
* Your referral bonus also receives this boost.
* **Example**: 1,000 vRISE staking points with a 10% boost: `1,000 vRISE Ă 100 pt Ă 1.1 = 110,000 points`
### Without NFT
[Section titled âWithout NFTâ](#without-nft)
* You earn the base rate of points with no multipliers.
* Your referral bonus is calculated from your refereeâs base points only.
### Referral Boost Scenarios
[Section titled âReferral Boost Scenariosâ](#referral-boost-scenarios)
**Scenario 1: Neither you (referrer) nor your referee has an NFT**
* **You (A)**: Your base points + 10% of referee (B)âs base staking/LP points.
* **Referee (B)**: Base rewards only.
**Scenario 2: Only you (referrer) have an NFT**
* **You (A)**: `(Your base points Ă (1 + x%))` + `10% of referee (B)'s base staking/LP points`.
* **Referee (B)**: Base rewards only.
**Scenario 3: Both you (referrer) and your referee have an NFT**
* **You (A)**: `(Your base points Ă (1 + x%))` + `10% of (referee (B)'s base points Ă (1 + x%))`.
* **Referee (B)**: `(Their base points Ă (1 + x%))`.
***
## One-time Bonuses
[Section titled âOne-time Bonusesâ](#one-time-bonuses)
Earn a one-time point bonus for connecting your accounts.
* **EVM Wallet Connection**: `+500 points`
* This connection is required for the NFT Holder Boost.
* **X (Twitter) Connection**: `+100 points`
* This is also required for participation in upcoming retweet campaigns.
***
## Claim Rules
[Section titled âClaim Rulesâ](#claim-rules)
* All point claims are manual and must be initiated by you.
* Each category (Staking, LP) has its own 24-hour cooldown period after a claim.
* You can continue staking, providing liquidity, and referring during cooldown periods.
* Points are calculated at the moment you click the âClaimâ button.
# Swap
> Sunrise's Swap feature is a powerful tool for directly exchanging tokens across different blockchains. It utilizes IBC and other cross-chain technologies to provide a seamless a...
Sunriseâs Swap feature is a powerful tool for directly exchanging tokens across different blockchains. It utilizes IBC and other cross-chain technologies to provide a seamless asset exchange experience.
The swap page has two main functions:
* **Inter-Blockchain Swap**: Exchange assets between different chains (e.g., Cosmos, Ethereum).
* **vRISE**: Convert vRISE tokens to RISE tokens.
It also provides a feature to check your past transaction history.
## Inter-Blockchain Swap
[Section titled âInter-Blockchain Swapâ](#inter-blockchain-swap)
This is the standard swap feature in Sunrise. You can exchange your desired tokens between various supported blockchains.
### How to Perform a Swap
[Section titled âHow to Perform a Swapâ](#how-to-perform-a-swap)
1. **Select Source and Destination**:
* In the `From` field, select the asset you want to swap and the blockchain itâs on.
* In the `To` field, select the asset you want to receive and its blockchain.
2. **Enter the Amount**:
* When you enter the amount of tokens you want to swap in the `From` field, the amount of tokens you will receive is automatically calculated and displayed in the `To` field.
* Conversely, you can also enter the desired amount in the `To` field to calculate the required amount of the source token. (This reverse calculation may not be available for some routes, such as those involving EVM chains).
3. **Check Rate and Details**:
* After entering an amount, the current exchange rate is calculated. You will be notified upon successful calculation.
* Note that this rate is an estimate and may change by the time the transaction is included in a block.
4. **Confirm the Swap**:
* Review the details and click the âSwapâ button to approve the transaction. Wallet connection and approval are required.
### Notes and Errors
[Section titled âNotes and Errorsâ](#notes-and-errors)
* **Fees**: Swaps may incur fees. Standard IBC transfers between chains within the Cosmos ecosystem typically do not have relay fees. However, for swaps with chains outside of Cosmos, such as Ethereum, a relay fee is incurred as it uses âIBC Eurekaâ from [Skip Protocol](https://docs.skip.build/go/general/fee-info). This fee is automatically included in the rate calculation.
* **Calculation Error**: If you see a âFailed to calculate swap rateâ error, the amount you entered may be too low to cover the fees or too high for the liquidity poolâs capacity. Try a different route or adjust the amount.
* **Clear Function**: The âClear Allâ button resets all the information you have entered.
## Transaction History
[Section titled âTransaction Historyâ](#transaction-history)
You can view your past swap transaction history in a side panel by clicking the âView Historyâ button in the upper-right corner.
* **Display**: Shows the source and destination chains, assets, transaction hashes, and timestamps.
* **Explorer**: Each transaction hash is a link to the corresponding blockchain explorer for more details.
* **Clear History**: Clicking the trash can icon allows you to delete the locally stored history. (This does not erase the on-chain record).
## vRISE to RISE Conversion
[Section titled âvRISE to RISE Conversionâ](#vrise-to-rise-conversion)
This is a dedicated feature for converting vRISE tokens to RISE tokens on a 1-to-1 basis.
* **Purpose**: Use this to convert vRISE obtained from staking or other activities back into tradable RISE.
* **How to use**: Enter the amount of vRISE you wish to convert and click the âConvert vRISE to RISEâ button.
* **Direction**: This conversion is one-way only, from vRISE to RISE.
# Data Availability
> Sunrise Data Availability Layer is designed for high-throughput data availability, offering enhanced scalability and flexibility for applications. To achieve this, Sunrise adopt...
Sunrise Data Availability Layer is designed for high-throughput data availability, offering enhanced scalability and flexibility for applications. To achieve this, Sunrise adopts off-chain BLOB data and executes Erasure Coding for each Blob data, not entire block data.
The `x/da` module provides these features.
## Key Features
[Section titled âKey Featuresâ](#key-features)
Sunriseâs offâchain DA design unlocks unmatched throughput and costâefficiency without sacrificing onâchain security.
1. **Off-chain Erasure Encoding** Dramatically cuts validator compute & storage: only a metadata URI pointing to these erasure-coded data shares on chain, full data reconstruction happens offâchain.
2. **Off-chain Storage Integration** Utilizing decentralized storage solutions such as IPFS and Arweave, data shards are stored externally. MsgPublishData includes only a metadata URI pointing to these erasure-coded data shares, reducing the on-chain block size requirements for blob transactions and enhancing scalability.
## DA Comparison
[Section titled âDA Comparisonâ](#da-comparison)
| | Sunrise | Avail DA | Celestia | EigenDA | Ethereum (EIP-4844) |
| ------------------------ | --------------------------------- | --------------------- | --------------------- | ----------------- | --------------------- |
| Architecture | L1 with off-chain blobs | L1 Blockchain | L1 Blockchain | DA Service | L1 Blockchain (blobs) |
| Throughput | 5+ MB/s | 0.2 MB/s (4MB/block) | 1.33 MB/s (8MB/block) | 15 MB/s | 0.064 MB/s |
| Time to Finality | \~4min (7s+240s) | 40 seconds | 6 sec + 10 min | 12 min | 12 min |
| Data Storage | Off-chain blobs | On-chain | On-chain | Committee storage | On-chain blobs |
| Proof Mechanism | Optimistic with off-chain storage | Validity proof (KZG) | Fraud proof | Validity proof | Validity proof |
| Long-term Retrievability | Seamless | Not native | Not native | Not native | Not native |
| Cost Model | Fee Abstraction via liquidity | Direct fees | Direct fees | Committee fees | On-chain gas fees |
| Consensus | Proof of Liquidity | Babe & Grandpa (NPoS) | Tendermint | N/A | Ghost & Casper |
## Design Overview
[Section titled âDesign Overviewâ](#design-overview)
### Design patterns of other DA layers
[Section titled âDesign patterns of other DA layersâ](#design-patterns-of-other-da-layers)
1. **Data Availability Committee**
Data Availability Committee (DAC) is the traditional method to construct alternative Data Availability layer with low costs.
However, in DAC, it is impossible for clients to verify whether Data Availability attested by the committee is true or false, without downloading entire blob data.
2. **Data Availability Sampling**
In the Data Availability layers which adopts Data Availability Sampling (DAS), block data are processed for Erasure Coding. Then clients can verify the Data Availability only with downloading a part of block data, and can verify the inclusion of blob data in the block by using Merkle Tree structure.
In typical DAS setup, full nodes must transfer and download transaction data within the mempool.
As blob data sizes grow, the networkâs throughput could be limited by these transaction transfers, creating challenges for applications handling large blob data.
### Sunriseâs design
[Section titled âSunriseâs designâ](#sunrises-design)
To address these problems in DAC and DAS, Sunrise implements the following solutions:
1. **Off-chain Erasure Encoding** Blob data is processed for Erasure Coding in off-chain program, to reduce validator load.
2. **Blob data sharding** Not the entire block data but each blob is processed for Erasure Coding. Clients still can verify the Data Availability for each blob only with repeating to download shards, without downloading entire data. Clients also can verify the inclusion of blob in the block by using Merkle Tree structure.
3. **External Storage** Blob data is stored on decentralized storage platforms like IPFS and Arweave. Rather than containing blob data on-chain, MsgPublishData holds a metadata URI pointing to erasure-coded data shares.
```protobuf
message MsgPublishData {
option (cosmos.msg.v1.signer) = "sender";
string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string metadata_uri = 2;
uint64 parity_shard_count = 3;
repeated bytes shard_double_hashes = 4;
string data_source_info = 5;
}
```
Data availability is attested with Optimistic way. If enough invalidity challenges is submitted to the Sunrise network, validators will submit Zero-Knowledge Proofs (ZKP) using double-hashed shard data (`shard_double_hashes`), allowing validators to verify the presence of shard data without revealing it.
### Proof Lifecycle
[Section titled âProof Lifecycleâ](#proof-lifecycle)
Submitted data will have one of the following statuses:
* **Created** â **Challenge Period** â **Challenging** â **Verified** / **Rejected**
* **Challenge Period:** After submission, data remains in this status for a set period. If enough invalidity challenges are submitted, it moves to Challenging; otherwise, it becomes Verified.
* **Challenging:** Validators verify the data and submit proofs. If the validated shard meets the criteria, it becomes Verified; if not, Rejected.
* **Verified:** The metadata URI is included in the block and can be referenced externally.
* **Rejected:** The data was determined to be invalid and is not included in the block.
```
graph TD
A[Created] --> B[Challenge Period]
B -->|No challenge| C[Verified]
B -->|Challenged| D[Challenging]
D -->|Valid| C
D -->|Invalid| E[Rejected]
```
### Flow of proof
[Section titled âFlow of proofâ](#flow-of-proof)
```
%%{init: {"theme": "default", "themeVariables": {
"background": "transparent",
"primaryColor": "#22223b",
"primaryTextColor": "#22223b",
"lineColor": "#22223b",
"textColor": "#22223b",
"actorBorder": "#22223b",
"actorTextColor": "#22223b",
"sequenceNumberColor": "#22223b",
"messageTextColor": "#22223b",
"signalColor": "#22223b"
}}}%%
sequenceDiagram
autonumber
User->>Publisher Node: blob data
Publisher Node->>Publisher Node: Erasure coding
Publisher Node->>Decentralized Storage: Upload data shards
Publisher Node->>Sunrise: MsgPublishData
User->>Sunrise: Fraud Challenge if needed
Sunrise->>Validator Set: Start Voting for Challenging
Validator Set->>Sunrise: Zero Knowledge Validity Proof
```
## Zero-Knowledge Proof System
[Section titled âZero-Knowledge Proof Systemâ](#zero-knowledge-proof-system)
### Terms and Notation
[Section titled âTerms and Notationâ](#terms-and-notation)
* The hash function: H
* Set of validators: V
* Set of data shards: Sdâ
* Set of parity shards: Spâ
* Set of shards: S
S=SdââȘSpâ
### Overview
[Section titled âOverviewâ](#overview)
This system verifies the possession of data shard hash H(siâ) without exposing H(siâ) The circuit is for one shard sâS.
1. Public Inputs
H\_public2(s)
2. Private Inputs
H\_private(s)
3. Circuit Constraints
Hpublic2â(s)=H(Hprivateâ(s))
## The condition of Data Availability
[Section titled âThe condition of Data Availabilityâ](#the-condition-of-data-availability)
### Notations
[Section titled âNotationsâ](#notations)
* Replication Factor (Based only on data shards): r
* Replication Factor (Based on including parity shards): rpâ
rpâ=râŁSdââŁ+âŁSpââŁâŁSdââŁâ
* The number of shards each validator is engaged in: n
n=ceil(rpââŁVâŁâŁSdââŁ+âŁSpââŁâ)=ceil(râŁVâŁâŁSdââŁâ)
### Requirements for each shard to prove Data Availability
[Section titled âRequirements for each shard to prove Data Availabilityâ](#requirements-for-each-shard-to-prove-data-availability)
* Set of valid proofs for a shard `s` from validators engaged in this shard: Zsâ
rpââŁZsââŁââ„32â
* Set of shards which satisfy this condition: Savailable
### Requirements for tally to prove Data Availability
[Section titled âRequirements for tally to prove Data Availabilityâ](#requirements-for-tally-to-prove-data-availability)
âŁSâŁâŁSavailableâŁâââŁSavailableâŁââ„âŁSdââŁ+âŁSpââŁâŁSdââŁââ„âŁSdââŁâ
#### Example parameters
[Section titled âExample parametersâ](#example-parameters)
* 10 validators: v1â,...,v10â
* 20 shards: s1â,...,s20â
* 10 data shards
* 10 parity shards
* r=6
* rpâ=6Ă10+1010â=3
* Each validator submits 6 shards proofs
* 3Ă1020â=6
#### Case A: valid shard `s_1`
[Section titled âCase A: valid shard s\_1â](#case-a-valid-shard-s_1)
* Validator v1â, v3â and v9â âs proof contain shard s1â and other 5 shards
* Validator v3â failed to contain the validity of shard s1â in its proof
* However validator v1â and v9â succeeded to contain the validity of shard s1â in its proof, then
* âŁZ\_s1ââŁ=2
* It satisfies rpââŁZ\_s1ââŁââ„32â
#### Case B: invalid shard `s_2`
[Section titled âCase B: invalid shard s\_2â](#case-b-invalid-shard-s_2)
* Validator v2â, v4â and v10â âs proof contain shard s2â and other 5 shards
* Validator v2â and v4â failed to contain the validity of shard s2â in its proof
* Only validator v10â succeeded to contain the validity of shard s2â in its proof, then
* âŁZ\_s2ââŁ=1
* It doesnât satisfy rpââŁZ\_s2ââŁââ„32â
#### Case X: shard s\_1, s\_3-s\_11 are valid with the condition above
[Section titled âCase X: shard s\_1, s\_3-s\_11 are valid with the condition aboveâ](#case-x-shard-s_1-s_3-s_11-are-valid-with-the-condition-above)
* âŁSavailableâŁ=10
* âŁSdââŁ=10
* It satisfies âŁSavailableâŁâ„âŁSdââŁ
#### Case Y: Only shard s\_1, s\_3 are valid with the condition above
[Section titled âCase Y: Only shard s\_1, s\_3 are valid with the condition aboveâ](#case-y-only-shard-s_1-s_3-are-valid-with-the-condition-above)
* âŁSavailableâŁ=2
* âŁSdââŁ=10
* It doesnât satisfy âŁSavailableâŁâ„âŁSdââŁ
## Parameters
[Section titled âParametersâ](#parameters)
| Param | Default | Units | Description |
| ----------------------- | ---------- | ------ | --------------------------------------------------------------------- |
| publish\_data\_gas | 1,000,000 | gas | Gas cost for publishing data |
| challenge\_threshold | 0.33 | ratio | Threshold of invalidity challenges required to enter challenge period |
| replication\_factor | 5.0 | copies | Number of data shard replicas |
| slash\_epoch | 120,960 | blocks | Epoch period for slash judgment (approximately 1 week) |
| slash\_fault\_threshold | 0.5 | ratio | Threshold of invalid proofs that triggers validator slashing |
| slash\_fraction | 0.001 | ratio | Voting power reduction rate during slashing |
| challenge\_period | 4 minutes | time | Period for challenges after data published |
| proof\_period | 10 minutes | time | Period for submitting proofs after challenge |
## Messages
[Section titled âMessagesâ](#messages)
The module provides various message types:
* MsgUpdateParams: Update module parameters (governance operation)
* MsgPublishData: Publish data with metadata URI and shard information
* MsgSubmitInvalidity: Report data invalidity for specific indices
* MsgSubmitValidityProof: Submit validity proof from a validator
* MsgRegisterProofDeputy: Register a proof deputy for a validator
* MsgUnregisterProofDeputy: Unregister a proof deputy
## Queries
[Section titled âQueriesâ](#queries)
The module provides various query endpoints:
* Params: Query module parameters
* PublishedData: Get details of published data for a specific metadata URI
* AllPublishedData: List all published data
* ValidityProof: Get validity proof from a specific validator
* AllValidityProofs: List all validity proofs for a specific metadata URI
* Invalidity: Get invalidity report for a specific metadata URI and sender
* AllInvalidity: List all invalidity reports for a specific metadata URI
* ValidatorShardIndices: Get shard indices for a specific validator
* ZkpProofThreshold: Get ZKP proof threshold for a specific number of shards
* ProofDeputy: Get proof deputy for a specific validator
See [Github](https://github.com/sunriselayer/sunrise/tree/main/x/da) for details.
# Fee
> The x/fee module is a core component of the Sunrise blockchain responsible for managing transaction fees. It collects fees in a designated stablecoin (fee_denom) and then swaps ...
The `x/fee` module is a core component of the Sunrise blockchain responsible for managing transaction fees. It collects fees in a designated stablecoin (`fee_denom`) and then swaps a portion of these fees into RISE (`burned_denom`) to be burned. This module supports deflationary tokenomics for RISE while maintaining a stable fee system for users.
## Key Features of `x/fee`
[Section titled âKey Features of x/feeâ](#key-features-of-xfee)
1. **Burn Mechanism:**
* A portion of collected fees (in `fee_denom`) is swapped to RISE (`burned_denom`) and then burned, reducing the circulating supply.
* The burn ratio is determined by the `burn_ratio` parameter (default: 50%).
* The swap and burn operations are atomic and verified on-chain.
2. **Fee Denomination (`fee_denom`):**
* Specifies the denomination required for transaction fees (default: **`"uusdrise"`**).
* Transactions must pay fees in this denomination unless bypassed.
* Strict validation of fee denominations is enforced.
3. **Dynamic Parameter Configuration:**
* Developers can configure parameters dynamically with validation enforced by the module.
* Parameters can be updated through governance proposals.
## Core Functionality
[Section titled âCore Functionalityâ](#core-functionality)
### Fee Collection and Processing
[Section titled âFee Collection and Processingâ](#fee-collection-and-processing)
**Fee Collection Process:**
1. Fees are collected in `fee_denom` through the `FeeCollector` module account.
2. The system validates:
* Only one fee denomination per transaction.
* The fee denomination matches the configured `fee_denom`.
* The fee amount is valid and non-zero.
**Fee Processing Flow:**
1. A portion of the collected fees, determined by `burn_ratio`, is designated for burning.
2. This portion is swapped from `fee_denom` to `burned_denom` via the `x/swap` module.
3. The resulting `burned_denom` tokens are burned from the supply.
4. The remaining `fee_denom` (the portion not designated for burning) stays in the `FeeCollector` account for other protocol uses.
## Parameter Configuration
[Section titled âParameter Configurationâ](#parameter-configuration)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
| Parameter | Description | Default Value | Constraints |
| -------------- | ------------------------------------------------------- | ------------- | ---------------------------- |
| `fee_denom` | Required denomination for transaction fees | `"uusdrise"` | Must be a valid denomination |
| `burned_denom` | Denomination to be burnt at the time of fee settlement. | `"urise"` | Must be a valid denomination |
| `burn_ratio` | Percentage of fees to burn | `0.5` | Must be between 0 and 1 |
## Workflow: Fee Processing
[Section titled âWorkflow: Fee Processingâ](#workflow-fee-processing)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
```
sequenceDiagram
participant User
participant FeeModule as x/fee Module
participant BankKeeper as Bank Keeper
participant SwapModule as x/swap Module
participant FeeCollector as Fee Collector
participant BribeModule as x/bribe Module
User->>FeeModule: Submit Transaction
FeeModule->>BankKeeper: Validate Fee Denomination
BankKeeper->>FeeCollector: Transfer Fees (in fee_denom)
note over FeeModule, SwapModule: Fee Processing
FeeModule->>FeeModule: Calculate amount to swap & burn
FeeModule->>SwapModule: Swap fee_denom to burned_denom
SwapModule-->>FeeModule: Returns burned_denom
FeeModule->>BankKeeper: Execute Burn (burned_denom)
note over BribeModule, FeeCollector: Unclaimed Bribe Processing
BribeModule->>FeeModule: Process Unclaimed Bribes
FeeModule->>FeeCollector: Transfer Unclaimed Amounts
```
For more details and implementation specifics, see the [GitHub repository](https://github.com/sunriselayer/sunrise/tree/main/x/fee).
# Liquidity Incentive
> The x/liquidityincentive module incentivizes liquidity providers by distributing rewards based on their contributions to liquidity pools. It uses an epoch-based reward system an...
The `x/liquidityincentive` module incentivizes liquidity providers by distributing rewards based on their contributions to liquidity pools. It uses an epoch-based reward system and a gauge voting mechanism to allocate rewards dynamically. This module ensures sustainable liquidity provisioning while allowing users to participate in governance through gauge voting.
See the [Bribes](/learn/sunrise/liquidity-incentive/bribes) for more information on the bribe feature.
## Key Features
[Section titled âKey Featuresâ](#key-features)
1. **Epoch-Based Reward Distribution**:
* Rewards are distributed at the end of each epoch.
* Lazy accounting minimizes computational overhead by calculating rewards only when claimed.
2. **Gauge Voting**:
* Users can vote on which liquidity pools should receive incentives.
* Voting power is determined by **`vRISE`** tokens (non-transferable staking tokens).
3. **Lazy Accounting for Rewards**:
* Rewards are tracked using accumulators and distributed only when users claim them.
* This reduces the computational load on the network.
4. **Dynamic Incentive Allocation**:
* Incentives are allocated based on pool weights (gauges) determined through voting.
## **Core Concepts**
[Section titled âCore Conceptsâ](#core-concepts)
### Epochs
[Section titled âEpochsâ](#epochs)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
* Two epochs exist concurrently:
1. **Past Epoch**: The epoch that has ended.
2. **Current Epoch**: The ongoing epoch.
* Each epoch has the following parameters:
* **`id`**: The unique epoch ID.
* **`start_block`**: The block where the epoch begins.
* **`start_time`**: The Unix time where the epoch begins.
* **`end_block`**: The block where the epoch ends.
* **`gauges`**: A list of gauges (pool weights) for incentive distribution.
### Gauge
[Section titled âGaugeâ](#gauge)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
* A gauge represents a specific liquidity poolâs weight in reward allocation.
* Parameters:
* **`pool_id`**: The ID of the liquidity pool.
* **`voting_power`**: The voting power allocated to this pool.
### Lazy Accounting
[Section titled âLazy Accountingâ](#lazy-accounting)
* Rewards are not distributed immediately but are calculated when claimed.
* Formula for calculating rewards:
ClaimAmountijâ=PoolUnclaimedAccumulationiâPositionUnclaimedAccumulationijââĂPoolUnclaimediâ
## Workflow
[Section titled âWorkflowâ](#workflow)
```
graph TD
A{User A}-->|Provide Liquidity|B((Pool B))
A-->|Register a Bribe|C((Gauge for Pool B))
D{Users}-->|Vote|C
C-.->|Distribute the Bribe|D
C-.->|Allocate more vRISE|B
B-.->|Distribute vRISE incentives|A
```
### BeginBlocker
[Section titled âBeginBlockerâ](#beginblocker)
1. Transfers a portion of inflation rewards from the Fee Collector account to the **`x/liquidityincentive`** module account.
2. Rewards are converted to **`vRISE`** tokens (non-transferable staking tokens).
3. Rewards are accumulated in each poolâs fee accumulator.
### MsgClaimRewards (`x/liquiditypool`)
[Section titled âMsgClaimRewards (x/liquiditypool)â](#msgclaimrewards-xliquiditypool)
* Users claim rewards by interacting with their positions in liquidity pools.
> **Note:** The rewards discussed here are specifically **Gauge Voting rewards, allocated according to your vRISE voting power**. These are distinct from standard LP rewards. You claim Gauge Voting rewards by participating in Gauge Voting with your vRISE, which determines your share of the rewards for each pool per epoch.
## Sequence Diagram: Reward Distribution
[Section titled âSequence Diagram: Reward Distributionâ](#sequence-diagram-reward-distribution)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
```
sequenceDiagram
participant User as Liquidity Provider
participant LiquidityPool as x/liquiditypool Module
participant IncentiveModule as x/liquidityincentive Module
participant Distribution as x/distribution Module
User->>LiquidityPool: Provide Liquidity
LiquidityPool->>IncentiveModule: Track Position Accumulation
IncentiveModule->>Distribution: Transfer Inflation Rewards
User->>IncentiveModule: Claim Rewards
IncentiveModule->>User: Calculate and Distribute Rewards
```
## Parameters
[Section titled âParametersâ](#parameters)
| Parameter | Default | Units | Description |
| ---------------------- | ------- | ------ | --------------------------------------------------- |
| epoch\_blocks | 4,320 | blocks | Number of blocks per epoch (approximately 12 days) |
| staking\_reward\_ratio | 0.50 | ratio | Ratio of vRISE allocated to staking (50%) |
| bribe\_claim\_epochs | 5 | epochs | Number of epochs during which bribes can be claimed |
### Parameter Details
[Section titled âParameter Detailsâ](#parameter-details)
1. **epoch\_blocks**
* Defines the length of each epoch in blocks
* Default value is approximately 12 days (`DefaultParams().BlocksPerYear/365*12`)
* Controls epoch start and end, determining reward distribution timing
2. **staking\_reward\_ratio**
* Ratio of newly minted vRISE tokens allocated to staking rewards
* Default value is 50% (`math.LegacyNewDecWithPrec(50, 2)`)
* Remaining 50% is used for liquidity incentives
3. **bribe\_claim\_epochs**
* Defines the period during which bribes can be claimed in epochs
* Default value is 5 epochs
* Bribes cannot be claimed after this period expires
These parameters can be updated through governance. Parameter changes can significantly impact system behavior and should be carefully considered.
## Messages
[Section titled âMessagesâ](#messages)
The module provides various message types:
* MsgUpdateParams: Update module parameters (governance operation)
* MsgStartNewEpoch: Start a new epoch
* MsgVoteGauge: Vote on pool weights for reward distribution
* MsgRegisterBribe: Register a bribe for a specific pool and epoch
* MsgClaimBribes: Claim accumulated bribes
## Queries
[Section titled âQueriesâ](#queries)
The module provides various query endpoints:
* Params: Query module parameters
* Epoch: Get details of a specific epoch
* Epochs: List all epochs
* Vote: Get voting information for a specific address
* Votes: List all votes
* Bribe: Get details of a specific bribe
* Bribes: List all bribes with optional filters
* BribeAllocation: Get bribe allocation for a specific address, epoch, and pool
* BribeAllocations: List all bribe allocations with optional filters
* TallyResult: Get the tally result for the next epoch
See [Github](https://github.com/sunriselayer/sunrise/tree/main/x/liquidityincentive) for details.
# Bribes
> The x/liquidityincentive module implements a protocol-level mechanism that allows applications to reward vRISE holders for directing votes to specific pools. This creates an eff...
The `x/liquidityincentive` module implements a protocol-level mechanism that allows applications to reward vRISE holders for directing votes to specific pools. This creates an efficient market for liquidity allocation through a bribe-based incentive system.
## Key Features
[Section titled âKey Featuresâ](#key-features)
1. **Protocol-Level Bribes:**
* Applications can offer bribes to attract liquidity to specific pools
* vRISE holders are incentivized to direct votes to pools with higher bribes
* Creates an efficient market for liquidity allocation
2. **Epoch-Based System:**
* Bribes are tied to specific epochs
* System tracks expired epochs
* Unclaimed bribes from expired epochs are processed and sent to fee collector
3. **Weight-Based Distribution:**
* Fair allocation based on vote weights
* Prevents double claiming
* Transparent and verifiable on-chain
4. **Economic Efficiency:**
* Creates a market for liquidity allocation
* vRISE holders can maximize returns by directing votes
* Unclaimed rewards are recycled to fee collector
## Core Functionality
[Section titled âCore Functionalityâ](#core-functionality)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
### Bribe Management
[Section titled âBribe Managementâ](#bribe-management)
**Each bribe is defined by several parameters:**
* `id`: Unique identifier for the bribe
* `epoch_id`: The epoch for which the bribe is valid
* `pool_id`: The pool to which the bribe applies
* `address`: The senderâs address
* `amount`: Total amount of the bribe
* `claimed_amount`: Amount already claimed by voters
### Bribe Allocation
[Section titled âBribe Allocationâ](#bribe-allocation)
The system tracks how bribes are allocated to voters:
* `address`: Voterâs address
* `epoch_id`: Epoch for which the allocation is valid
* `pool_id`: Pool to which the allocation applies
* `weight`: Weight of the voterâs votes
* `claimed_bribe_ids`: List of bribe IDs already claimed
***
## Bribe System Architecture & Flow
[Section titled âBribe System Architecture & Flowâ](#bribe-system-architecture--flow)
### Key Components and Flows
[Section titled âKey Components and Flowsâ](#key-components-and-flows)
#### Bribe Registration
[Section titled âBribe Registrationâ](#bribe-registration)
* **User registers a bribe** by sending coins to the Bribe Account in the Liquidity Incentive module.
* The system **creates a Bribe record** (with unique ID, epoch, pool, amount, and claimed amount).
* When the epoch starts, **Bribe allocations** are created for voters based on their vote weights for the pool in that epoch.
#### Bribe Claiming
[Section titled âBribe Claimingâ](#bribe-claiming)
* **User initiates a claim** for their bribe allocation.
* The system:
* Verifies the bribe exists and is valid for the epoch/pool.
* Checks the userâs allocation and ensures the bribe hasnât been claimed.
* Calculates the claimable amount based on the userâs vote weight.
* Transfers the appropriate amount from the Bribe Account to the user.
* Updates the claimed amount and allocation records.
#### Fee Processing
[Section titled âFee Processingâ](#fee-processing)
* Unclaimed bribes from expired epochs are **returned to the Fee Collector**.
* Fees are processed:
* Transferred from the Fee Collector to the module account.
* Converted to the bond denomination if needed.
* Distributed to liquidity pools as incentives.
#### Cleanup (Unclaimed Bribes)
[Section titled âCleanup (Unclaimed Bribes)â](#cleanup-unclaimed-bribes)
* At the end of each epoch, the system:
* Processes expired epochs.
* Calculates unclaimed bribe amounts.
* Returns unclaimed funds to the Fee Collector.
* Cleans up expired bribe and allocation records.
#### State Transitions
[Section titled âState Transitionsâ](#state-transitions)
* **Bribe:** Created â Active â Claimed/Expired
* **Allocation:** Created â Active â Claimed/Expired
* **Funds:** User â Bribe Account â User/Fee Collector
***
### Bribe System Flowchart
[Section titled âBribe System Flowchartâ](#bribe-system-flowchart)
```
flowchart TD
User[User] -->|Register Bribe| BribeAccount[Bribe Account]
BribeAccount -->|Allocate| Allocation[Bribe Allocation]
User -->|Claim| Allocation
Allocation -->|Transfer| UserAccount[User Account]
Allocation -->|Unclaimed| FeeCollector[Fee Collector]
```
**Flow Explanation:**
1. The user registers a bribe, which is deposited into the Bribe Account.
2. The system allocates bribe shares to eligible voters based on their voting weights.
3. Users can claim their allocated bribe rewards from the Bribe Allocation.
4. Claimed rewards are transferred to the userâs account.
5. Any unclaimed bribes after the claim period are sent to the Fee Collector for redistribution or burning.
***
## Integration Points
[Section titled âIntegration Pointsâ](#integration-points)
The bribe module integrates with several other modules:
* Bank module for coin transfers
* Account module for address handling
* Staking module for vRISE holders
* Governance module for parameter updates
See [Liquidity Incentive](/learn/sunrise/liquidity-incentive) for more system details.
# Gauges Voting
> A Gauge in the Sunrise ecosystem is a mechanism that governs the issuance of vRISE tokens. Currently, the primary gauge product is the Liquidity Pool system.
## What is a Gauge?
[Section titled âWhat is a Gauge?â](#what-is-a-gauge)
A Gauge in the Sunrise ecosystem is a mechanism that governs the issuance of `vRISE` tokens. Currently, the primary gauge product is the Liquidity Pool system.
`vRISE` holders can vote to determine the allocation of newly minted `vRISE` tokens across different gauges. Liquidity pools that attract more voting power will receive a larger share of newly issued vRISE tokens, creating an incentive mechanism that aligns with community preferences.
## How the Voting System Works
[Section titled âHow the Voting System Worksâ](#how-the-voting-system-works)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
### Epoch-Based Voting
[Section titled âEpoch-Based Votingâ](#epoch-based-voting)
Gauge weight voting operates on an epoch system:
* Each epoch spans a predefined number of blocks (configurable via governance)
* Votes are tallied at the beginning of each new epoch
* Vote weight is determined by the voterâs voting power at epoch starts
* Voting is cleared when a new epoch starts
```
sequenceDiagram
participant Voter as vRISE Holder
participant Module as Liquidityincentive Module
participant Gauges as Liquidity Pool Gauges
Voter->>Module: Submit Vote (% allocation per gauge)
Note over Module: Store vote preference
Module->>Module: Epoch Begins
Module->>Module: Tally Votes
Module->>Gauges: Distribute vRISE According to Vote Weight
Gauges->>Voter: Return Rewards Based on LP Position
```
> **Note:**\
> The rewards discussed here are specifically **Gauge Voting rewards, allocated according to your vRISE voting power**.\
> These are distinct from standard LP rewards.\
> Rewards are accumulated in the userâs position and can be claimed at the same time as standard LP rewards in MsgClaimRewards (x/liquiditypool)
### Eligibility Requirements
[Section titled âEligibility Requirementsâ](#eligibility-requirements)
To participate in gauge voting:
* **Token Requirement**: You must earn `vRISE` tokens, primarily by providing liquidity to pools
* **Voting Power**: Voting Power can be gained by delegating to a validator.
* **Tally Timing:** The voting pawer at the start of the epoch is applied.
You can submit your vote even before you have voting power. Your voting preferences will be applied based on whatever voting power you have when the next epoch begins.
## How to Vote
[Section titled âHow to Voteâ](#how-to-vote)
### Step 1: Access Your Voting Dashboard
[Section titled âStep 1: Access Your Voting Dashboardâ](#step-1-access-your-voting-dashboard)
Click **My Votes** to begin the voting process.
### Step 2: Select Gauges
[Section titled âStep 2: Select Gaugesâ](#step-2-select-gauges)
1. Click âSelect Poolâ to open the pool selection interface
2. Choose the pools/gauges you wish to support
3. Your previous voting selections will be automatically loaded if applicable
4. Remove unwanted gauges by clicking the delete button
### Step 3: Allocate Voting Power
[Section titled âStep 3: Allocate Voting Powerâ](#step-3-allocate-voting-power)
Specify what percentage of your voting power to allocate to each selected gauge:
* **Percentage-Based:** Allocations are specified as percentages rather than absolute amounts because:
* Your vRISE balance may fluctuate between epochs
* Percentage allocations automatically adjust to your current balance at epoch start
* This approach eliminates the need to revote every epoch
### Step 4: Preview and Submit
[Section titled âStep 4: Preview and Submitâ](#step-4-preview-and-submit)
1. Use the âPreview Voteâ feature to see how your current vRISE balance would be distributed
2. Confirm your selections
3. Click Vote to submit your transaction
4. Your vote preferences will be applied to all future epochs until changed
### Step 5: Update (Optional)
[Section titled âStep 5: Update (Optional)â](#step-5-update-optional)
You can modify your vote at any time:
* Your latest voting decision before an epoch begins will be applied
* Changes take effect at the next epoch boundary
* Simply repeat the voting process to update your preferences
See [Liquidity Incentive](/learn/sunrise/liquidity-incentive) for more system details.
# Liquidity Pool
> The x/liquiditypool module implements a concentrated liquidity automated market maker (AMM) mechanism for the Sunrise blockchain. This module enables users to create liquidity p...
The `x/liquiditypool` module implements a concentrated liquidity automated market maker (AMM) mechanism for the Sunrise blockchain. This module enables users to create liquidity pools, add positions with specific price ranges, and earn rewards from trading fees and incentives.
## Key Features
[Section titled âKey Featuresâ](#key-features)
1. **Concentrated Liquidity AMM:**
* Follows a similar model to Uniswap V3, allowing liquidity providers to concentrate their assets within specific price ranges.
* Improves capital efficiency compared to traditional constant product AMMs.
2. **Position-Based Liquidity:**
* Users create positions with defined price ranges (ticks).
* Each position has a unique ID and tracks the liquidity providerâs contribution.
3. **Fee Generation:**
* Positions earn fees from trades that occur within their price range.
* Fees are collected in the base and quote denominations of the pool.
4. **`vRISE` Incentives:**
* Liquidity providers earn vRISE tokens as additional incentives.
* For more information, see [Liquidity Incentive](/learn/sunrise/liquidity-incentive)
## Core Functionality
[Section titled âCore Functionalityâ](#core-functionality)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
### Pool Management
[Section titled âPool Managementâ](#pool-management)
**Each pool is defined by several parameters:**
* `id`: Unique identifier for the pool
* `denom_base` & `denom_quote`: The token pair denominations
* `fee_rate`: The fee charged on swaps within the pool
* `tick_params`: Parameters defining the tick system
* `current_tick`, `current_tick_liquidity`, `current_sqrt_price`: Current state variables
### Tick System
[Section titled âTick Systemâ](#tick-system)
The tick system is based on a price ratio formula:
price(tick)=price\_ratiotickâbase\_offset
In the typical case with `price_ratio = 1.0001` and `base_offset = 0`:
price(tick)=1.0001tick
This allows for precise positioning of liquidity within specific price ranges.
## Workflow: Creating and Using Positions
[Section titled âWorkflow: Creating and Using Positionsâ](#workflow-creating-and-using-positions)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
```
sequenceDiagram
participant User
participant LiquidityPool as x/liquiditypool Module
participant SwapModule as x/swap Module
User->>LiquidityPool: MsgCreatePosition
LiquidityPool->>User: Return Position ID
User->>LiquidityPool: MsgIncreaseLiquidity
LiquidityPool->>User: Return new Position ID
User->>LiquidityPool: MsgDecreaseLiquidity
LiquidityPool->>User: Return Tokens
User->>SwapModule: Perform Swap (via x/swap)
SwapModule->>LiquidityPool: Use Pool Liquidity
LiquidityPool->>LiquidityPool: Collect Fees for Positions
LiquidityPool->>User: Send Swapped amount
User->>LiquidityPool: MsgClaimRewards
LiquidityPool->>User: Transfer Earned Fees & vRISE Incentives
```
## Messages
[Section titled âMessagesâ](#messages)
The module provides various message types:
* MsgUpdateParams: Update module parameters (governance operation)
* MsgCreatePool: Create a new liquidity pool with specified parameters
* MsgCreatePosition: Create a position within a price range in a pool
* MsgIncreaseLiquidity: Add liquidity to an existing position
* MsgDecreaseLiquidity: Remove liquidity from an existing position
* MsgClaimRewards: Claim accumulated fees and incentives for positions
## Queries
[Section titled âQueriesâ](#queries)
The module provides various query endpoints:
* Params: Query module parameters
* Pool: Get details of a specific pool
* Pools: List all liquidity pools
* Position: Get details of a specific position
* Positions: List all positions
* PoolPositions: List positions in a specific pool
* AddressPositions: List positions owned by an address
* PositionFees: Get accrued fees for a position
* CalculationCreatePosition: Preview position creation
* CalculationIncreaseLiquidity: Preview liquidity increase
See [Github](https://github.com/sunriselayer/sunrise/tree/main/x/liquiditypool) for details.
# Lockup
> The x/lockup module provides functionality for managing token lockups and delegations. This module supports operations such as creating lockup accounts, non-voting delegation, r...
The `x/lockup` module provides functionality for managing token lockups and delegations. This module supports operations such as creating lockup accounts, non-voting delegation, reward claiming, and token transfers.
## Key Features
[Section titled âKey Featuresâ](#key-features)
1. **Lockup Account Management**:
* Creation and management of lockup accounts
* Setting lockup periods (start and end times)
* Tracking of locked tokens
2. **Non-Voting Delegation**:
* Delegation of locked tokens to validators
* Undelegation functionality
* Delegation reward claiming
3. **Token Management**:
* Transfer of locked tokens
* Querying spendable amounts
* Tracking lockup status
## Core Concepts
[Section titled âCore Conceptsâ](#core-concepts)
### Lockup Account
[Section titled âLockup Accountâ](#lockup-account)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
A lockup account is defined by the following parameters:
* **`address`**: The lockup account address
* **`owner`**: The account ownerâs address
* **`id`**: Unique identifier for the lockup account
* **`start_time`**: Lockup start time (Unix timestamp)
* **`end_time`**: Lockup end time (Unix timestamp)
* **`original_locking`**: Original locked amount
* **`delegated_free`**: Amount of delegated transfers available
* **`delegated_locking`**: Delegated amount of locking amount
* **`unbond_entries`**: List of unbonding entries
* **`additional_locking`**: Additional locked amount
### Unbonding Entry
[Section titled âUnbonding Entryâ](#unbonding-entry)
An unbonding entry is defined by the following parameters:
* **`creation_height`**: Block height when the entry was created
* **`end_time`**: End time of the entry
* **`amount`**: Unbonding amount
* **`validator_address`**: Validatorâs address
## Workflow
[Section titled âWorkflowâ](#workflow)
### 1. Lockup Account Initialization
[Section titled â1. Lockup Account Initializationâ](#1-lockup-account-initialization)
* User creates a lockup account
* Sets lockup period and amount
* Specifies account owner
### 2. Non-Voting Delegation
[Section titled â2. Non-Voting Delegationâ](#2-non-voting-delegation)
* Delegates locked tokens to validators
* Executes undelegation
* Claims delegation rewards
### 3. Token Transfer
[Section titled â3. Token Transferâ](#3-token-transfer)
* Transfers tokens from lockup account
* Verifies spendable amount
* Executes transfer
## Sequence Diagram: Lockup Operations
[Section titled âSequence Diagram: Lockup Operationsâ](#sequence-diagram-lockup-operations)
```
sequenceDiagram
participant User as User
participant LockupModule as x/lockup Module
participant Validator as Validator
participant Bank as x/bank Module
User->>LockupModule: Create Lockup Account
LockupModule->>Bank: Lock Tokens
User->>LockupModule: Non-Voting Delegate
LockupModule->>Validator: Delegate Tokens
Validator->>LockupModule: Generate Rewards
User->>LockupModule: Claim Rewards
LockupModule->>User: Send Rewards
```
## Messages
[Section titled âMessagesâ](#messages)
The module provides various message types:
* MsgUpdateParams: Update module parameters (governance operation)
* MsgInitLockupAccount: Initialize a new lockup account with specified parameters
* MsgNonVotingDelegate: Delegate tokens from a lockup account without voting rights
* MsgNonVotingUndelegate: Undelegate tokens from a non-voting delegation
* MsgClaimRewards: Claim delegation rewards for a lockup account
* MsgSend: Send tokens from a lockup account to another address
## Queries
[Section titled âQueriesâ](#queries)
The module provides various query endpoints:
* Params: Query module parameters
* LockupAccounts: List all lockup accounts for a given owner
* LockupAccount: Get details of a specific lockup account
* SpendableAmount: Get the spendable amount for a specific lockup account
See [Github](https://github.com/sunriselayer/sunrise/tree/main/x/lockup) for details.
# Proof of Liquidity
> Proof of Liquidity (PoL) is a novel Sybil resistance mechanism that utilizes a user's history of providing liquidity as the basis for voting power in the network. This approach ...
Proof of Liquidity (PoL) is a novel Sybil resistance mechanism that utilizes a userâs history of providing liquidity as the basis for voting power in the network. This approach aligns economic incentives between validators, liquidity providers, and applications in a more sustainable way than traditional models.
## Core Concepts
[Section titled âCore Conceptsâ](#core-concepts)
### Theoretical Foundation
[Section titled âTheoretical Foundationâ](#theoretical-foundation)
Proof of Liquidity builds upon established DeFi mechanisms while solving key issues:
1. **Beyond ve-Tokenomics**: While ve (vote-escrowed) models like Curveâs allow governance participation, PoL integrates liquidity provision directly with network security
2. **Separation of Economic Activities**: PoL uses distinct tokens for consensus security, governance, and transaction fees
3. **Sustainable Incentives**: Unlike traditional DEX inflation models that dilute token value, PoL creates a circular economic system
## Implementation Models
[Section titled âImplementation Modelsâ](#implementation-models)
### Berachain Implementation
[Section titled âBerachain Implementationâ](#berachain-implementation)
Berachain pioneered the PoL model with a tri-token design:
* **$BERA**: Transferable token used for transaction fees and staking (security layer)
* **$BGT**: Non-transferable governance token earned by providing liquidity
* **$HONEY**: Stablecoin for value transfer within the ecosystem
**Key Technical Components:**
* Validators stake $BERA to join the consensus set
* Block rewards are paid in $BGT based on validatorâs âboostâ percentage
* âBoostâ is calculated from delegated $BGT from token holders
* Validators direct emissions to reward vaults, which distribute $BGT to liquidity providers
**Flow of Value:**
1. Validators stake $BERA as security bond
2. Validators receive $BGT rewards for block production
3. Validators direct $BGT rewards to protocol reward vaults
4. Liquidity providers stake receipt tokens in reward vaults to earn $BGT
5. $BGT holders delegate to validators to boost their rewards
6. Protocols provide incentives to validators to attract emissions
### Sunrise Implementation
[Section titled âSunrise Implementationâ](#sunrise-implementation)
Sunrise builds upon PoL concepts with its own architecture:
* **vRISE**: Non-transferable token for staking and governance
* **RISE**: Transferable token used as gas and fees
**Technical Implementation:**
* Liquidity providers in the `x/liquiditypool` module earn vRISE
* vRISE holders can stake in the `x/staking` module
* Stakers participate in gauge voting through the `x/liquidityincentive` module
* Gauge voters decide which pools receive vRISE incentives
* Voters earn rewards from pool profits, aligning incentives
## Technical Architecture
[Section titled âTechnical Architectureâ](#technical-architecture)
### Sunrise Modules
[Section titled âSunrise Modulesâ](#sunrise-modules)
The Sunrise implementation consists of several key modules that interact to create the PoL ecosystem:
| | Function |
| -------------------- | --------------------------------------- |
| x/liquiditypool | Core AMM functionality |
| x/liquidityincentive | Gauge voting and incentive distribution |
| x/swap | Token swap implementation |
| x/staking | vRISE staking management |
### Gauge Voting System
[Section titled âGauge Voting Systemâ](#gauge-voting-system)
The gauge voting system is the cornerstone of PoL implementations:
1. **Epoch-Based Voting**:
* Voting power is determined by staked vRISE at epoch start
* Each epoch spans a predefined number of blocks (configurable via governance)
* Votes is cleared each time a new epoch is created
1. **Reward Distribution**:
pool rewards=total rewardsĂpoolâs voting power/total voting power of all pools user rewards=pool rewardsĂuser voting power/poolâs voting power
* Emissions are calculated per block
* Distribution based on voted gauge weights and each userâs voting power
* Rewards are accumulated in the userâs position. Can be claimed at any time
### Consensus Implementation
[Section titled âConsensus Implementationâ](#consensus-implementation)
Sunrise uses CometBFT (Tendermint) for consensus with the following specifications:
* **Maximum Validator Set**: 100 validators
* **Block Time**: \~10 seconds
* **Validator Selection**: Based on stake weight
Future plans include investigating Mysticeti integration to enhance throughput
## Technical Advantages
[Section titled âTechnical Advantagesâ](#technical-advantages)
### Capital Efficiency
[Section titled âCapital Efficiencyâ](#capital-efficiency)
Unlike traditional PoS where staked tokens are idle, PoL enables:
* Active capital utilization through liquidity provision
* Dual earning opportunities (staking + liquidity fees)
* Lower opportunity cost for network security
### Economic Alignment
[Section titled âEconomic Alignmentâ](#economic-alignment)
The technical design creates circular dependencies that align incentives:
* Validators need delegated RISE/vRISE to maximize rewards
* Applications need validator emissions for liquidity
* Users need to provide liquidity to earn governance tokens
* The inflation rewards will be distributed with RISE which doesnât lead to the dilution of vRISE (governance token)
| Function | Token(s) | Details |
| ------------------ | ------------------------------------------------------------------ | ------------------------------------------------------ |
| Security |  RISE +  vRISE | Both vRISE & RISE can be staked for Consensus |
| Governance |  vRISE | vRISE is used for On-chain governance and Gauge Voting |
| Security Emissions |  RISE | RISE is distributed for stakers as consensus rewards |
| LP Emissions |  vRISE | vRISE is distributed for LPs as incentives |
| Fee | Any (swapped to [Fee Token](/learn/sunrise/fee)) | RISE is used as a transaction fee |
**Legend:**\
 = RISE\
 = vRISE
> **Note:**\
> In Sunrise, the roles and rewards for each token are clearly defined.\
> This clear separation of functions helps prevent dilution of network security when governance or liquidity rewards are distributed.
### Security Considerations
[Section titled âSecurity Considerationsâ](#security-considerations)
The implementation includes several security measures:
* **Slashing Conditions**: Validators risk losing staked assets for misbehavior
* **Governance Safeguards**: Weighted voting prevents capture
* **Incentive Compatibility**: Economic design disincentivizes attacks
## Performance Considerations
[Section titled âPerformance Considerationsâ](#performance-considerations)
PoL implementations must balance several performance factors:
* **Epoch Length**: Longer epochs reduce computational overhead but decrease responsiveness
* **Validator Set Size**: Larger sets increase decentralization but may impact consensus speed
* **Vote Processing**: Batch processing of votes at epoch boundaries to minimize gas costs
* **Receipt Token Calculations**: Optimized tracking of liquidity positions and reward distribution
## Future Directions
[Section titled âFuture Directionsâ](#future-directions)
Several technical enhancements are being explored:
1. **Mysticeti Integration**: Investigating the adoption of Mysticeti consensus to enhance throughput
2. **Cross-Chain Gauges**: Enabling voting for liquidity on connected chains
3. **Dynamic Emission Schedules**: Algorithmic adjustment of emissions based on network metrics
4. **Advanced Reward Mechanisms**: More sophisticated reward distribution using bonding curves
## References
[Section titled âReferencesâ](#references)
* [Berachain: Flow of Value](https://blog.berachain.com/blog/flow-of-value-examining-the-differences-between-pos-and-pol-a-case-for-a-new-paradigm-in-sustainable-incentive-alignment-at-the-protocol-layer)
* [ve(3,3) Tokenomics](https://andrecronje.medium.com/ve-3-3-44466eaa088b)
* [Curve Finance ve-Token Model](https://curve.fi/files/CurveDAO.pdf)
* [Mysticeti Consensus](https://sui.io/mysticeti)
# Shareclass
> The x/shareclass module enables users to delegate their RISE tokens without voting rights and earn staking rewards. This allows participation in staking using RISE tokens even w...
The `x/shareclass` module enables users to delegate their RISE tokens without voting rights and earn staking rewards. This allows participation in staking using RISE tokens even without holding `vRISE` (non-transferable staking tokens).
## Key Features
[Section titled âKey Featuresâ](#key-features)
1. **Non-Voting Delegation with RISE:**
* Users can delegate their RISE tokens to validators.
* Delegation does not grant voting rights, separating staking rewards from governance participation.
2. **Earning Staking Rewards:**
* Delegators earn staking rewards based on their delegated RISE amount.
* Provides an alternative way to earn rewards for RISE token holders.
3. **Validator Creation:**
* Supports the creation of new validators within the network.
## Core Concepts
[Section titled âCore Conceptsâ](#core-concepts)
### Non-Voting Delegation
[Section titled âNon-Voting Delegationâ](#non-voting-delegation)
Users can delegate their RISE tokens to a chosen validator. The module handles the calculation of shares and rewards. This mechanism allows users to benefit from staking rewards without needing to manage `vRISE` tokens or participate in governance directly.
### Reward Calculation
[Section titled âReward Calculationâ](#reward-calculation)
Staking rewards are calculated based on the amount of RISE delegated and the reward parameters of the module. Users can claim their accumulated rewards.
## Workflow
[Section titled âWorkflowâ](#workflow)
### 1. Delegate RISE (Non-Voting)
[Section titled â1. Delegate RISE (Non-Voting)â](#1-delegate-rise-non-voting)
* User sends a `MsgNonVotingDelegate` transaction, specifying the validator and the amount of RISE to delegate.
* The module records the delegation and calculates the corresponding shares.
### 2. Claim Rewards
[Section titled â2. Claim Rewardsâ](#2-claim-rewards)
* User sends a `MsgClaimRewards` transaction to claim their accumulated staking rewards for a specific validator.
* The module transfers the rewards to the userâs account.
### 3. Undelegate RISE (Non-Voting)
[Section titled â3. Undelegate RISE (Non-Voting)â](#3-undelegate-rise-non-voting)
* User sends a `MsgNonVotingUndelegate` transaction to withdraw their delegated RISE.
* The module processes the undelegation request, and the tokens become available after an unbonding period.
### 4. Create Validator (Optional)
[Section titled â4. Create Validator (Optional)â](#4-create-validator-optional)
* A user can send a `MsgCreateValidator` transaction to register a new validator node on the network.
## Sequence Diagram: Non-Voting Delegation and Rewards
[Section titled âSequence Diagram: Non-Voting Delegation and Rewardsâ](#sequence-diagram-non-voting-delegation-and-rewards)
```
sequenceDiagram
participant User
participant ShareclassModule as x/shareclass Module
participant StakingModule as x/staking Module
participant BankModule as x/bank Module
User->>ShareclassModule: MsgNonVotingDelegate (RISE)
ShareclassModule->>StakingModule: Delegate to Validator (internally)
ShareclassModule-->>User: Return Shares and Initial Rewards (if any)
loop Reward Period
StakingModule-->>ShareclassModule: Distribute Staking Rewards
end
User->>ShareclassModule: MsgClaimRewards
ShareclassModule->>BankModule: Transfer Rewards to User
ShareclassModule-->>User: Confirm Reward Claim
User->>ShareclassModule: MsgNonVotingUndelegate
ShareclassModule->>StakingModule: Initiate Undelegation (internally)
ShareclassModule-->>User: Confirm Undelegation and Completion Time
```
## Messages
[Section titled âMessagesâ](#messages)
The module provides various message types:
* MsgUpdateParams: Update module parameters (governance operation)
* MsgNonVotingDelegate: Delegate RISE tokens to a validator without voting rights
* MsgNonVotingUndelegate: Undelegate RISE tokens from a non-voting delegation
* MsgClaimRewards: Claim accumulated staking rewards from non-voting delegation
* MsgCreateValidator: Create a new validator in the network
## Queries
[Section titled âQueriesâ](#queries)
The module provides various query endpoints:
* Params: Query module parameters
* CalculateBondingAmount: Calculate tokens that would be bonded for given shares
* CalculateShare: Calculate shares that would be received for given tokens
* AddressBonded: Get total bonded amount for a specific address
* ClaimableRewards: Get claimable rewards for an address from a validator
* AddressUnbonding: Get unbonding delegations for a specific address
See [Github](https://github.com/sunriselayer/sunrise/tree/main/x/shareclass) for details.
# Stable
> The x/stable module manages the minting and burning of a native stablecoin, backed by a basket of accepted collateral assets.
The `x/stable` module manages the minting and burning of a native stablecoin, backed by a basket of accepted collateral assets.
## Key Features
[Section titled âKey Featuresâ](#key-features)
1. **Minting and Burning**:
* Allows minting of the native stablecoin against approved collateral.
* Allows burning of the native stablecoin to redeem collateral.
2. **Collateral Management**:
* Supports a configurable basket of accepted collateral assets, typically IBC denoms.
3. **Permissioned Control**:
* Restricts mint and burn operations to a whitelist of authorized addresses.
4. **Dynamic Exchange Rate**:
* Calculates exchange rates dynamically based on the `exponent` (decimal places) of the involved tokens, ensuring fair value exchange.
5. **On-Chain Auditability**:
* Provides full transparency of all operations and balances for easy auditing.
## Core Concepts
[Section titled âCore Conceptsâ](#core-concepts)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
### Parameters
[Section titled âParametersâ](#parameters)
The `stable` moduleâs behavior is controlled by a set of on-chain parameters:
* **`authority_addresses`** (string\[]): A list of addresses authorized to execute `MsgMint` and `MsgBurn`.
* **`accepted_denoms`** (string\[]): A whitelist of collateral asset denominations that can be deposited to mint the stablecoin. These are typically IBC denoms.
* **`stable_denom`** (string): The denomination of the native stablecoin minted by the module (e.g., `uusdrise`).
### Exchange Rate Calculation
[Section titled âExchange Rate Calculationâ](#exchange-rate-calculation)
The exchange rate between the collateral asset and the native stablecoin is not hardcoded. Instead, it is calculated dynamically using the `exponent` field from the `DenomMetadata` stored in the `x/bank` module.
If `DenomMetadata` is not found for a given token, its exponent is assumed to be `0`. This ensures a fair exchange rate for tokens based on their specified decimal places.
## Workflow: Minting and Burning
[Section titled âWorkflow: Minting and Burningâ](#workflow-minting-and-burning)
### Sequence Diagram
[Section titled âSequence Diagramâ](#sequence-diagram)
```
sequenceDiagram
participant Authority as Authorized Address
participant StableModule as x/stable Module
participant BankModule as x/bank Module
note over Authority, BankModule: Mint Process
Authority->>StableModule: MsgMint
activate StableModule
StableModule->>BankModule: Transfer collateral from Authority to Module Account
StableModule->>BankModule: Mint stablecoin to Module Account
StableModule->>BankModule: Send stablecoin from Module Account to Authority
deactivate StableModule
note over Authority, BankModule: Burn Process
Authority->>StableModule: MsgBurn
activate StableModule
StableModule->>BankModule: Transfer stablecoin from Authority to Module Account
StableModule->>BankModule: Burn stablecoin from Module Account
StableModule->>BankModule: Send collateral from Module Account to Authority
deactivate StableModule
```
## Messages
[Section titled âMessagesâ](#messages)
The module supports the following messages:
* **MsgMint**
* **Action**: An authorized sender deposits collateral to mint the native stablecoin.
* **Process**: 1. Verifies the `sender` is in `authority_addresses`. 2. Confirms all deposited denoms are in `accepted_denoms`. 3. Transfers collateral from the sender to the module account. 4. Calculates the corresponding amount of `stable_denom` to mint using the exponent-based exchange rate. 5. Mints the calculated amount of `stable_denom` and sends it to the `sender`.
* **MsgBurn**
* **Action**: An authorized sender burns the native stablecoin to receive a chosen collateral asset.
* **Process**: 1. Verifies the `sender` is an authority. 2. Confirms the requested `output_denom` is in `accepted_denoms`. 3. Transfers the `input_amount` of stablecoin from the sender to the module and burns it. 4. Calculates the corresponding amount of `output_denom` to return using the exponent-based exchange rate. 5. Transfers the calculated collateral amount from the module account to the `sender`.
## Queries
[Section titled âQueriesâ](#queries)
The module provides various query endpoints:
* **Params**: Query the current module parameters.
* **ModuleAccountBalance**: Query the balance of all collateral assets held by the module account.
## Auditability
[Section titled âAuditabilityâ](#auditability)
All mint and burn operations, collateral balances held by the module, and the total supply of the stablecoin are publicly accessible on-chain. This design ensures that the stablecoin is always transparently and verifiably collateralized by the assets held in the module account.
See [Github](https://github.com/sunriselayer/sunrise/tree/stable/x/stable) for details.
# Swap
> The module x/swap serves the functionalities to swap tokens with the liquidity in the x/liquiditypool module.
The module `x/swap` serves the functionalities to swap tokens with the liquidity in the `x/liquiditypool` module.
## Interface Provider Fee Rewards
[Section titled âInterface Provider Fee Rewardsâ](#interface-provider-fee-rewards)
Any frontend application, wallet, dApp, or protocol that is built on top of the swap module has the ability to earn fees. This incentivizes open, composable infrastructure around the Sunrise AMM.
There are 2 important parameters to note:
* **interface\_fee\_rate**\
A fee, denoted in percentage, that is taken from the total amount of the swap.
* **interface\_provider**\
An address that specifies where the fee will be sent. If no address is provided, no interface fee will be taken.
When executing swaps through Sunrise AMM, you can **capture interface fees** by specifying your own fee recipient, maximizing profit per transaction. This function is designed to reward **any entity that facilitates swap volume**âfrom simple frontends to complex financial protocols.
***
### Swap Message Types
[Section titled âSwap Message Typesâ](#swap-message-types)
There are 2 message types that can be used to specify the amount received or the amount sent.
* **MsgSwapExactAmountIn** - Swap tokens with a specified input amount\
This message allows users to swap tokens by defining the exact amount of input tokens they wish to provide. The corresponding output will be calculated based on the specified input.
* **MsgSwapExactAmountOut** â Swap tokens with a specified output amount
This message enables users to swap tokens by defining the exact amount of output tokens they want to receive. The system will calculate the necessary input amount to achieve the desired output.
***
### Route
[Section titled âRouteâ](#route)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
This module supports Swap Routes with a recursive structure, allowing for complex swaps involving multiple steps, either in sequence (Series) or simultaneously (Parallel). Each step in the route is validated and processed to ensure inputs and outputs are correctly handled.
```typescript
message RoutePool {
uint64 pool_id = 1;
}
message RouteSeries {
repeated Route routes = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
}
message RouteParallel {
repeated Route routes = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
repeated string weights = 2 [
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
}
message Route {
string denom_in = 1;
string denom_out = 2;
oneof strategy {
RoutePool pool = 3;
RouteSeries series = 4;
RouteParallel parallel = 5;
}
}
```
***
### Swap Middleware for ICS20 Token Transfers
[Section titled âSwap Middleware for ICS20 Token Transfersâ](#swap-middleware-for-ics20-token-transfers)
Swap functionality can be automatically triggered by ICS20 token transfer packets. This is similar to IBC Hooks and can be used by any developers who can use ICS20 in any chain (like Solidity IBC Eureka, CosmWasm on Sei, etc.) to interact with the swap module through IBC middleware.
#### Metadata
[Section titled âMetadataâ](#metadata)
A serialized `PacketMetadata` JSON string needs to be placed in the `memo` field of the ICS20 transfer packet.
```typescript
type PacketMetadata = {
[namespace: string]: unknown;
swap?: SwapMetadata;
};
type SwapMetadata = {
interface_provider: string;
route: Route;
forward?: ForwardMetadata;
} & (
| {
exact_amount_in: {
min_amount_out: string;
};
}
| {
exact_amount_out: {
amount_out: string;
change?: ForwardMetadata;
};
}
);
type ForwardMetadata = {
receiver: string;
port: string;
channel: string;
timeout: string;
retries: number;
next?: PacketMetadata;
};
```
The `ForwardMetadata` is derived from the [Packet Forward Middleware](https://github.com/cosmos/ibc-apps/tree/main/middleware/packet-forward-middleware).
## **Sequence diagrams**
[Section titled âSequence diagramsâ](#sequence-diagrams)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
### Basic Swap Without Forwarding
[Section titled âBasic Swap Without Forwardingâ](#basic-swap-without-forwarding)
In this scenario, the token transfer occurs, followed by a swap, but there is no forwarding to another chain.
```
sequenceDiagram
autonumber
Chain A ->> Sunrise: Transfer token X
Sunrise --> Sunrise: recv_packet
Sunrise ->> Sunrise: Swap token X to token Y
Sunrise ->> Chain A: ack
```
#### Swap with Forwarding
[Section titled âSwap with Forwardingâ](#swap-with-forwarding)
In this scenario, the token is transferred, swapped, and then forwarded to another chain.
```
sequenceDiagram
autonumber
Chain A ->> Sunrise: Transfer token X
Sunrise --> Sunrise: recv_packet
Sunrise ->> Sunrise: Swap token X to token Y
Sunrise ->> Chain B: Forward token Y
Chain B --> Chain B: recv_packet
Chain B ->> Sunrise: ack
Sunrise ->> Chain A: ack
```
#### Swap with Excess Refunded and Forwarding
[Section titled âSwap with Excess Refunded and Forwardingâ](#swap-with-excess-refunded-and-forwarding)
When a swap specifies an exact output amount, any excess input is automatically refunded. After the swap, the remaining tokens are forwarded to another chain.
```
sequenceDiagram
autonumber
Chain A ->> Sunrise: Transfer token X
Sunrise --> Sunrise: recv_packet
Sunrise ->> Sunrise: Swap token X to token Y
Sunrise ->> Chain A: Change token X
Sunrise ->> Chain B: Forward token Y
Chain A --> Chain A: recv_packet
Chain B --> Chain B: recv_packet
Chain A ->> Sunrise: ack
Chain B ->> Sunrise: ack
Sunrise ->> Chain A: ack
```
### Receiver Address Handling
[Section titled âReceiver Address Handlingâ](#receiver-address-handling)
After the swap, even if a subsequent change or transfer fails, the confirmation of âtoken X transferâ will always succeed. The swapped tokens remain in the receiverâs account.
## Messages
[Section titled âMessagesâ](#messages)
The module provides various message types:
* MsgUpdateParams: Update module parameters (governance operation)
* MsgSwapExactAmountIn: Swap tokens with a specified input amount
* MsgSwapExactAmountOut: Swap tokens with a specified output amount
## Queries
[Section titled âQueriesâ](#queries)
The module provides various query endpoints:
* Params: Query module parameters
* IncomingInFlightPacket: Get details of an incoming in-flight packet
* IncomingInFlightPackets: List all incoming in-flight packets
* OutgoingInFlightPacket: Get details of an outgoing in-flight packet
* OutgoingInFlightPackets: List all outgoing in-flight packets
* CalculationSwapExactAmountIn: Preview swap with exact input amount
* CalculationSwapExactAmountOut: Preview swap with exact output amount
See [Github](https://github.com/sunriselayer/sunrise/tree/main/x/swap) for more details.
# Token Converter
> The x/tokenconverter module enables seamless conversion between vRISE and RISE tokens on the Sunrise blockchain. This module plays a crucial role in the ecosystem by allowing us...
The `x/tokenconverter` module enables seamless conversion between `vRISE` and `RISE` tokens on the Sunrise blockchain. This module plays a crucial role in the ecosystem by allowing users to convert between the staking token and the fee token while maintaining an equivalent value relationship.
## Key Features
[Section titled âKey Featuresâ](#key-features)
1. **Bidirectional Token Conversion:**
* Convert `vRISE` (bond denomination) to `RISE` (fee denomination) and vice versa.
* Maintain a 1:1 equivalent value relationship between the tokens.
2. **Permissionless Operation:**
* Any user can perform token conversions at any time.
* No slippage or fees applied to the conversion process.
## Core Functionality
[Section titled âCore Functionalityâ](#core-functionality)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
### Token Conversion
[Section titled âToken Conversionâ](#token-conversion)
The module provides a simple and direct conversion mechanism between `vRISE` and `RISE` tokens:
* When converting vRISE to RISE, the module burns vRISE and mints an equivalent amount of RISE.
* When converting RISE to vRISE, the module burns RISE and mints an equivalent amount of vRISE. (Not available for users)
This process maintains the total economic value in the system while allowing users to hold the token type that best suits their needs.
## Workflow: Token Conversion Process
[Section titled âWorkflow: Token Conversion Processâ](#workflow-token-conversion-process)
> **Note:** The following section covers advanced topics intended for experienced users or developers.
```
sequenceDiagram
participant User
participant TokenConverter as x/tokenconverter Module
participant BankKeeper as Bank Module
User->>TokenConverter: MsgConvert
TokenConverter->>BankKeeper: Burn vRISE Tokens
TokenConverter->>BankKeeper: Mint RISE Tokens
TokenConverter->>User: Return Converted RISE Tokens
```
## Messages
[Section titled âMessagesâ](#messages)
The module provides various message types:
* MsgUpdateParams: Update module parameters (governance operation)
* MsgConvert: Convert tokens between bond and fee denominations
### MsgConvert
[Section titled âMsgConvertâ](#msgconvert)
Converts tokens between the bond and fee denominations.
```go
type MsgConvert struct {
Sender string
Amount string
}
```
## Benefits
[Section titled âBenefitsâ](#benefits)
1. **Flexible Token Usage:**
* Users can hold tokens in their preferred denomination.
* Seamlessly switch between tokens based on intended use (staking vs fees).
2. **Ecosystem Integration:**
* Supports the DA Fee Abstraction mechanism by allowing conversion between token types.
* Facilitates the operation of other modules in the Sunrise ecosystem.
3. **Simple Design:**
* Straightforward conversion with no fees or slippage.
* Easy to understand and integrate with applications.
See [Github](https://github.com/sunriselayer/sunrise/tree/main/x/tokenconverter) for details.
# đ Thesis
> There are four layers in a blockchain:
## Monolithic vs Modular
[Section titled âMonolithic vs Modularâ](#monolithic-vs-modular)
There are four layers in a blockchain:
* Execution layer
* Settlement layer
* Consensus layer
* Data Availability layer
âModular blockchainâ is a paradigm that combines these separated layers, and allows us to build a scalable blockchain.
## Data Availability layer
[Section titled âData Availability layerâ](#data-availability-layer)
In short, the Data Availability (DA) layer plays a role of storing transaction data of Layer 2 blockchains until the L2 transactions are finalized in the L1 blockchain.
## Combinations of layers
[Section titled âCombinations of layersâ](#combinations-of-layers)
### Conventional rollup
[Section titled âConventional rollupâ](#conventional-rollup)
Example of Optimism:
| | |
| ----------------------- | -------- |
| Execution layer | Optimism |
| Settlement layer | Ethereum |
| Consensus layer | Ethereum |
| Data Availability layer | Ethereum |
### Smart contract rollup with altDA
[Section titled âSmart contract rollup with altDAâ](#smart-contract-rollup-with-altda)
Example of Eclipse:
| | |
| ----------------------- | -------- |
| Execution layer | Eclipse |
| Settlement layer | Ethereum |
| Consensus layer | Ethereum |
| Data Availability layer | Celestia |
### Sovereign rollup
[Section titled âSovereign rollupâ](#sovereign-rollup)
Example of Gluon:
| | |
| ----------------------- | ------- |
| Execution layer | Gluon |
| Settlement layer | Gluon |
| Consensus layer | Sunrise |
| Data Availability layer | Sunrise |
# AppâChain Thesis: Monolithic vs. Modular
> The appâchain thesis argues that the optimal way to scale Web3 is to give each major application its own blockchain and then connect those chains through an interoperability lay...
The **appâchain thesis** argues that the optimal way to scale Web3 is to give each major application its **own blockchain** and then connect those chains through an **interoperability layerâŻââŻin the Cosmos world, IBC**. While compelling, the original (âmonolithicâ) version of this thesis carries hidden operational costs. A new **modular** approach, powered by sovereign rollups and *RollupâasâaâService* (RaaS), eliminates most of those frictions.
***
## Monolithic AppâChain Thesis
[Section titled âMonolithic AppâChain Thesisâ](#monolithic-appchain-thesis)
> *âEvery serious dApp deserves its own L1.â*
### Advantages
[Section titled âAdvantagesâ](#advantages)
* **Performance isolation** â no gasâcompetition with unrelated apps.
* **Full customisation** â applicationâspecific VM, fee logic, and governance.
* **Native interoperability** â IBC packets for crossâchain calls without trusted bridges.
### Core Weakness â *Validator Bootstrapping*
[Section titled âCore Weakness â Validator Bootstrappingâ](#core-weakness--validator-bootstrapping)
Launching a bespoke L1 requires:
1. **Recruiting a validator set** (dozens of professional operators).
2. **Distributing a native token** with sufficient market cap to incentivise honest behaviour.
3. **Continuous DevOps** â chain upgrades, monitoring, slashing infrastructure, etc.
This overhead slows adoption; many teams stay on shared L1s for simplicity.
***
## Modular AppâChain Thesis
[Section titled âModular AppâChain Thesisâ](#modular-appchain-thesis)
> *âKeep sovereignty, outsource consensus.â*
A **sovereign rollup** publishes its block data to a **shared dataâavailability (DA) layer** (e.g., Celestia, Avail, EigenDA, Sunrise). Security is borrowed from the DA layerâs validator set; the rollup itself only needs a **sequencer** (or shared sequencer network) and application logic.
### Why It Solves Bootstrapping
[Section titled âWhy It Solves Bootstrappingâ](#why-it-solves-bootstrapping)
* **No new validator set** â DA layer provides consensus and economic security.
* **Token optional** â the app token can focus on inâapp utility; it need not secure consensus.
* **RaaS platforms** â Rollkit, Dymension, Eclipse, Sovereign SDK, Saga, etc., automate deployment, upgrades, and monitoring.
### Compatibility with IBC
[Section titled âCompatibility with IBCâ](#compatibility-with-ibc)
Sovereign rollups can embed **IBC lightâclient verification** directly in their state machine, making them *firstâclass citizens* in the Cosmos/IBC mesh even though they are not full L1s.
***
## Smart Contract vs. App Chains â A Hosting Analogy
[Section titled âSmart Contract vs. App Chains â A Hosting Analogyâ](#smart-contract-vs-app-chains--a-hosting-analogy)
| Architecture | Infra Analogy | Operational Impact |
| --------------------------------- | ---------------------- | -------------------------------------------------------------------------------- |
| **Smart Contract** | Shared hosting | Cheapest to deploy but subject to neighbour congestion and generic fee model. |
| **Modular AppâSpecific Chain** | Virtual Private Server | Nearâdedicated resources; security outsourced; inexpensive rollup bootstrap. |
| **Monolithic AppâSpecific Chain** | Dedicated bareâmetal | Complete control and isolation but highest cost to boot and maintain validators. |
As IaaS evolved from VPS to fully managed platforms, **RaaS will commoditise sovereign rollup deployment** until spinning up a dedicated chain is almost as simple as deploying a smart contract today.
***
## Roadmap to a Modular Multichain Future
[Section titled âRoadmap to a Modular Multichain Futureâ](#roadmap-to-a-modular-multichain-future)
1. **Shared Sequencers & MEV markets** â reduce rollup latency and enable crossârollup atomicity.
2. **Universal IBC clients** â Tendermint, Ethereumâstyle SSZ, and ZKâlight clients packaged as reusable modules.
3. **Permissionless DA pricing** â payâperâbyte markets (e.g., Availâs ProofâofâLiquidity) lower fixed costs.
4. **Interârollup composability** â ICSâŻapplications (ICSâ20, ICSâ721, Interchain Accounts) running natively between sovereign rollups.
5. **Turnâkey governance** â onâchain upgrade managers and shared security (e.g., Replicated Security, Babylon BTC staking).
The modular appâchain thesis retains the **sovereignty and customisability** of dedicated chains while achieving **easeâofâdeployment and economic efficiency** unprecedented in earlier models.
# Interoperability in Sovereign Rollups
> Sovereign rollups mark a significant evolution in Layer 2 design. Instead of delegating crossâchain validation to a settlementâlayer bridge contract, a sovereign rollup *runs it...
Sovereign rollups mark a significant evolution in LayerâŻ2 design.âŻInstead of delegating crossâchain validation to a settlementâlayer bridge contract, a sovereign rollup *runs its own lightâclient verification* of counterpart chains and therefore decidesâat the application levelâ*how* and *with whom* it communicates. This architecture preserves rollup autonomy while still allowing trustâminimised data availability (DA) and settlement on an external layer.
***
## Traditional SmartâContract Rollups
[Section titled âTraditional SmartâContract Rollupsâ](#traditional-smartcontract-rollups)
In a classical optimistic/ZK rollup, every crossâchain action must pass through **one hardâcoded âenshrinedâ bridge** that lives on the LayerâŻ1 settlement chain.
**Execution path**
1. **Rollup contract on L1** â stores state roots and bridge logic.
2. **Proof/optimistic window** â rollup posts proofs or roots; the bridge contract adjudicates fraud/ZK proofs.
3. **Outbound transfers** â users lock assets inside the bridge; withdrawal proofs are verified by the contract.
4. **Upgrade friction** â any change to bridge semantics requires an L1 contract upgrade (often via governance hard fork).
**Limitations**
* **Singleâpoint trust** â the bridge contract becomes systemic risk.
* **No heterogeneous bridges** â applications cannot add new channels without L1 governance.
* **Wrapped assets** â most bridges mint IOU tokens instead of native transfers.
* **Throughput bottleneck** â all messages queue in the same contract; gas spikes propagate to rollup users.
***
## Sovereign Rollups
[Section titled âSovereign Rollupsâ](#sovereign-rollups)
A sovereign rollup publishes its data (blobs, state roots) to a DA layer but *selfâverifies* other chains via onâchain light clients or validity proofs. Bridges become regular modules that can be permissionlessly deployed and upgraded.
### Technical Properties
[Section titled âTechnical Propertiesâ](#technical-properties)
| Capability | Implementation Detail |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| **Selfâsovereign verification** | Embedded light client or ZK verifier for each remote chain; no dependency on an external bridge contract. |
| **Multiple protocols** | Support for IBC, custom SNARK bridges, or tokenâspecific channels in parallel. |
| **Native asset movement** | Lightâclient verification lets the rollup unlock *original* tokens, avoiding wrapped IOUs. |
| **Composable channels** | Each application can instantiate independent channels with custom fee logic, rate limits, or middleware. |
| **Decoupled upgrades** | Bridge logic is a rollup module; upgrading does **not** require L1 governanceâonly rollup governance or code update. |
***
## IBCÂ â DeâFacto Standard for Sovereign Interoperability
[Section titled âIBCÂ â DeâFacto Standard for Sovereign Interoperabilityâ](#ibc-defacto-standard-for-sovereign-interoperability)
The **InterâBlockchain Communication (IBC)** protocol (originating in the Cosmos SDK) provides:
* **ClientâConnectionâChannel abstraction** â layered handshake that cleanly separates authentication (light clients) from application semantics.
* **Commitâonly light clients** â each chain stores the other chainâs header commitments and verifies Merkle proofs onâchain.
* **Permissionless relayers** â offâchain processes broadcast packets; any actor can relay without gaining trust power.
* **ORDERED / UNORDERED channels** â deterministic packet sequencing suited for both fungible tokens (ICSâ20) and arbitrary data (ICSâ27, ICSâ721, etc.).
* **Timeout & upgrade paths** â channels can close on misbehaviour; light clients autonomously upgrade using onâchain proof of new client state.
Because sovereign rollups already own their state transition function, integrating IBC requires only:
1. Importing an IBC *core* module (client, connection, channel logic).
2. Supplying a lightâclient implementation for each counterparty (e.g., TendermintâBFT, zkâbased header proof, EthereumâSSZ).
3. Defining application modules (token transfers, crossârollup DEX, etc.) that marshal packets.
***
## Comparison: Traditional vs. Sovereign Interoperability
[Section titled âComparison: Traditional vs. Sovereign Interoperabilityâ](#comparison-traditional-vs-sovereign-interoperability)
| Feature | Traditional Rollups | Sovereign Rollups |
| -------------------- | --------------------------- | ---------------------------------------- |
| Bridge Authority | L1 settlement layer | Selfâsovereign verification |
| Bridge Customisation | Limited or none | Fully customizable |
| Protocol Support | Proprietary, single bridge | Multiple (IBC, ZK bridges, custom) |
| Asset Types | Often limited to tokens | Tokens, NFTs, arbitrary data packets |
| Security Model | Inherits L1 bridge contract | Choice of lightâclient or validity proof |
| Upgrade Path | Dependent on L1 governance | Independentârollupâlevel governance |
***
## Sovereign Rollup Tooling & Ecosystem
[Section titled âSovereign Rollup Tooling & Ecosystemâ](#sovereign-rollup-tooling--ecosystem)
| Framework / Component | Interoperability Features |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Rollkit** | Plugâandâplay modular rollup framework; native IBC wiring; supports Tendermint, Celestia, and Sunrise DA backâends. |
| **SovereignâŻSDK** | Rust toolkit for zeroâknowledge or fraudâproof sovereign chains; ships generic IBC lightâclient traits and relayer hooks. |
| **Sunrise DA** | Provides data availability with ProofâŻofâŻLiquidity (PoL); exposes an IBC interface so sovereign rollups built on Sunrise inherit connectivity to the broader IBC mesh. |
| **Application Patterns** | *CrossâChain DeFi* (omniâliquidity pools), *Interoperable Gaming* (asset portability), *MultiâChain Identity* (DID packets), *ChainâAgnostic DAOs* (governance spanning multiple rollups). |
# đČ USDrise
> USDrise is the native stablecoin of the Sunrise protocol, issued by wrapping noble's USDN. This document provides an overview of USDrise, its features, and how it integrates int...
USDrise is the native stablecoin of the Sunrise protocol, issued by wrapping nobleâs USDN. This document provides an overview of USDrise, its features, and how it integrates into the Sunrise ecosystem.
## Overview
[Section titled âOverviewâ](#overview)
USDrise is designed to be a stable and reliable medium of exchange within the Sunrise protocol. It aims to maintain a 1:1 peg with the US Dollar.
There are two primary ways to acquire USDrise:
1. **Swap:** Users can also obtain USDrise by swapping other tokens, such as USDC, USDN, or RISE, through the `x/swap` module within the Sunrise ecosystem.
2. **Mint:** The issuance and burning of USDrise are managed by the `x/stable` module, which requires interaction through an authorized contract. Users can mint USDrise by depositing USDN at a fixed exchange rate of 1 USDN = 1 USDrise. This process ensures transparency and control over the token supply.
For more detailed information on the `x/stable` module, please refer to the [x/stable module documentation](/learn/sunrise/stable).
## Key Features
[Section titled âKey Featuresâ](#key-features)
* **Transaction Fees:** All transaction fees within the Sunrise protocol are paid in USDrise, making it a central component of the networkâs economy.
* **Yield Generation:** Because USDrise is collateralized with USDN, it generates yield that is distributed to RISE and vRISE stakers.
## Fee Mechanism and Distribution
[Section titled âFee Mechanism and Distributionâ](#fee-mechanism-and-distribution)
USDrise serves as the primary token for transaction fees within the Sunrise ecosystem. The collected fees, along with yield from the underlying USDN, are distributed to stakeholders, creating a sustainable economic loop.
```
graph TD;
subgraph Revenue Collection
User -- "Pay Fee in USDrise" --> Transaction;
Transaction -- "Collect Fee" --> FeeCollector["FeeCollector Module"];
USDN_Yield["USDN Yield"] -- "Accumulates" --> FeeCollector;
end
subgraph Fee & Yield Processing
FeeCollector -- "A portion of fees for burning" --> SwapModule;
SwapModule -- "Swap USDrise to RISE" --> Burn[("đ„ Burn RISE")];
FeeCollector -- "Remaining Funds (Fees + Yield)" --> Distribution;
Distribution -- "Rewards" --> vRISE_Stakers["vRISE Stakers"];
Distribution -- "Rewards" --> RISE_Stakers["RISE Stakers"];
end
style Burn fill:#ffcccc,stroke:#333,stroke-width:2px
```
### Flow Breakdown
[Section titled âFlow Breakdownâ](#flow-breakdown)
1. **Revenue Collection:** The `FeeCollector` module account accumulates funds from two primary sources:
* **Transaction Fees:** Users pay transaction fees in **USDrise**.
* **USDN Yield:** The yield generated from the underlying USDN backing USDrise is also directed to the `FeeCollector`.
2. **Burn Mechanism:** Based on the `burn_ratio` parameter in the `x/fee` module, a portion of the collected **fees** is swapped for **RISE** and subsequently burned. This acts as a deflationary mechanism for RISE.
3. **Reward Distribution:** All remaining funds in the `FeeCollector` (the portion of fees not burned, plus all USDN yield) are distributed as rewards to both **vRISE** and **RISE** stakers, incentivizing participation in governance and network security.
This process ensures that the usage of the network directly contributes to the value of the native tokens and rewards its most committed participants.
For more detailed information on the `x/fee` module, please refer to the [x/fee](/learn/sunrise/fee).
## About USDN
[Section titled âAbout USDNâ](#about-usdn)
USDrise is backed by Noble Dollar (USDN), a stablecoin from the noble network. It is important for users to understand the mechanics and risks associated with USDN. We strongly encourage users to conduct their own research on USDN to make informed decisions.
Noble Dollar (USDN) is a stablecoin built on the foundation of composable yield. USDN leverages the M^0 Protocol to deliver stablecoin yield collateralized by short term U.S. Treasury Bills. USDN is purpose built for the modular ecosystem and is constructed to allow yield to be directed in a customizable, programmatic and transparent fashion.
For more information, please refer to the official documentation from Noble: [Noble Dollar (USDN)](https://www.noble.xyz/usdn)
## Related Documents
[Section titled âRelated Documentsâ](#related-documents)
* [**x/stable Module**](/learn/sunrise/stable)
# Sunrise Network
> This section provides details about the official networks operated by the Sunrise Layer team.
This section provides details about the official networks operated by the Sunrise Layer team.
* [Mainnet](/run-a-sunrise-node/networks/mainnet)
* [Testnet](/run-a-sunrise-node/networks/testnet)
# Sunrise Mainnet
> The main network of Sunrise. Use tokens with real value.
Danger
Cosmos Sunrise mainnet shuts down on **5 October 2026 at 12:00 UTC**, at the v2.0.0 upgrade (block **6,504,000**). Holdings are carried over to Sunrise Edge. You do not need to move funds before shutdown.
Details: [Sunrise Edge](https://sunriselayer.io/)
The main network of Sunrise. Use tokens with real value.
## Mainnet Details
[Section titled âMainnet Detailsâ](#mainnet-details)
[sunrise-1 Network Configuration](https://github.com/sunriselayer/network/tree/main/sunrise-1)
[genesis file](https://github.com/sunriselayer/network/blob/main/sunrise-1/genesis.json)
[Snapshot (Provided by Polkachu)](https://www.polkachu.com/tendermint_snapshots/sunrise)
| Detail | Value |
| ------ | ---------------------------------------------------- |
| RPC | |
| REST | |
## Third-party Services
[Section titled âThird-party Servicesâ](#third-party-services)
In addition to the official endpoints, several third parties provide public endpoints and other services for the Sunrise mainnet. For a more comprehensive list of RPC, REST, gRPC endpoints, and explorers, please refer to the [Chain Registry](https://github.com/cosmos/chain-registry/blob/master/sunrise/chain.json).
| Provider | Node Services (Snapshot, Peers, etc.) |
| ------------- | -------------------------------------------------- |
| Polkachu | |
| NodeStake | |
| Krews | |
| MekongLabs | |
| Synergy Nodes | |
## Frontend
[Section titled âFrontendâ](#frontend)
| Name | URL |
| ------------------- | ----------------------------------- |
| APP (Tx Portal) | |
| Risescan (Explorer) | |
## Mainnet Software
[Section titled âMainnet Softwareâ](#mainnet-software)
Please check our proposals and community. See [sunrise-1](https://github.com/sunriselayer/network/tree/main/sunrise-1) for setup. The genesis binary is `v1.0.0`.
[Released Binary](https://github.com/sunriselayer/sunrise/releases)
### Network Upgrade
[Section titled âNetwork Upgradeâ](#network-upgrade)
| Name | Height |
| --------------------------------------------------------------------- | ------ |
| [v1.1.0](https://github.com/sunriselayer/sunrise/releases/tag/v1.1.0) | 234700 |
| [v1.2.0](https://github.com/sunriselayer/sunrise/releases/tag/v1.2.0) | 765000 |
## IBC Config
[Section titled âIBC Configâ](#ibc-config)
| Dst Chain | Dst Port | Dst Channel | Src Chain | Src Port | Src Channel |
| ------------- | ---------- | ------------ | ----------- | ---------- | ----------- |
| `noble-1` | `transfer` | channel-168 | `sunrise-1` | `transfer` | channel-0 |
| `cosmoshub-4` | `transfer` | channel-1421 | `sunrise-1` | `transfer` | channel-1 |
## IBC Denom
[Section titled âIBC Denomâ](#ibc-denom)
| Name | Chain | Original Denom | IBC denom | Decimals |
| ---- | ------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | -------- |
| USDN | `noble-1` | `uusdn` | `ibc/A7AD825A4B48DDA0138D118655E60100D22A4D690C45B95221520B58C9A64B63` | 6 |
| USDC | `noble-1` | `uusdc` | `ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5` | 6 |
| USDY | `noble-1` | `ausdy` | `ibc/AAF322A78A0E34B76CDA05BA9AE96DC1521F9E103EC576AB9931116B2AB8C26B` | 18 |
| ATOM | `cosmoshub-4` | `uatom` | `ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9` | 6 |
| USDT | `cosmoshub-4` | `ibc/E7E51FFF94A8B55BE84CEB0345E5CAF0A5DAEB374C6806CE908098B8996C7782` | `ibc/D4FF12988C31AD8E3D2555621F95C7EB2B6FBAAD2F9487FB11A2A8BBB004B4B3` | 6 |
| WBTC | `cosmoshub-4` | `ibc/D742E8566B0B8CC8F569D950051C09CF57988A88F0E45574BFB3079D41DE6462` | `ibc/0E293A7622DC9A6439DB60E6D234B5AF446962E27CA3AB44D0590603DFF6968E` | 8 |
| WETH | `cosmoshub-4` | `ibc/C0B53D3D23827AE38058BED0BDCD554229278AF530A8D265FCF6DFF7C4B2ADFF` | `ibc/694A6B26A43A2FBECCFFEAC022DEACB39578E54207FDD32005CD976B57B98004` | 18 |
## Mint USDrise from USDN on Mainnet
[Section titled âMint USDrise from USDN on Mainnetâ](#mint-usdrise-from-usdn-on-mainnet)
The address of the contract to mint USDrise is `sunrise14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s2v9j75`. You can mint the same amount of USDrise using USDN.
```bash
sunrised tx wasm execute sunrise14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s2v9j75 \
'{"mint":{"amount":"1000000","recipient":"[your-address]"}}' \
--amount 1000000ibc/A7AD825A4B48DDA0138D118655E60100D22A4D690C45B95221520B58C9A64B63 \
--from=[your-account] --chain-id=sunrise-1\
--gas-prices=0.025uusdrise --gas-adjustment=1.5 --gas=auto -y
```
## Redeem USDrise to USDN on Mainnet
[Section titled âRedeem USDrise to USDN on Mainnetâ](#redeem-usdrise-to-usdn-on-mainnet)
The address of the contract to redeem USDrise to USDN is `sunrise14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s2v9j75`. You can redeem the same amount of USDN using USDrise.
```bash
sunrised tx wasm execute sunrise14hj2tavq8fpesdwxxcu44rty3hh90vhujrvcmstl4zr3txmfvw9s2v9j75 \
'{"burn":{"amount":"1000000"}}' \
--amount 1000000uusdrise \
--from=[your-account] --chain-id=sunrise-1 \
--gas-prices=0.025uusdrise --gas-adjustment=1.5 --gas=auto -y
```
# Sunrise Testnets
> Important: This is a testnet. Tokens on this network are for testing purposes only and have no real-world value. The network state may be reset at any time for bug fixes or upgr...
## Dawn Testnet
[Section titled âDawn Testnetâ](#dawn-testnet)
Caution
**Important**: This is a testnet. Tokens on this network are for testing purposes only and have no real-world value. The network state may be reset at any time for bug fixes or upgrades, and its persistence is not guaranteed.
This network is used to test some functions on the mainnet.
### Dawn Testnet Details
[Section titled âDawn Testnet Detailsâ](#dawn-testnet-details)
[dawn-1 Network Details](https://github.com/sunriselayer/network/tree/main/dawn-1)
| Detail | Value |
| ------ | ----------------------------------------- |
| RPC | |
| REST | |
### Dawn Testnet Frontend
[Section titled âDawn Testnet Frontendâ](#dawn-testnet-frontend)
| Name | URL |
| -------------------- | ----------------------------------------- |
| Dawn APP (Tx Portal) | |
| Risescan (Explorer) | |
### Dawn Testnet Software
[Section titled âDawn Testnet Softwareâ](#dawn-testnet-software)
Please check our proposals and community. See [dawn-1 Github](https://github.com/sunriselayer/network/tree/main/dawn-1) for setup.
[Released Binary](https://github.com/sunriselayer/sunrise/releases)
### Dawn Testnet Faucet
[Section titled âDawn Testnet Faucetâ](#dawn-testnet-faucet)
RISE & USDrise faucet is available for Dawn testnet. This faucet is provided within the Dawn APP.
To use it, it must be signed in a wallet that has at least 0.01 ETH on the Ethereum mainnet. No cost.
### Mint USDrise from USDN on Dawn Testnet
[Section titled âMint USDrise from USDN on Dawn Testnetâ](#mint-usdrise-from-usdn-on-dawn-testnet)
The address of the contract to mint USDrise is `sunrise1suhgf5svhu4usrurvxzlgn54ksxmn8gljarjtxqnapv8kjnp4nrs4ef8ka`. You can mint the same amount of USDrise using USDN.
```bash
sunrised tx wasm execute sunrise1suhgf5svhu4usrurvxzlgn54ksxmn8gljarjtxqnapv8kjnp4nrs4ef8ka \
'{"mint":{"amount":"1000000","recipient":"[your-address]"}}' \
--amount 1000000ibc/A7AD825A4B48DDA0138D118655E60100D22A4D690C45B95221520B58C9A64B63 \
--from=[your-account] --gas-prices=0.025uusdrise --gas-adjustment=1.2 --gas=auto -y
```
### IBC Config on Dawn Testnet
[Section titled âIBC Config on Dawn Testnetâ](#ibc-config-on-dawn-testnet)
| Dst Chain | Dst Port | Dst Channel | Src Chain | Src Port | Src Channel |
| ---------- | ---------- | ------------- | --------- | ---------- | ----------- |
| `grand-1` | `transfer` | `channel-554` | `dawn-1` | `transfer` | `channel-0` |
| `provider` | `transfer` | `channel-493` | `dawn-1` | `transfer` | `channel-1` |
`grand-1` is current Noble testnet [Grand-1 Testnet](https://www.noble.xyz/dev-hub) [Noble Testnet chain-registry](https://github.com/cosmos/chain-registry/tree/master/testnets/nobletestnet)
`provider` is current CosmosHub testnet [Cosmos ICS Provider Testnet](https://hub.cosmos.network/main/hub-tutorials/join-testnet) [provider chain-registry](https://github.com/cosmos/chain-registry/tree/master/testnets/cosmosicsprovidertestnet)
## IBC Denom on Dawn Testnet
[Section titled âIBC Denom on Dawn Testnetâ](#ibc-denom-on-dawn-testnet)
| Name | Chain | Original Denom | IBC denom |
| ---- | ---------- | -------------- | ---------------------------------------------------------------------- |
| USDN | `grand-1` | `uusdn` | `ibc/A7AD825A4B48DDA0138D118655E60100D22A4D690C45B95221520B58C9A64B63` |
| USDC | `grand-1` | `uusdc` | `ibc/8E27BA2D5493AF5636760E354E46004562C46AB7EC0CC4C1CA14E9E20E2545B5` |
| ATOM | `provider` | `uatom` | `ibc/C4CFF46FD6DE35CA4CF4CE031E643C8FDC9BA4B99AE598E9B0ED98FE3A2319F9` |
## Deprecated Testnets
[Section titled âDeprecated Testnetsâ](#deprecated-testnets)
### DA Testnet
[Section titled âDA Testnetâ](#da-testnet)
Caution
`sunrise-test-da-1`, `sunrise-test-da-2`, `sunrise-test-da-3`, `sunrise-test-da-4`, `sunrise-test-da-5` is deprecated. Please use `dawn-1` instead.
This network is used to test Data Availability functions on the mainnet.
### Incentivized Testnet 0.2
[Section titled âIncentivized Testnet 0.2â](#incentivized-testnet-02)
Caution
**IMPORTANT**: This testnet is closed on May 21, 2025 at 0:00 UTC. Currently only the DA 3 Testnet is running.
This network is used to test operations on the mainnet. Normally, the same environment as the mainnet is provided, but tokens have no value.
### Incentivized Testnet 0.2 Details
[Section titled âIncentivized Testnet 0.2 Detailsâ](#incentivized-testnet-02-details)
[sunrise-test-0.2 Network Details](https://github.com/sunriselayer/network/tree/main/sunrise-test-0.2)
| Detail | Value |
| ------ | ------------------------------------------------ |
| RPC | |
| REST | |
In some cases b-d is also in operation; check with [RiseScan](https://testnet.risescan.sunriselayer.io/).
### Incentivized Testnet 0.2 Software
[Section titled âIncentivized Testnet 0.2 Softwareâ](#incentivized-testnet-02-software)
Please check our proposals and community. See [sunrise-test-0.2](https://github.com/sunriselayer/network/tree/main/sunrise-test-0.2) for setup. Currently, Testnet uses v0.2.x binaries for blockchain compatibility.
[Released Binary](https://github.com/sunriselayer/sunrise/releases)
# Resources
> Since cosmos-sdk v0.50.0, only internal connection is allowed by default. To publish, be sure to rewrite it as follows
## Ports
[Section titled âPortsâ](#ports)
### Consensus
[Section titled âConsensusâ](#consensus)
| Port | Protocol | Detail | Default Value | Location |
| ----- | -------- | ------ | ----------------------- | ------------------------------- |
| 9090 | TCP | gRPC | `localhost:9090` | `~/.sunrise/config/app.toml` |
| 1317 | TCP | REST | `tcp://localhost:1317` | `~/.sunrise/config/app.toml` |
| 26657 | TCP | RPC | `tcp://127.0.0.1:26657` | `~/.sunrise/config/config.toml` |
Note
Since cosmos-sdk v0.50.0, only internal connection is allowed by default. To publish, be sure to rewrite it as follows `0.0.0.0:9090`, `tcp://0.0.0.0:1317`, `tcp://0.0.0.0:26657`
### Data Availability
[Section titled âData Availabilityâ](#data-availability)
| Port | Protocol | Detail | Enabled by Default | Flag |
| ----- | -------- | ------------ | ------------------ | ----------------------- |
| 2121 | TCP/UDP | P2P | true | N/A |
| 26658 | HTTP | RPC | true | `--rpc.port string` |
| 26659 | HTTP | REST Gateway | false | `--gateway.port string` |
# Environment
> This is development environment to run Sunrise software. This environment can be used for development, building binaries, and running nodes.
This is development environment to run Sunrise software. This environment can be used for development, building binaries, and running nodes.
## Install Dependencies
[Section titled âInstall Dependenciesâ](#install-dependencies)
### Ubuntu
[Section titled âUbuntuâ](#ubuntu)
```bash
sudo apt update
sudo apt install -y tar wget aria2 clang pkg-config libssl-dev jq build-essential git make ncdu
```
### Install Golang
[Section titled âInstall Golangâ](#install-golang)
Install Golang
```bash
wget https://go.dev/dl/go1.24.2.linux-amd64.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.24.2.linux-amd64.tar.gz
rm go1.24.2.linux-amd64.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bashrc
source $HOME/.bashrc
```
Check Go version
```bash
go version
```
# Upgrade
> Sunrise is upgraded with on-chain governance.
Sunrise is upgraded with on-chain governance.
## Soft Fork
[Section titled âSoft Forkâ](#soft-fork)
In the case of a soft fork, the chain ID is not changed, and the binary version is changed. In addition, the upgrade handler will handle the process. The details will be described in each upgrade proposal.
Automatic upgrade is available when running Cosmovisor. See [the Cosmovisor tutorial](/run-a-sunrise-node/types/consensus/setup-cosmovisor) for how to set up.
If you do not use CosmoVisor, please change the binaries yourself
## Hard Fork
[Section titled âHard Forkâ](#hard-fork)
A hard fork may be executed to apply changes that cannot be accommodated by a soft fork.
`genesis.json` is changed and the new block starts at height 1. In many cases the chain ID will be changed.
## Testnet
[Section titled âTestnetâ](#testnet)
When synchronizing chains from the genesis, follow this guide and use the binary version current at the time of the genesis.
## Mainnet
[Section titled âMainnetâ](#mainnet)
When synchronizing chains from the genesis, follow this guide and use the binary version current at the time of the genesis.
For the currently used binary version, please refer to the latest release on [GitHub](https://github.com/sunriselayer/sunrise/releases).
# Overview to running nodes on Sunrise
> There are many ways you can participate in the Sunrise [networks](/run-a-sunrise-node/networks).
There are many ways you can participate in the Sunrise [networks](/run-a-sunrise-node/networks). Sunrise node operators can run several options on the network.
## Consensus
[Section titled âConsensusâ](#consensus)
* [Validator node](/run-a-sunrise-node/types/consensus/validator-node): This type of node participates in consensus by producing and voting on blocks.
* [Full consensus node](/run-a-sunrise-node/types/consensus/full-consensus-node): A sunrise-app Full node to sync blockchain history.
## Requirements
[Section titled âRequirementsâ](#requirements)
| Type | CPU | Architecture | Mem | Disk | Bandwidth |
| -------------- | ------ | ------------ | ---- | ---------- | --------- |
| Validator | 6 Core | x86\_64 | 8 GB | 500 GB SSD | 1 Gbps |
| Full Consensus | 4 Core | x86\_64 | 8 GB | 250 GB SSD | 1 Gbps |
You can learn more about how to set up each different node by going through each tutorial guide.
# Consensus Nodes
> Data Availability Layer: In addition to standard consensus tasks, Validator Nodes on Sunrise are responsible for verifying data for the Data Availability (DA) layer. This requir...
## Overview
[Section titled âOverviewâ](#overview)
* [Validator node](/run-a-sunrise-node/types/consensus/validator-node): This type of node participates in consensus by producing and voting on blocks.
* [Full consensus node](/run-a-sunrise-node/types/consensus/full-consensus-node): A sunrise-app Full node to sync blockchain history.
Note
**Data Availability Layer**: In addition to standard consensus tasks, Validator Nodes on Sunrise are responsible for verifying data for the Data Availability (DA) layer. This requires running additional daemons alongside the main `sunrised` process. See the [validator documentation](/build/validators) for more details.
### Requirements
[Section titled âRequirementsâ](#requirements)
| Type | CPU | Architecture | Mem | Disk | Bandwidth |
| -------------- | ------ | ------------ | ---- | ---------- | --------- |
| Validator | 6 Core | x86\_64 | 8 GB | 500 GB SSD | 1 Gbps |
| Full Consensus | 4 Core | x86\_64 | 8 GB | 250 GB SSD | 1 Gbps |
# Full Consensus Node
> Full consensus nodes allow you to sync blockchain history in the Sunrise consensus layer.
Full consensus nodes allow you to sync blockchain history in the Sunrise consensus layer.
## Chain upgrades
[Section titled âChain upgradesâ](#chain-upgrades)
For streamline chain upgrades and minimize downtime, you may want to set up [Cosmovisor](https://docs.cosmos.network/main/build/tooling/cosmovisor) to manage your node.
Follow [Cosmovisor tutorial](/run-a-sunrise-node/types/consensus/setup-cosmovisor)
To automate on-chain upgrades, set the following options.
```yml
DAEMON_ALLOW_DOWNLOAD_BINARIES=true
```
## Backups
[Section titled âBackupsâ](#backups)
If you are using a recent version of Cosmovisor, then the default configuration is that a state backup will be created before upgrades are applied. This can be turned off using [environment flags](https://docs.cosmos.network/main/build/tooling/cosmovisor#command-line-arguments-and-environment-variables).
## Alerting and monitoring
[Section titled âAlerting and monitoringâ](#alerting-and-monitoring)
Alerting and monitoring are desirable as well - you are encouraged to explore solutions and find one that works for your setup. Prometheus is available out-of-the-box, and there are a variety of open-source tools.
## Hardware requirements
[Section titled âHardware requirementsâ](#hardware-requirements)
The following hardware minimum requirements are recommended for running the validator node:
* Memory: 8 GB RAM (minimum)
* CPU: 4 cores
* Disk: 250 GB SSD Storage
* Bandwidth: 1 Gbps for Download/1 Gbps for Upload
If you are not using pruning, you are running an archive node, and it is recommended to have 500 GB of SSD storage.
## Dependencies
[Section titled âDependenciesâ](#dependencies)
The tutorial is done on Ubuntu 22.04 (LTS). Follow [the environment tutorial](/run-a-sunrise-node/resources/environment)
## Run the full consensus node
[Section titled âRun the full consensus nodeâ](#run-the-full-consensus-node)
### Install
[Section titled âInstallâ](#install)
[Install Go](https://go.dev/doc/install) 1.24.2
```bash
git clone https://github.com/sunriselayer/sunrise.git
cd sunrise
git checkout $TAG
make install
```
Note
When synchronizing from the genesis, use the binary version as of the genesis. If you are using snapshots, you must check the height of the snapshot and use the binary at that height.
See [upgrade doc](/run-a-sunrise-node/resources/upgrade) for more details.
### Initialize
[Section titled âInitializeâ](#initialize)
Set `chain-id` & `moniker`. `moniker` is just a name for your node.
```bash
CHAIN_ID=sunrise-1 // mainnet
MONIKER="node-name"
sunrised init "$MONIKER" --chain-id $CHAIN_ID
```
This will generate the following files in `~/.sunrise/config/`
* `genesis.json`
* `node_key.json`
* `priv_validator_key.json`
## Download the genesis file
[Section titled âDownload the genesis fileâ](#download-the-genesis-file)
Check the `genesis.json` of the currently running network on [our Github](https://github.com/sunriselayer/network)
Example: For mainnet:
```bash
rm ~/.sunrise/config/genesis.json
curl -L https://raw.githubusercontent.com/sunriselayer/network/main/sunrise-1/genesis.json -o ~/.sunrise/config/genesis.json
```
### Set minimum gas prices
[Section titled âSet minimum gas pricesâ](#set-minimum-gas-prices)
For RPC nodes and Validator nodes, we recommend setting the following minimum-gas-prices. As we are a permissionless wasm chain, this setting will help protect against contract spam and potential wasm contract attack vectors.
In `\$HOME/.sunrise/config/app.toml`, set minimum gas prices:
```bash
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.025uusdrise\"/" $HOME/.sunrise/config/app.toml
```
Caution
Do NOT set too high gas prices. If you are a validator, your proposed block will not include transactions. This reduces the number of transactions the entire network can process.
### Option: Set seeds & persistent peers
[Section titled âOption: Set seeds & persistent peersâ](#option-set-seeds--persistent-peers)
* Seeds
âSeedsâ provides a list of other validators that a newly joining validator should initially connect to. Once a validator connects to the network, it primarily relies on `persistent_peers` for connections, reducing the importance of `seeds`.
```bash
SEEDS=$(curl -sL https://raw.githubusercontent.com/sunriselayer/network/main/sunrise-1/seeds.txt | tr '\n' ',')
echo $SEEDS
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" $HOME/.sunrise/config/config.toml
```
* Persistent Peers
âPersistent Peersâ is a list of trusted validators that the validator should maintain connections with at all times. Connections to validators listed in persistent\_peers are prioritized to maintain network stability.
```bash
PERSISTENT_PEERS=$(curl -sL https://raw.githubusercontent.com/sunriselayer/network/main/sunrise-1/peers.txt | tr '\n' ',')
echo $PERSISTENT_PEERS
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PERSISTENT_PEERS\"/" $HOME/.sunrise/config/config.toml
```
### Option: Additional settings
[Section titled âOption: Additional settingsâ](#option-additional-settings)
If necessary, Edit config files `\$HOME/.sunrise/config/app.toml`
* Enable defines if the API server should be enabled.
```bash
sed -i '/\[api\]/,+3 s/enable = false/enable = true/' $HOME/.sunrise/config/app.toml;
```
* EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk).
```bash
sed -i 's/enabled-unsafe-cors = false/enabled-unsafe-cors = true/' $HOME/.sunrise/config/app.toml;
```
* By default, RPC and REST are not public, so if you want to make it a public node, configure as follows
```bash
sed -i 's/address = "localhost:9090"/address = "0.0.0.0:9090"/' $HOME/.sunrise/config/app.toml;
sed -i 's#address = "tcp://localhost:1317"#address = "tcp://0.0.0.0:1317"#' $HOME/.sunrise/config/app.toml;
sed -i 's#laddr = "tcp://127.0.0.1:26657"#laddr = "tcp://0.0.0.0:26657"#' $HOME/.sunrise/config/config.toml;
```
### Storage and pruning configurations
[Section titled âStorage and pruning configurationsâ](#storage-and-pruning-configurations)
If your consensus node is being connected to a sunrise-node bridge node, you will need to enable transaction indexing and retain all block data. This can be achieved with the following settings in `config.toml`.
#### Enable transaction indexing
[Section titled âEnable transaction indexingâ](#enable-transaction-indexing)
```toml
indexer = "kv"
```
#### Retain all block data
[Section titled âRetain all block dataâ](#retain-all-block-data)
And in `app.toml`, `min-retain-blocks` should remain as the default setting:
```toml
min-retain-blocks = 0
```
#### Accessing historical state
[Section titled âAccessing historical stateâ](#accessing-historical-state)
If you want to query the historical state â for example, you might want to know the balance of a wallet at a given height in the past â you should run an archive node with `pruning = "nothing"` in `app.toml`. Note that this configuration is resource-intensive and will require significant storage:
```toml
pruning = "nothing"
```
If you want to save on storage requirements, consider using `pruning = "everything"` in app.toml to prune everything.
```toml
pruning = "everything"
```
### Create (or restore) a local key pair
[Section titled âCreate (or restore) a local key pairâ](#create-or-restore-a-local-key-pair)
Either create a new key pair or restore an existing wallet for your validator:
```bash
# Create new keypair
sunrised keys add
# Restore existing sunrise wallet with mnemonic seed phrase.
# You will be prompted to enter mnemonic seed.
sunrised keys add --recover
# Query the keystore for your public address
sunrised keys show -a
```
Replace `` with a key name of your choosing.
### Get some RISE tokens
[Section titled âGet some RISE tokensâ](#get-some-rise-tokens)
You will require some vRISE tokens to bond to your validator (and some RISE tokens for fees). To be in the active set you will need to have enough tokens.
### Start the consensus node
[Section titled âStart the consensus nodeâ](#start-the-consensus-node)
Follow the instructions to set up Cosmovisor and start the node. See [Cosmovisor tutorial](/run-a-sunrise-node/types/consensus/setup-cosmovisor)
Note
Using cosmovisor is completely optional. If you choose not to use cosmovisor, you will need to be sure to attend network upgrades to ensure your validator does not have downtime and get jailed.
If you are not using Cosmovisor, run the following:
```bash
sunrised start
```
### Syncing the node
[Section titled âSyncing the nodeâ](#syncing-the-node)
After starting the `sunrised` daemon, the chain will begin to sync to the network. The time to sync to the network will vary depending on your setup and the current size of the blockchain but could take a very long time. To query the status of your node:
```bash
# Query via the RPC (default port: 26657)
curl http://localhost:26657/status | jq .result.sync_info.catching_up
```
This command returning `true` means that your node is still catching up. Otherwise, your node has caught up to the networkâs current block and you are safe to proceed to upgrade to a validator node.
If you want to shorten the time to catch up to the latest block, consider using snapshots from other nodes.
### Option: Use a snapshot
[Section titled âOption: Use a snapshotâ](#option-use-a-snapshot)
If you want to shorten the time to catch up to the latest block, consider using snapshots. Snapshots allow a node to be bootstrapped from a specific height, reducing the need to sync from genesis.
Our partner at [Polkachu](https://www.polkachu.com/tendermint_snapshots/sunrise) provides daily snapshots for the Sunrise network. Please visit their website to get the latest snapshot URL.
# Validator Node (Genesis)
> Validator nodes allow you to participate in consensus in the Sunrise network.
Validator nodes allow you to participate in consensus in the Sunrise network.
Note
You can only join as a validator in this way before the network starts(genesis). If the network has already started, please see [this tutorial](/run-a-sunrise-node/types/consensus/validator-node).
## Hardware requirements
[Section titled âHardware requirementsâ](#hardware-requirements)
The following hardware minimum requirements are recommended for running the validator node:
* Memory: 8 GB RAM (minimum)
* CPU: 6 cores
* Disk: 500 GB SSD Storage
* Bandwidth: 1 Gbps for Download/1 Gbps for Upload
## Run the Node
[Section titled âRun the Nodeâ](#run-the-node)
First, follow the instructions on [setting up a full consensus node](/run-a-sunrise-node/types/consensus/full-consensus-node).
### Optional: Reset working directory
[Section titled âOptional: Reset working directoryâ](#optional-reset-working-directory)
If you have already initialized a working directory for sunrised in the past, you must clean up before reinitialized a new directory. You can do so by running the following command:
```bash
sunrised tendermint unsafe-reset-all
```
### Initialize a working directory
[Section titled âInitialize a working directoryâ](#initialize-a-working-directory)
Check [our Github](https://github.com/sunriselayer/network) to know the current `chain-id` and run the following command:
```bash
CHAIN_ID=sunrise-1
MONIKER="validator-name"
sunrised init "$MONIKER" --chain-id $CHAIN_ID
```
Change `genesis.json` to the one in the network repository.
```bash
wget https://raw.githubusercontent.com/sunriselayer/network/main/sunrise-1/gentx/genesis.json
cp genesis.json $HOME/.sunrise/config/genesis.json
```
### Create a new key
[Section titled âCreate a new keyâ](#create-a-new-key)
```bash
VALIDATOR_WALLET="validator"
sunrised keys add $VALIDATOR_WALLET --keyring-backend test
```
### Create the genesis transaction for new chain
[Section titled âCreate the genesis transaction for new chainâ](#create-the-genesis-transaction-for-new-chain)
```bash
STAKING_AMOUNT=1000000uvrise
sunrised genesis gentx $VALIDATOR_WALLET $STAKING_AMOUNT --chain-id $CHAIN_ID \
--pubkey=$(sunrised tendermint show-validator) \
--moniker=$MONIKER \
--commission-rate=0.1 \
--commission-max-rate=0.2 \
--commission-max-change-rate=0.01 \
--min-self-delegation=1 \
--keyring-backend test
```
You will find the generated gentx JSON file inside `\$HOME/.sunrised/config/gentx/gentx-*.json`
### Create Pull Request to register your gentx
[Section titled âCreate Pull Request to register your gentxâ](#create-pull-request-to-register-your-gentx)
To register your gentx, create a pull-request to the [network repository](https://github.com/sunriselayer/network/tree/main/sunrise-1/gentx).
# Setup Cosmovisor
> For mainnet, it's recommended to use Cosmovisor to run your node.
**For mainnet, itâs recommended to use Cosmovisor to run your node.**
Setting up Cosmovisor is relatively straightforward. However, it does expect certain environment variables and folder structure to be set.\
Cosmovisor allows you to download binaries ahead of time for chain upgrades, meaning that you can do zero (or close to zero) downtime chain upgrades. Itâs also useful if your local timezone means that a chain upgrade will fall at a bad time.\
Rather than having to do stressful ops tasks late at night, itâs always better if you can automate them away, and thatâs what Cosmovisor tries to do.
## Install
[Section titled âInstallâ](#install)
First, go and get cosmovisor (recommended approach):
```bash
# to target a specific version:
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v1.0.0
```
### Add environment variables to your shell
[Section titled âAdd environment variables to your shellâ](#add-environment-variables-to-your-shell)
Some environment variables must be set to appropriate values for each node and each network.
```bash
echo "export DAEMON_NAME=sunrised" >> ~/.profile
echo "export DAEMON_HOME=$HOME/.sunrised" >> ~/.profile
echo "export DAEMON_ALLOW_DOWNLOAD_BINARIES=true" >> ~/.profile
echo "export DAEMON_LOG_BUFFER_SIZE=512" >> ~/.profile
echo "export DAEMON_RESTART_AFTER_UPGRADE=true" >> ~/.profile
echo "export UNSAFE_SKIP_BACKUP=true" >> ~/.profile
```
Then source your profile to have access to these variables:
```bash
source ~/.bash_profile
```
### Set up folder structure
[Section titled âSet up folder structureâ](#set-up-folder-structure)
```bash
mkdir -p $DAEMON_HOME/cosmovisor
mkdir -p $DAEMON_HOME/cosmovisor/genesis
mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin
mkdir -p $DAEMON_HOME/cosmovisor/upgrades
```
### Set up genesis binary
[Section titled âSet up genesis binaryâ](#set-up-genesis-binary)
Cosmovisor needs to know which binary to use at genesis. We put this in `$DAEMON_HOME/cosmovisor/genesis/bin`
Check [our Github](https://github.com/sunriselayer/network) to know the binary version of genesis.
```bash
wget https://github.com/sunriselayer/sunrise/releases/download//sunrised
cp sunrised $DAEMON_HOME/cosmovisor/genesis/bin
```
### Set up service
[Section titled âSet up serviceâ](#set-up-service)
Commands sent to Cosmovisor are sent to the underlying binary. For example, `cosmovisor version` is the same as typing `sunrised version`. Nevertheless, just as we would manage `sunrised` using a process manager, we would like to make sure Cosmovisor is automatically restarted if something happens, for example, an error or reboot. First, create the service file:
```bash
sudo vi /lib/systemd/system/cosmovisor.service
```
Change the contents of the below to match your setup
```bash
[Unit]
Description=Cosmovisor daemon
After=network-online.target
[Service]
Environment="DAEMON_NAME=sunrised"
Environment="DAEMON_HOME=$DAEMON_HOME"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true" // Recommend
Environment="DAEMON_LOG_BUFFER_SIZE=512"
Environment="UNSAFE_SKIP_BACKUP=true"
User=$USER
ExecStart=${HOME}/go/bin/cosmovisor start
Restart=always
RestartSec=3
LimitNOFILE=infinity
LimitNPROC=infinity
[Install]
WantedBy=multi-user.target
```
Note
A description of what the environment variables do can be found [here](https://docs.cosmos.network/main/run-node/cosmovisor.html). Change them depending on your setup.
### Start Cosmovisor
[Section titled âStart Cosmovisorâ](#start-cosmovisor)
Caution
If syncing from a snapshot, do not start Cosmovisor yet. Download the snapshot and extract it to `\$HOME/.sunrise/data`. Finally, enable the service and start it.
```bash
sudo systemctl daemon-reload
sudo systemctl restart systemd-journald
sudo systemctl enable cosmovisor
sudo systemctl start cosmovisor
```
Check it is running using:
```bash
sudo systemctl status cosmovisor
```
If you need to monitor the service after launch, you can view the logs using:
```bash
sudo journalctl -u cosmovisor -f -o cat
```
# Validator Node
> Validator nodes allow you to participate in consensus in the Sunrise network.
Validator nodes allow you to participate in consensus in the Sunrise network.
## Hardware requirements
[Section titled âHardware requirementsâ](#hardware-requirements)
The following hardware minimum requirements are recommended for running the validator node:
* Memory: 8 GB RAM (minimum)
* CPU: 6 cores
* Disk: 500 GB SSD Storage
* Bandwidth: 1 Gbps for Download/1 Gbps for Upload
## Run the Node
[Section titled âRun the Nodeâ](#run-the-node)
First, follow the instructions on [setting up a full consensus node](/run-a-sunrise-node/types/consensus/full-consensus-node).
### Optional: Reset working directory
[Section titled âOptional: Reset working directoryâ](#optional-reset-working-directory)
If you have already initialized a working directory for sunrised in the past, you must clean up before reinitialized a new directory. You can do so by running the following command:
```bash
sunrised tendermint unsafe-reset-all
```
### Initialize a working directory
[Section titled âInitialize a working directoryâ](#initialize-a-working-directory)
Run the following command:
```bash
CHAIN_ID=sunrise-1 # For mainnet
MONIKER="validator-name"
sunrised init "$MONIKER" --chain-id $CHAIN_ID
```
Check [our Github](https://github.com/sunriselayer/network) to know the current chain-id.
### Create a new key
[Section titled âCreate a new keyâ](#create-a-new-key)
```bash
VALIDATOR_WALLET="validator"
sunrised keys add $VALIDATOR_WALLET --keyring-backend test
```
### Validator Public Key
[Section titled âValidator Public Keyâ](#validator-public-key)
The last thing needed before initializing the validator is to obtain your validator public key which was created when you first initialized your node. To obtain your validator pubkey:
```bash
sunrised tendermint show-validator
{"@type":"/cosmos.crypto.ed25519.PubKey","key":"ZQweivhEkT/akg5RT6RWkElt43rr5cf+qu/QQ5jOpmQ="}
```
### Create Validator
[Section titled âCreate Validatorâ](#create-validator)
A minimum of 1 vRISE is required to create a validator. vRISE is non-transferable, so if you have no balance in your account, please create a position in the Liquidity Pool to earn vRISE.
First, create validator config file \[\~/.sunrise/config/validator.json].
```json
{
"pubkey": {"@type":"/cosmos.crypto.ed25519.PubKey","key":"ZQweivhEkT/akg5RT6RWkElt43rr5cf+qu/QQ5jOpmQ="},
"amount": "1000000uvrise",
"moniker": "your_validator's_name",
"identity": "optional identity signature (ex. UPort or Keybase)",
"website": "validator's (optional) website",
"security": "validator's (optional) security contact email",
"details": "validator's (optional) details",
"commission-rate": "0.1",
"commission-max-rate": "0.2",
"commission-max-change-rate": "0.01",
"min-self-delegation": "1"
}
```
Next, run the following command
```bash
sunrised tx staking create-validator [path/to/validator.json] \
--chain-id=$CHAIN_ID \
--from=$VALIDATOR_WALLET \
--keyring-backend=test \
--gas-prices=0.025uusdrise --gas-adjustment 1.2 \
--gas=auto \
-y
```
## Backup
[Section titled âBackupâ](#backup)
There are certain files that you need to backup to be able to restore your validator if, for some reason, it is damaged or lost in some way. Please make a secure backup of the following files located in `~/.sunrise/config/`:
* `priv_validator_key.json`
* `node_key.json`
It is recommended that you encrypt the backup of these files.
## Additional incentives for validators
[Section titled âAdditional incentives for validatorsâ](#additional-incentives-for-validators)
Caution
The application period for âAdditional incentives for validatorsâ closed on October 15th, 2025. The reopening date is undecided. For those who have already registered in the chain-registry and meet the requirements, the delegation has been completed.
Due to the depletion of the funding pool for the program, fulfilling the requirements now (e.g., enabling the tx indexer) will not make you eligible for additional delegation. Please be aware of this.
The core team will delegate more RISE to validators who serve the following services:
### RPC/API/gRPC
[Section titled âRPC/API/gRPCâ](#rpcapigrpc)
* **Delegation Amount:** 250,000 RISE for each service (RPC, API, gRPC), up to a maximum of 750,000 RISE.
* **Conditions:**
* Your endpoint must be submitted via a pull request to [chain-registry](https://github.com/cosmos/chain-registry/blob/master/sunrise/chain.json) and get merged.
* Transaction indexer and CORS must be enabled.
### Explorer
[Section titled âExplorerâ](#explorer)
* **Delegation Amount:** 25,000 RISE.
* **Conditions:**
* Your explorer must be submitted via a pull request to [chain-registry](https://github.com/cosmos/chain-registry/blob/master/sunrise/chain.json) and get merged.
* **Additional Delegation:**
* We offer additional delegation if your explorer is used within the official Sunrise services. We will contact you individually.
Please note that the content of these incentives may change depending on the number of participants.
# IBC Relayer
> By setting up the IBC relayer, you can create new connections and channels of IBC between Sunrise and other blockchains.
By setting up the IBC relayer, you can create new connections and channels of IBC between Sunrise and other blockchains.
## Setting up relayer with Go relayer (Deprecated)
[Section titled âSetting up relayer with Go relayer (Deprecated)â](#setting-up-relayer-with-go-relayer-deprecated)
You can see details [here](https://github.com/cosmos/relayer).
First, install [Go](https://go.dev/doc/install)
## Setting up relayer with Rust relayer Hermes (Recommended)
[Section titled âSetting up relayer with Rust relayer Hermes (Recommended)â](#setting-up-relayer-with-rust-relayer-hermes-recommended)
You can see details [here](http://hermes.informal.systems).
First, install [Rust](https://www.rust-lang.org/tools/install)
Then, run the commands below:
```bash
sudo apt update && sudo apt upgrade -y
sudo apt install librust-openssl-dev build-essential git -y
cargo install ibc-relayer-cli --bin hermes --locked
hermes version
echo word1 ... word12or24 > ~/mnemonic.txt
```
### Setup accounts
[Section titled âSetup accountsâ](#setup-accounts)
First, you need a wallet with enough funds on both chains. This tutorial assumes that you already have wallets created on the chains you want to relay on, and that these wallets have funds allocated to each of them.
```bash
hermes keys add --key-name --chain --mnemonic-file mnemonic.txt
hermes keys add --key-name --chain --mnemonic-file mnemonic.txt
```
### Configuration file
[Section titled âConfiguration fileâ](#configuration-file)
The command hermes config auto provides a way to automatically generate a configuration file for chains in the [chain-registry](https://github.com/cosmos/chain-registry):
You must set each parameter yourself for the testnet. See the [documentation](https://hermes.informal.systems/documentation/configuration/index.html) for more details.
```bash
hermes config auto --output $HOME/.hermes/config.toml --chain : : --chain
```
#### Add a new relay path
[Section titled âAdd a new relay pathâ](#add-a-new-relay-path)
The following settings are not required for mainnets that already have an established IBC channel. Follow only if you are starting a new connection.
* Create a connection
First, create a client on `ibc-1` tracking the state of `ibc-0`. It will be assigned 07-tendermint-0 as its identifier:
```bash
hermes create client --host-chain --reference-chain
```
* Create a connection
After creating clients on both chains, you have to establish a connection between them. Both chains will assign connection-0 as the identifier of their first connection:
```bash
hermes create connection --a-chain --b-chain
```
If the command runs successfully, it should output the `connection ID`.
* Channel identifiers
Finally, after the connection has been established, you can now open a new channel on top of it. Both chains will assign channel-0 as the identifier of their first channel:
```bash
hermes create channel --a-chain --a-connection --a-port transfer --b-port transfer
```
If the command runs successfully, it should output the channel IDs of both chains.
Add these to `.hermes/config.toml`
```yml
[chains.packet_filter]
policy = "allow"
list = [[
"transfer",
"channel-0",
]]
```
Once the configuration is complete, you can start the relayer with the following command.
```bash
hermes start
```
### Setting up daemon
[Section titled âSetting up daemonâ](#setting-up-daemon)
Recommend setting SystemD to run automatically after reboot.
```bash
sudo tee /etc/systemd/system/hermes.service > /dev/null <