Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
bc58922
Add complete Neutron documentation structure
Jun 10, 2025
c9ff6a5
Clean up repository: remove outdated documentation and focus on curre…
Jun 16, 2025
98aec71
integrated cron feedback, removed oracle module
clydedevv Jun 19, 2025
46655fc
cron <-> governance cross-references
clydedevv Jun 19, 2025
5ec2615
fixed admin module
clydedevv Jun 19, 2025
94ef1a9
fixed transfer and harpoon
clydedevv Jun 19, 2025
042caab
updated feeburner and ictx, and dex concept cross-reference
clydedevv Jun 19, 2025
0b3fcce
integrated more Spaydh feedback
clydedevv Jun 19, 2025
28e3be9
integrated luisqa feedback, added relayers, updated design
clydedevv Jun 20, 2025
08aa9bf
integrated Zion feedback
clydedevv Jun 20, 2025
dd19f76
updated dex
clydedevv Jun 23, 2025
69748ca
fixed cron
clydedevv Jun 23, 2025
962c40b
fixed admin
clydedevv Jun 23, 2025
1fb0f90
fixed feeburner
clydedevv Jun 23, 2025
4332260
fixed tons of modules
clydedevv Jun 25, 2025
76e7222
updated DEX module, based on initial feedback from duality team
clydedevv Jul 4, 2025
4222b74
Update to neutral color scheme and simplify logos to just 'DOCS'
clydedevv Jul 7, 2025
4744464
Fix DEX concepts documentation and LaTeX parsing errors
clydedevv Jul 8, 2025
fa90950
Update navigation icons: change Uptime to Status with signal icon, re…
clydedevv Jul 11, 2025
4068b4c
Add v6.0.3 upgrade documentation and update chain parameters
clydedevv Jul 11, 2025
74da588
Standardize module titles: Overview, Mechanism, and How-to
clydedevv Jul 14, 2025
755e17f
Restructure quickstart into dedicated section with individual pages
clydedevv Jul 14, 2025
4eaf022
Revert "Restructure quickstart into dedicated section with individual…
clydedevv Jul 14, 2025
e0990b0
Clean up unreferenced files in /developers directory
clydedevv Jul 14, 2025
2121ee9
Remove vestigial Docusaurus files and update to Mintlify-only setup
clydedevv Jul 14, 2025
65b85a6
Update launch app button color to stone gray for better dark mode vis…
clydedevv Jul 14, 2025
625a886
Refine supervaults.mdx: fix withdrawal flow diagram and reorganize se…
clydedevv Jul 15, 2025
2b2d7f7
Refine supervaults.mdx: fix withdrawal flow diagram and reorganize se…
clydedevv Jul 15, 2025
2d67c70
feat: consolidate and clean up interchain-queries documentation
clydedevv Jul 15, 2025
9ce6f68
Merge main branch with consolidated interchain-queries documentation
clydedevv Jul 15, 2025
4492728
feat: consolidate interchaintxs documentation
clydedevv Jul 15, 2025
15185d0
fix: correct interchaintxs documentation inaccuracies
clydedevv Jul 15, 2025
92015ed
fix: critical corrections to interchaintxs documentation
clydedevv Jul 15, 2025
edb3e55
Add MCP server for intelligent documentation search
clydedevv Jul 16, 2025
ff184ee
Organize MCP server files into embedded folder structure
clydedevv Jul 16, 2025
85ff2fa
fix: Complete cron module documentation accuracy audit - consolidated…
clydedevv Jul 16, 2025
b2693da
fix: Complete harpoon module documentation accuracy audit and interch…
clydedevv Jul 16, 2025
1707122
fix: Complete feeburner module documentation accuracy audit - verifie…
clydedevv Jul 16, 2025
664f5fa
fix: remove inaccurate claim about automatic fee integration
clydedevv Jul 16, 2025
0ffa7ee
feat: comprehensive feerefunder module accuracy audit and corrections
clydedevv Jul 16, 2025
d17509b
feat: comprehensive revenue module accuracy audit and corrections
clydedevv Jul 16, 2025
3a6ba81
Fix spelling consistency in revenue module documentation
clydedevv Jul 16, 2025
7c20753
Complete accuracy audit and fixes for IBC Rate Limit module documenta…
clydedevv Jul 17, 2025
d5ee721
feat: complete transfer module documentation accuracy audit
clydedevv Jul 17, 2025
a77b234
fix: critical IBC Rate Limit module accuracy issues
clydedevv Jul 17, 2025
fed8a7f
audit: achieve 100% accuracy for IBC Rate Limit module documentation
clydedevv Jul 17, 2025
936d5dc
audit: comprehensive Transfer module accuracy fixes - 100% verifiabil…
clydedevv Jul 17, 2025
8990ad1
align admin module with old docs and update contract manager reference
clydedevv Jul 24, 2025
51eef0b
feat: comprehensive tokenfactory module accuracy audit - 100% verifie…
clydedevv Jul 28, 2025
1dead81
feat: critical globalfee module accuracy audit - 100% source code ver…
clydedevv Jul 28, 2025
1880e1e
fix: align cron module table of contents and standardize page titles
clydedevv Jul 28, 2025
74c662d
fix: align modules overview with docs.json navigation structure
clydedevv Jul 28, 2025
3d77934
fix: update table of contents structure for admin and cron modules
clydedevv Jul 28, 2025
3023af2
fix: update integrated architecture to showcase core DeFi modules
clydedevv Jul 28, 2025
2eaf432
fix: correct atomic composability diagram - remove non-existent Oracl…
clydedevv Jul 28, 2025
e1dcfc9
feat: consolidate DEX module reference documentation
clydedevv Jul 28, 2025
d19f829
CRITICAL: fix DEX reference documentation for 100% source code accuracy
clydedevv Jul 28, 2025
3fa7e8f
fix: resolve MDX parsing errors in DEX reference - escape HTML entities
clydedevv Aug 13, 2025
1bbce8c
feat: comprehensive transfer module audit - 100% accuracy verified
clydedevv Aug 13, 2025
4fcf137
feat: revenue module documentation improvements - address @swelf19 fe…
clydedevv Aug 13, 2025
8beabf6
feat: add Neutron v8.0.0-rc0 upgrade documentation
clydedevv Aug 13, 2025
501fa78
feat: update oracle setup to use neutron-org/connect
clydedevv Aug 13, 2025
c61d507
feat: add DEX visual guides and update documentation
clydedevv Aug 13, 2025
aa770ff
fix: standardize v8.0.0-rc0 upgrade documentation format
clydedevv Aug 14, 2025
f40a66c
fix: correct v8.0.0-rc0 as testnet upgrade documentation
clydedevv Aug 14, 2025
4629788
feat: remove outdated upgrade instructions from navigation
clydedevv Aug 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
117 changes: 92 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,108 @@
# Website
# Neutron Documentation

This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
The comprehensive documentation hub for the Neutron blockchain - the first Consumer Chain of the Cosmos Hub. This repository contains detailed guides, tutorials, and references for developers, validators, and users of the Neutron ecosystem.

### Installation
## 🌟 What is Neutron?

```
$ yarn
```
Neutron is a permissionless smart contract platform that leverages Interchain Security (ICS) from Cosmos Hub, enabling secure cross-chain DeFi applications with native integrations to 50+ Cosmos chains and beyond.

## 📖 Documentation Structure

### 🏠 **Home & Core Concepts**
- **Introduction & Quickstart**: Get started with Neutron basics
- **Integrated Architecture**: Understanding Neutron's unique Consumer Chain design
- **Opinionated Blockchains**: How Neutron enables focused blockchain applications
- **Proof of Liquid Staking**: Neutron's innovative consensus and security model
- **Modular Governance**: Decentralized decision-making mechanisms
- **Tokenomics**: NTRN token economics and utility

### 💹 **DeFi Ecosystem**
- **DeFi Overview**: Complete landscape of Neutron's financial applications
- **Featured Protocols**: Duality, SuperVaults, Bull vs Bear, Drop Staking
- **Integration Guides**: How to connect with Neutron's DeFi infrastructure

### 👨‍💻 **Developer Resources**
- **Getting Started**: Developer onboarding and environment setup
- **SDK & Tools**: Neutron Template, BullBear integration, boilerplates
- **Comprehensive Tutorials**:
- CosmWasm smart contract development
- Interchain Accounts (ICA) and Queries (ICQ)
- Integration testing and deployment
- Indexing and data analysis
- **Modules Documentation**: Deep dives into Neutron's custom modules
- **API Reference**: Complete technical specifications

### 🔒 **Validator Operations**
- **Overview**: Complete validator ecosystem and requirements
- **Node Setup**: Comprehensive guide for running Neutron nodes
- **Becoming a Validator**: Step-by-step validator registration process
- **Oracle Operations**: Slinky oracle setup and maintenance
- **Economics**: Validator incentives, rewards, and performance metrics
- **Security**: Best practices and operational guidelines

## 🛠 Development

This documentation is built with [Mintlify](https://mintlify.com), a modern documentation platform designed for developer-focused content.

### Local Development

```
$ yarn start
```
1. **Install Mintlify CLI**:
```bash
npm i -g mintlify
```

2. **Preview documentation locally**:
```bash
mintlify dev
```

3. **Install dependencies** (if needed):
```bash
mintlify install
```

### Publishing Changes

Documentation is automatically deployed when changes are pushed to the default branch. For more information about Mintlify's deployment process, visit the [Mintlify documentation](https://mintlify.com/docs).

### Troubleshooting

- **Mintlify dev isn't running**: Run `mintlify install` to re-install dependencies
- **Page loads as a 404**: Make sure you are running in a folder with `docs.json`
- **Build errors**: Check the [Mintlify troubleshooting guide](https://mintlify.com/docs/troubleshooting)

### Key Features

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
- 🎨 **Beautiful Design**: Modern, responsive interface with dark/light modes
- 🔍 **Advanced Search**: Full-text search across all documentation
- 📱 **Mobile Optimized**: Perfect experience on all devices
- 🔗 **Deep Linking**: Direct links to specific sections and code blocks
- 💻 **Code Examples**: Interactive code samples and tutorials
- 🌐 **Multi-format Support**: MDX, API references, and rich media

### Build
## 🌐 Community & Resources

```
$ yarn build
```
### Official Links
- **Website**: [neutron.org](https://neutron.org)
- **App**: [app.neutron.org](https://app.neutron.org)
- **GitHub**: [github.com/neutron-org](https://github.com/neutron-org)

This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Community
- **Discord**: [Join our community](https://discord.com/invite/bzPBzbDvWC)
- **Twitter**: [@neutron_org](https://twitter.com/neutron_org)
- **Forum**: [Neutron Governance](https://forum.neutron.org)

### Deployment
## 📊 Repository Statistics

Using SSH:
- **Comprehensive Coverage**: 100+ documentation pages
- **Multi-audience**: Developers, validators, and end users
- **Active Maintenance**: Regular updates with protocol developments
- **Community Driven**: Open source with community contributions

```
$ USE_SSH=true yarn deploy
```
## 📝 License

Not using SSH:
This documentation is open source and available under the [MIT License](LICENSE).

```
$ GIT_USER=<Your GitHub username> yarn deploy
```
---

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
*Neutron: Secure, interoperable, and developer-friendly blockchain infrastructure for the next generation of DeFi.*
File renamed without changes.
97 changes: 97 additions & 0 deletions concepts/integrated-architecture.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
---
title: "Integrated Architecture"
description: "How Neutron's DeFi-focused infrastructure combines app-specific features with atomic composability"
icon: "puzzle-piece"
---

Neutron implements an integrated blockchain architecture that combines critical DeFi infrastructure directly at the protocol layer. This design ensures guaranteed execution, native cross-chain communication, atomic composability, and predictable performance—creating a shared environment where DeFi protocols benefit from specialized infrastructure without sacrificing interoperability.

## Core Infrastructure Components

<CardGroup cols={2}>
<Card title="Oracle Module" icon="bolt" iconType="duotone" href="/developers/modules/oracle">
Native price feeds updated every block with hardware-based security, eliminating dependence on external oracles and providing superior execution guarantees.
</Card>
<Card title="Interchain Queries (ICQ)" icon="network-wired" iconType="duotone" href="/developers/modules/interchain-queries">
Direct state queries across any IBC-connected chain, enabling real-time cross-chain data access without trusted third parties.
</Card>
<Card title="Cron Module" icon="clock" iconType="duotone" href="/developers/modules/cron">
Native automation allowing scheduled and conditional contract execution with protocol-level reliability.
</Card>
<Card title="Interchain Accounts" icon="arrows-left-right" iconType="duotone" href="/developers/tutorials/cosmwasm_ica">
Built-in interchain account functionality enabling seamless cross-chain operations with consensus-enforced security.
</Card>
</CardGroup>

This approach essentially provides infrastructure as a service at the protocol level, allowing all applications to leverage shared utilities without building duplicate systems or relying on external providers.

## Benefits of Integration

<CardGroup cols={2}>
<Card title="Capital Efficiency" icon="coins" iconType="duotone">
<ul className="mt-2 space-y-1">
<li>Optimized liquidity utilization across protocols</li>
<li>Reduced capital requirements through composability</li>
</ul>
</Card>

<Card title="Reliability" icon="shield-check" iconType="duotone">
<ul className="mt-2 space-y-1">
<li>Infrastructure failures are consensus failures</li>
<li>Guaranteed execution within block boundaries</li>
</ul>
</Card>

<Card title="Performance" icon="bolt" iconType="duotone">
<ul className="mt-2 space-y-1">
<li>Direct state access without contract calls</li>
<li>High-frequency oracle updates every block</li>
</ul>
</Card>

<Card title="Security" icon="lock" iconType="duotone">
<ul className="mt-2 space-y-1">
<li>Protocol-level validation of all operations</li>
<li>No trusted external oracles or bridges</li>
</ul>
</Card>
</CardGroup>

## Atomic Composability

Neutron enables true atomic composability across all protocol features within a single transaction:

```mermaid
graph LR
A[Smart Contract] --> B[Oracle Module]
A --> C[Token Transfer]
A --> D[Interchain Query]
A --> E[Cron Automation]

B & C & D & E -.-> F[Unified Transaction State]

classDef default fill:#f5f5f5,stroke:#d9d9d9,color:#333
classDef contract fill:#0ea5e9,stroke:#0284c7,color:white

class A contract
```

All operations execute atomically in a single transaction context, providing developers with strong guarantees while eliminating interoperability risks.

## Real-World Applications

### Supervaults
[Supervaults](/defi/supervaults) represent a new approach to liquidity provision that overcomes the limitations of traditional AMMs. By leveraging Neutron's built-in high-frequency oracle and native automation features, Supervaults can:

- Market make at the most recent CEX prices
- Automatically rebalance every block
- Perform arbitrage themselves instead of being arbitraged
- Democratize profits to liquidity providers

### Cross-Chain Liquid Staking
Protocols like [Drop](/defi/drop) can utilize Neutron's Interchain Accounts and Interchain Queries (ICQ) capabilities to:

- Read the state of other blockchains
- Adjust delegations made by remotely controlled accounts
- Onboard new assets from connected chains with a single transaction
- Provide users with a seamless cross-chain staking experience
159 changes: 159 additions & 0 deletions concepts/modular-governance.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
---
title: "Modular Governance and Chain Management"
description: "Neutron's governance system balances efficiency, security, and decentralization through a multi-layered architecture"
icon: "scale-balanced"
---

Neutron's governance model uses a customized fork of DAO DAO contracts to create a flexible, multi-layered system where specialized committees handle day-to-day operations while remaining accountable to tokenholders through innovative oversight mechanisms.

## Governance Architecture

<CardGroup cols={2}>
<Card title="Neutron DAO (Agora)" icon="building-columns" iconType="duotone">
The primary governance entity with ultimate authority, governed by Neutron's stakeholders through the NTRN token. Controls network upgrades, crucial parameters, and committees.
</Card>

<Card title="Committees (subDAOs)" icon="sitemap" iconType="duotone">
Specialized governance entities with dedicated powers and resources for day-to-day operations like grants and incentive programs.
</Card>
</CardGroup>

**Chain Manager** mediates between governance and the blockchain's privileged functions through sophisticated permission strategies, enabling granular control of network operations.

**Voting Vaults** are smart contracts that calculate governance power based on various tokenized positions containing NTRN.

## How is Neutron Governance Different?

<div className="p-4 border-l-4 border-primary bg-primary/5 rounded mb-6">
<strong>Key differences from traditional Cosmos governance:</strong>
<ul className="mt-2">
<li>Following the Mercury upgrade, Neutron is now a sovereign chain with its own validator set and staking model</li>
<li>Voting power comes from bonding NTRN or DeFi tokens containing NTRN through Voting Vaults</li>
<li>Native stakers can participate in governance through the Staked NTRN Voting Vault</li>
<li>Specialized Committees handle routine governance to minimize voter fatigue</li>
<li>Tokenholders can keep Committees accountable through "overrule proposals"</li>
<li>Chain Manager implements granular permission controls for privileged operations</li>
</ul>
</div>

## Chain Manager

The Chain Manager implements a permission system to control which entities can execute privileged actions on the blockchain using two **permission strategies**:

- **ALLOW_ALL**: Grants an entity full access to all privileged functions without restriction
- **ALLOW_ONLY**: Permits an entity to execute only specific message types with possible additional restrictions

### Supported Privileged Messages

<div className="overflow-x-auto">
<table className="w-full my-4 text-sm">
<thead>
<tr>
<th className="p-2 border-b-2 border-gray-200 bg-gray-100 dark:bg-gray-800 dark:border-gray-700">Message Type</th>
<th className="p-2 border-b-2 border-gray-200 bg-gray-100 dark:bg-gray-800 dark:border-gray-700">Description</th>
<th className="p-2 border-b-2 border-gray-200 bg-gray-100 dark:bg-gray-800 dark:border-gray-700">Possible Restrictions</th>
</tr>
</thead>
<tbody>
<tr>
<td className="p-2 border-b border-gray-200 dark:border-gray-700 font-mono text-xs">`params.ParamChangeProposal`</td>
<td className="p-2 border-b border-gray-200 dark:border-gray-700">Changes parameters of modules using the deprecated params module</td>
<td className="p-2 border-b border-gray-200 dark:border-gray-700">Specific modules and parameters</td>
</tr>
<tr>
<td className="p-2 border-b border-gray-200 dark:border-gray-700 font-mono text-xs">`module_name.MsgUpdateParams`</td>
<td className="p-2 border-b border-gray-200 dark:border-gray-700">Updates parameters of modules using the new-style param updates</td>
<td className="p-2 border-b border-gray-200 dark:border-gray-700">Specific fields within the message</td>
</tr>
<tr>
<td className="p-2 border-b border-gray-200 dark:border-gray-700 font-mono text-xs">`cron.AddSchedule`</td>
<td className="p-2 border-b border-gray-200 dark:border-gray-700">Adds new execution schedules to the CRON module</td>
<td className="p-2 border-b border-gray-200 dark:border-gray-700">None</td>
</tr>
<tr>
<td className="p-2 border-b border-gray-200 dark:border-gray-700 font-mono text-xs">`cron.RemoveSchedule`</td>
<td className="p-2 border-b border-gray-200 dark:border-gray-700">Removes schedules from the CRON module</td>
<td className="p-2 border-b border-gray-200 dark:border-gray-700">None</td>
</tr>
<tr>
<td className="p-2 border-b border-gray-200 dark:border-gray-700 font-mono text-xs">`upgrade.SoftwareUpgradeProposal`</td>
<td className="p-2 border-b border-gray-200 dark:border-gray-700">Schedules a software upgrade</td>
<td className="p-2 border-b border-gray-200 dark:border-gray-700">None</td>
</tr>
<tr>
<td className="p-2 border-b border-gray-200 dark:border-gray-700 font-mono text-xs">`upgrade.CancelSoftwareUpgradeProposal`</td>
<td className="p-2 border-b border-gray-200 dark:border-gray-700">Cancels a scheduled upgrade</td>
<td className="p-2 border-b border-gray-200 dark:border-gray-700">None</td>
</tr>
</tbody>
</table>
</div>

### Permission Assignments

Current permission assignments include: **Neutron DAO Core Contract** with ALLOW_ALL strategy for comprehensive network control, **Expedited Upgrades Multisig** with ALLOW_ONLY for software upgrade proposals and cancellations, and **Tokenfactory Hooks Multisig** with ALLOW_ONLY for updating tokenfactory hook parameters.

## Neutron DAO (Agora)

The Neutron DAO serves as the highest governance authority, with comprehensive control over the network, including permissions for committees.

### Voting Power System

Neutron uses dedicated smart contracts called **Voting Vaults** to calculate governance power. These vaults can accept any tokenized position containing NTRN:

- **NTRN Vault**: Accepts NTRN deposits and grants 1 point of voting power per token without lock-up
- **LP Token Vaults**: Accepts LP token deposits and counts the underlying NTRN (both NTRN-ATOM and NTRN-USDC pairs have Voting Vaults)
- **Staked NTRN Vault**: Added during the Mercury upgrade, grants 1 point of governance power per NTRN delegated to validators via native staking
- **Virtual Vaults**: Track NTRN held in other contracts (lockdrops, vesting contracts), ensuring all NTRN holders can participate in governance

### Proposal Types

<CardGroup cols={3}>
<Card title="Single-choice Proposals" icon="check" iconType="duotone">
Standard yes/no decisions with a 50% threshold
</Card>

<Card title="Multiple-choice Proposals" icon="list-check" iconType="duotone">
Decisions with multiple options where the most-voted option wins
</Card>

<Card title="Overrule Proposals" icon="ban" iconType="duotone">
Special proposals with a lower threshold (0.5%) for overruling subDAO decisions
</Card>
</CardGroup>

## Committees (subDAOs)

The Agora can create specialized Committees with specific powers and resources for day-to-day operations. These subDAOs are customizable in terms of **membership** (defining who can participate), **voting weight** (configuring how votes are weighted), and **execution rights** (setting specific parameters and permissions).

### Timelocks & Overrules

<div className="p-4 border-l-4 border-primary bg-primary/5 rounded my-6">
<strong>The overrule mechanism works as follows:</strong>
<ol className="mt-2 space-y-2">
<li>When a subDAO proposal passes, it enters a timelock period (typically 3 days)</li>
<li>During this period, the main DAO can create an overrule proposal with a low threshold (0.5%)</li>
<li>If the overrule proposal passes, the subDAO proposal is rejected</li>
<li>If no overrule occurs, the subDAO proposal executes after the timelock period</li>
</ol>
</div>

### Security SubDAO

A specialized subDAO that can only execute `pause()` methods on certain contracts, enabling rapid response to security incidents. This subDAO can pause other subDAOs, the Reserve contract, and the Distribution contract.

## Benefits and Parameters

**Efficiency**: Specialized committees handle routine matters, reducing governance overhead and minimizing voter fatigue.

**Accountability**: Committees are given autonomy while the main DAO can overrule with low threshold, with timelock periods ensuring transparency.

**Participation**: Voting Vaults enable DeFi participation, reducing opportunity costs with multiple ways to gain governance power.

### Governance Parameters

**Main DAO Proposals**: 1000 NTRN deposit (refunded for passed proposals), 2-week voting period, 5% quorum, 50% threshold for single-choice proposals.

**Overrule Proposals**: No deposit required (created automatically), 3-day voting period, 0.5% threshold, revoting disabled for immediate execution.

**Note**: Following the Mercury upgrade, Neutron operates as a sovereign chain with its own validator set and staking model, detailed in the [Proof of Liquid Staking](/concepts/proof-of-liquid-staking) documentation.
Loading
Loading