# Shreds (/docs/builders/shreds)

import { Card, Cards } from 'fumadocs-ui/components/card';
import { Zap, Code, Radio } from 'lucide-react';
import { ShredsDemo } from '@/components/shreds/ShredsDemo';
import { ComponentPreviewTabs } from '@/components/rise-wallet/ComponentPreviewTabs';
import { CODE_EXAMPLES } from '@/components/rise-wallet/code-examples';

# Shreds

Shreds are RISE's breakthrough innovation for realtime blockchain transactions. Rather than processing transactions in large batches (blocks), RISE processes them individually and immediately, providing confirmations in as little as **3 milliseconds**.

## Overview

Traditional blockchains batch transactions into blocks, forcing users to wait seconds or minutes for confirmation. Shreds solve this by propagating incremental state updates across the network in realtime. Each shred is a lightweight, cryptographically signed packet containing state changes from one or more transactions, enabling instant confirmations while maintaining full EVM compatibility and security guarantees.

## Interactive Demo

Try incrementing the counter below. Each transaction confirms in milliseconds and events arrive in realtime via WebSocket.

<ComponentPreviewTabs
  code={CODE_EXAMPLES.shreds}
  note={
  <>
    <strong>Performance Optimization:</strong> This demo uses local nonce management and hardcoded gas values to minimize RPC calls, reducing network round-trips from 3+ calls (chainId, nonce, gas estimation) to just 1 (transaction submission). For simpler implementations, you can use <code>sendTransactionSync()</code> directly - it's easier but makes multiple RPC calls. Viem will soon integrate this optimization natively. See the commented code at the bottom for the simpler approach.
  </>
}
>
  <ShredsDemo />
</ComponentPreviewTabs>

## Why Shreds?

* **3ms confirmation times**: Transactions confirm faster than a blink of an eye
* **Full EVM compatibility**: Works with existing Ethereum tools and libraries
* **Realtime updates**: Subscribe to state changes as they happen
* **Maintained security**: Cryptographically signed, deterministic state transitions

## Get Started

<Cards>
  <Card icon={<Zap className="text-(--rise-purple)" />} title="Quickstart" href="/docs/builders/shreds/quickstart" description="Build your first realtime app in 15 minutes" />

  <Card icon={<Code className="text-(--rise-purple)" />} title="API Methods" href="/docs/builders/shreds/api-methods" description="Learn the core Shred API methods" />

  <Card icon={<Radio className="text-(--rise-purple)" />} title="Watching Events" href="/docs/builders/shreds/watching-events" description="Realtime shred subscriptions and event streaming" />
</Cards>
