Skip to content

SO4-Markets/contracts

Repository files navigation

Astrion

The credit layer for Stellar.

Non-custodial hybrid lending Β· Core & Isolated markets Β· Built on Soroban

astrion.market Β· Get started Β· Contribute Β· Twitter


The Problem

DeFi lending on Stellar doesn't exist at institutional quality. Existing protocols across ecosystems force users to choose between capital efficiency and safety β€” pool everything together (high risk) or silo everything apart (low efficiency). There is no middle ground.

The Solution

Astrion introduces a dual-market architecture β€” the first of its kind on Stellar:

Core Markets Isolated Markets
Liquidity Shared cross-collateral pool Independent per-asset pools
Assets USDC, XLM, BTC, ETH, EURC Long-tail, volatile, RWAs
Risk Diversified, lower Ring-fenced, contained
Efficiency Maximum capital utilization Safety over efficiency

Capital efficiency where safe. Isolation where necessary.


Screenshots

Landing Dashboard
Landing page Dashboard
Markets Analytics
Markets Analytics

Why Astrion

πŸ›οΈ Institutional-grade UX

Designed to feel like Bloomberg Terminal meets Stripe Dashboard β€” not another casino-like DeFi interface. Clean typography, information hierarchy, and financial-grade data presentation.

πŸ”’ Risk isolation by design

Isolated markets contain risk to individual pools. A failure in one experimental market never propagates to core liquidity β€” protecting the entire protocol.

⚑ Built on Soroban

Stellar's smart contract platform brings sub-second finality, near-zero fees, and a growing institutional ecosystem. Astrion is the foundational credit layer for this ecosystem.

πŸ“Š Full transparency

Health factor visualization, liquidation price tracking, oracle source display, real-time utilization β€” users always understand their risk exposure.


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     ASTRION PROTOCOL                    β”‚
β”‚                                                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚    Core Markets      β”‚  β”‚    Isolated Markets       β”‚  β”‚
β”‚  β”‚                     β”‚  β”‚                          β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”   β”‚  β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”     β”‚  β”‚
β”‚  β”‚  β”‚USDC β”‚ β”‚ XLM β”‚   β”‚  β”‚  β”‚Token β”‚  β”‚Token β”‚     β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”¬β”€β”€β”˜ β””β”€β”€β”¬β”€β”€β”˜   β”‚  β”‚  β”‚  A   β”‚  β”‚  B   β”‚     β”‚  β”‚
β”‚  β”‚     β”‚       β”‚       β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”˜     β”‚  β”‚
β”‚  β”‚  β”Œβ”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”   β”‚  β”‚  Independent pools       β”‚  β”‚
β”‚  β”‚  β”‚ Shared Pool  β”‚   β”‚  β”‚  Ring-fenced risk        β”‚  β”‚
β”‚  β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚  β”‚  Separate liquidation     β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”‚
β”‚  β”‚LendingPoolβ”‚ β”‚PriceOracleβ”‚ β”‚LiquidationManager   β”‚   β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚              GovernanceRouter                      β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tech Stack

Layer Technology
Monorepo Turborepo + Bun workspaces
Framework React 19 + Vite 7
Routing TanStack Router v1
Server state TanStack Query v5
Styling Tailwind CSS v4
UI components shadcn/ui (via packages/ui workspace)
Notifications Sonner
Blockchain Stellar / Soroban
Type safety TypeScript 5.9

Project Structure

astrion/
β”œβ”€β”€ apps/
β”‚   └── web/                        # Main React/Vite application
β”‚       β”œβ”€β”€ public/                 # Static assets β€” favicon, manifest, PWA icons
β”‚       └── src/
β”‚           β”œβ”€β”€ features/
β”‚           β”‚   β”œβ”€β”€ lending/        # Core lending UI β€” dashboard, markets, governance
β”‚           β”‚   β”‚   β”œβ”€β”€ components/ # Page + sub-components
β”‚           β”‚   β”‚   β”œβ”€β”€ data/       # Mock data layer (contract integration pending)
β”‚           β”‚   β”‚   └── types/      # Shared TypeScript types
β”‚           β”‚   β”œβ”€β”€ earn/           # Earn page β€” staking, vesting, LP
β”‚           β”‚   β”œβ”€β”€ referrals/      # Referral program
β”‚           β”‚   └── trade/          # Trading β€” chart, order panel, positions
β”‚           β”œβ”€β”€ routes/             # TanStack Router file-based routes
β”‚           β”œβ”€β”€ styles/             # Global CSS + design tokens
β”‚           └── ui/                 # Shared UI β€” Navbar, ThemeProvider, landing
β”‚
β”œβ”€β”€ packages/
β”‚   └── ui/                         # Shared component library (shadcn/ui)
β”‚
β”œβ”€β”€ project-asset/                  # Brand assets, design spec, logo SVGs
β”œβ”€β”€ turbo.json
β”œβ”€β”€ package.json
└── bun.lock

Features

Area Details
Dashboard Portfolio overview, active positions, protocol stats, health factor gauge
Core Markets Shared-liquidity markets with cross-collateral support
Isolated Markets Independent risk/liquidity pools for higher-risk assets
Portfolio Net worth, net APY, total collateral & debt, health factor visualization
Analytics TVL, borrow volume, APY history, utilization breakdowns, liquidation activity
Earn Token staking, escrowed token vesting, LP rewards, multiplier points
Trade Chart interface, order panel, position management
Governance On-chain proposals, voting, quorum tracking
Theme Full dark / light mode with zero flash on load
Responsive Mobile-first β€” collapsible drawer sidebar on mobile, full sidebar on desktop

Getting Started

Prerequisites

Tool Version
Bun β‰₯ 1.3
Node.js β‰₯ 20

Quick start

# Clone
git clone https://github.com/Astrion-Market/interface.git
cd interface

# Install
bun install

# Dev server β†’ http://localhost:3000
bun dev

Production build

bun build

All commands

Command Description
bun dev Start all packages in development mode
bun build Build all packages for production
bun lint Lint all packages with ESLint
bun format Format all files with Prettier
bun typecheck Run TypeScript type checks across all packages

How It Works

Health Factor

A per-position risk metric: weighted collateral value Γ· total borrow value

Range Status Color
β‰₯ 1.5 Safe 🟒 Green
1.2 β€” 1.5 Moderate risk 🟑 Amber
1.0 β€” 1.2 High risk πŸ”΄ Red
< 1.0 Liquidatable β›” Critical

Interest Rate Model

Utilization-based with a kinked curve β€” rates rise gently under optimal utilization, then aggressively above it. This prevents liquidity exhaustion while keeping borrowing costs low during normal conditions.

Contract Surface

The contract integration targets four Soroban contracts:

Contract Responsibility
LendingPool Supply, withdraw, borrow, repay
PriceOracle Asset price feeds
LiquidationManager Health monitoring + liquidations
GovernanceRouter Proposal creation + voting

Status: The current build uses a mock data layer. Contract integration is in progress.


Roadmap

  • Core UI β€” dashboard, markets, portfolio, analytics, governance
  • Dual-market architecture β€” core + isolated market views
  • Dark/light theme with zero-flash loading
  • Mobile-responsive layout
  • Earn page β€” staking, vesting, distributions
  • Trade page β€” chart, order panel
  • Soroban contract integration
  • Wallet connection (Freighter, WalletConnect)
  • Oracle integration (DIA / Reflector)
  • Liquidation bot infrastructure
  • Mainnet launch

Contributing

We welcome contributions. See CONTRIBUTING.md for the full guide β€” setup, branch naming, commit style, and PR process.

Quick version:

git clone https://github.com/Astrion-Market/interface.git
cd interface && bun install
git checkout -b feat/your-feature
# make changes, then:
bun lint && bun typecheck
git commit -m "feat: your feature description"

License

MIT License β€” Copyright (c) 2026 Astrion Labs

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Built by Astrion Labs Β· Stellar Mainnet

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages