Overview
TUNA is built on a dual-layer architecture that separates concerns between indexing and storage. This design enables a truly decentralized and permissionless news aggregation system.Sui Blockchain
Provides the on-chain index via the NewsRegistry smart contract
Walrus Storage
Stores the actual article content in decentralized blob storage
Two-Layer Architecture
Layer 1: The Index (Sui Blockchain)
The NewsRegistry is a Shared Object on Sui that maintains a vector (array) of blob IDs. Think of it as a decentralized pointer system:- Registry Object ID:
0x68c01d2c08923d5257a5a9959d7c9250c4053dbe4641e229ccff2f35e6a3bb6d - Package ID:
0xadf0a6ce11dd75d3d44930ab5bf55781801dea2bfead056eb0bb59c1aa1e9e66 - Module:
news_registry
Reading from the registry is free and permissionless - no wallet or SUI tokens required!
Layer 2: The Content (Walrus)
All article JSON data is stored as immutable blobs on the Walrus decentralized storage network:Data Flow
Here’s how applications fetch news from TUNA:Extract Blob IDs
The
latest_blobs field contains an array of Walrus blob IDs, ordered chronologicallyComponent Architecture
The TUNA frontend follows a modular React architecture:Configuration Layer
Core Libraries
src/lib/sui.ts - Transaction Builders
src/lib/sui.ts - Transaction Builders
Provides functions to create Sui transactions for:
- Tipping articles:
createTipArticleTransaction() - Posting comments:
createPostCommentTransaction() - Posting comments with media:
createPostCommentWithBlobTransaction() - Tipping comments:
createTipCommentTransaction()
@mysten/sui Transaction builder pattern.src/lib/walrus.ts - Storage Interface
src/lib/walrus.ts - Storage Interface
Handles all Walrus interactions with fallback logic:
uploadToWalrus()- Upload content with 6 publisher endpointsfetchFromWalrus()- Fetch content with 6 aggregator endpointsuploadImageToWalrus()- Upload binary image filesgetWalrusUrl()- Generate public blob URLs
Data Hooks
Why This Architecture?
Scalability
Sui only stores lightweight pointers, not full content. Storage scales horizontally on Walrus.
Cost Efficiency
Walrus storage is significantly cheaper than storing full articles on-chain.
Immutability
Once published, articles are permanent and censorship-resistant on both layers.
Permissionless
Anyone can read the registry and fetch content without permissions or gas fees.
Network Configuration
TUNA currently runs on Sui Testnet and Walrus Testnet:Integration Approach
Developers can integrate TUNA in two ways:- Direct Integration: Use the configuration and libraries to query the registry directly
- Package Installation: Import TUNA as a dependency and use the pre-built hooks
Next Steps
Sui Integration
Learn how transactions work on Sui
Walrus Storage
Deep dive into Walrus storage
NewsRegistry Contract
Understand the smart contract
Integration Guide
Start building with TUNA
