Atom Structuring
Understanding how to properly structure Atoms is crucial for building effective applications on the Intuition protocol. This guide covers advanced techniques and patterns for creating well-designed, reusable Atoms.
Design Principles: Atomic Granularityβ
A crucial best practice is keeping information modular and atomic. You are economically incentivized to create "flatter" Atoms β each representing a single, minimal concept β rather than packing composite information into one Atom.
Why Granularity Mattersβ
Consider representing the statement: "Tiger Research was founded in 2021"
Monolithic Approach (Not Recommended)β
// One Atom containing all information
const statementAtom = {
data: "Tiger Research was founded in 2021"
}
Problems with this approach:
- Hard to verify which part might be incorrect if disputed
- Cannot reuse individual components
- Difficult to update or correct specific elements
- Less composable with other data
Atomic Approach (Best Practice)β
// Three separate Atoms
const tigerResearchAtom = { data: "Tiger Research" }
const foundedInAtom = { data: "founded in" }
const year2021Atom = { data: "2021" }
// Connected via a Triple
const foundingTriple = {
subject: tigerResearchAtom,
predicate: foundedInAtom,
object: year2021Atom
}
Benefits of this approach:
- Each piece can be independently verified and traced
- Individual components are reusable (the
[2021]Atom can be used in countless other triples) - Corrections can be made to specific elements without discarding everything
- Trust accrued by each Atom benefits all its usages
Economic Incentives for Granularityβ
Intuition's economic model naturally guides users toward optimal granularity:
- Reusable Atoms accumulate more Signal as they're referenced in multiple Triples
- High-Signal Atoms attract more stakes, increasing their network gravity
- Composite Atoms with embedded data are less likely to be reused or staked
- Modular Design maximizes potential for community adoption and value accrual
Atom Structure Componentsβ
Basic Structureβ
An Atom consists of three core components:
- Decentralized Identifier (DID) - Unique identifier for the atom
- Data Content - The actual information being represented
- Metadata - Additional context and properties
Example Atom Structureβ
{
"id": "did:ethr:mainnet:0x3b0bc51ab9de1e5b7b6e34e5b960285805c41736",
"data": {
"type": "concept",
"content": "Machine Learning",
"description": "A subset of artificial intelligence that enables systems to learn and improve from experience",
"tags": ["AI", "technology", "computing"]
},
"metadata": {
"created": "2024-01-15T10:30:00Z",
"creator": "did:ethr:mainnet:0x123...",
"version": "1.0"
}
}
Atom Categoriesβ
Concept Atomsβ
Represent abstract ideas, categories, or classifications.
{
"type": "concept",
"content": "Blockchain Technology",
"category": "technology"
}
Entity Atomsβ
Represent specific people, places, or things.
{
"type": "entity",
"content": "Ethereum",
"category": "blockchain",
"properties": {
"founded": "2015",
"creator": "Vitalik Buterin"
}
}
Attribute Atomsβ
Represent characteristics or properties.
{
"type": "attribute",
"content": "Decentralized",
"category": "property",
"appliesTo": ["blockchain", "governance"]
}
Flexibility and Scopeβ
Atoms are not limited to static concepts. They can represent:
- Dynamic entities: User-generated content, evolving documents
- Abstract concepts: Tags, categories, classifications
- Data structures: JSON schemas, configuration templates
- Content chunks: Text snippets, code fragments (via IPFS CID)
Regardless of what an Atom represents, the principles remain consistent:
- Give it a clear, unique identity
- Include relevant data in the atomData field
- Keep its scope narrow for maximum verifiability and reusability
Creating Atoms Programmaticallyβ
Using the SDKβ
import {
createAtomFromString,
getEthMultiVaultAddressFromChainId,
} from '@0xintuition/sdk'
import { createPublicClient, createWalletClient, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { sepolia } from 'viem/chains'
// 1) Configure viem clients
const account = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`)
const walletClient = createWalletClient({ account, chain: sepolia, transport: http() })
const publicClient = createPublicClient({ chain: sepolia, transport: http() })
// 2) Resolve MultiVault address for the current chain
const multivaultAddress = getEthMultiVaultAddressFromChainId(sepolia.id)
// 3) Create an Atom from a simple string label
const result = await createAtomFromString(
{ walletClient, publicClient, address: multivaultAddress },
'Machine Learning',
)
console.log('Created atom vaultId:', result.state.vaultId)
Validation Guidelinesβ
Ensure your atoms follow these validation rules:
- Required Fields:
id,data.content,metadata.created - Content Length: Minimum 1 character, maximum 10,000 characters
- Tag Count: Maximum 20 tags per atom
- Metadata: Must include creator DID and timestamp
Atom Relationshipsβ
Direct Referencesβ
{
"content": "Deep Learning",
"relatedAtoms": [
"did:ethr:mainnet:0x...", // Machine Learning atom
"did:ethr:mainnet:0x..." // Neural Networks atom
]
}
Hierarchical Structureβ
{
"content": "Artificial Intelligence",
"children": [
"did:ethr:mainnet:0x...", // Machine Learning
"did:ethr:mainnet:0x..." // Expert Systems
]
}
Quality Guidelinesβ
Content Qualityβ
- Ensure accuracy and verifiability
- Use clear, concise language
- Provide sufficient context
- Avoid redundant or duplicate atoms
Technical Qualityβ
- Follow proper DID standards
- Include comprehensive metadata
- Use consistent data formats
- Implement proper versioning
Community Standardsβ
- Respect intellectual property
- Avoid misleading or false information
- Contribute to the ecosystem's growth
- Engage with the community constructively
Next Stepsβ
- Atom Best Practices - Detailed guidelines for effective Atom design
- Triple Fundamentals - Learn how to connect Atoms into relationships
- Signal Fundamentals - Understand how to measure Atom usage and relevance