> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mangrovesystems.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 4.2: Designing the Ledger Structure

> Learn when to use multiple ledgers, what attributes each ledger needs, and how to design a ledger chain for multi-stage projects.

<Panel>
  <Card title="Accounting Academy" className="accounting-academy-card">
    <div className="accounting-academy-content">
      <Steps className="my-0">
        <Step title="MODULE 1: Fundamentals" icon="bookmark" iconType="solid" stepNumber={1} titleSize="p">
          * [1.1: Core Concepts & the Data Lifecycle](/accounting-academy/module-1/1-1-core-concepts-data-lifecycle)
          * [1.2: Translating Methodologies to Mangrove](/accounting-academy/module-1/1-2-translating-methodologies-to-mangrove)
          * [1.3: Events and Datapoints](/accounting-academy/module-1/1-3-events-and-datapoints)
          * [Exercise: Design and Build](/accounting-academy/module-1/1-exercise-design-and-build)
        </Step>

        <Step title="MODULE 2: Calculations" icon="bookmark" iconType="solid" stepNumber={2} titleSize="p">
          * [2.1: Calculation Architecture](/accounting-academy/module-2/2-1-calculation-architecture)
          * [2.2: Expanding Your Data Model](/accounting-academy/module-2/2-2-expanding-your-data-model)
          * [Exercise: Multi-Step Calculations](/accounting-academy/module-2/2-exercise-multi-step-calculations)
        </Step>

        <Step title="MODULE 3: Batch Partitioning & LCA" icon="bookmark" iconType="solid" stepNumber={3} titleSize="p">
          * [3.1: What Is a Batch?](/accounting-academy/module-3/3-1-what-is-a-batch)
          * [3.2: Batch Partitioning Strategies](/accounting-academy/module-3/3-2-batch-partitioning)
          * [3.3: Life Cycle Assessment & Emissions](/accounting-academy/module-3/3-3-lca-and-emissions)
          * [3.4: Allocating Emissions to Batches](/accounting-academy/module-3/3-4-allocating-emissions-to-batches)
          * [Exercise: Batch Partitioning & LCA](/accounting-academy/module-3/3-exercise-batch-partitioning-and-lca)
        </Step>

        <Step title="MODULE 4: Mass Balance with Ledgers" icon="bookmark" iconType="solid" stepNumber={4} titleSize="p">
          * [4.1: Introduction to Mass Balance](/accounting-academy/module-4/4-1-intro-to-mass-balance)
          * [4.2: Designing the Ledger Structure](/accounting-academy/module-4/4-2-designing-the-ledger-structure)
          * [4.3: Multiple Batch Types for Different Stages](/accounting-academy/module-4/4-3-multiple-batch-types)
          * [Exercise: Design & Build Mass Balance](/accounting-academy/module-4/4-exercise-design-and-build-mass-balance)
        </Step>

        <Step title="MODULE 5: Integration Testing" icon="bookmark" iconType="solid" stepNumber={5} titleSize="p">
          * [5.1: The Complete Model Assembly](/accounting-academy/module-5/5-1-the-complete-model-assembly)
          * [5.2: Testing Patterns](/accounting-academy/module-5/5-2-testing-patterns)
          * [5.3: Common Integration Pitfalls](/accounting-academy/module-5/5-3-common-integration-pitfalls)
          * [Exercise: Integration Testing](/accounting-academy/module-5/5-exercise-integration-testing)
        </Step>

        <Step title="MODULE 6: Advanced Patterns & Production" icon="bookmark" iconType="solid" stepNumber={6} titleSize="p">
          * [6.1: Model Design Best Practices](/accounting-academy/module-6/6-1-model-design-best-practices)
          * [6.2: Advanced Techniques](/accounting-academy/module-6/6-2-advanced-techniques)
          * [6.3: Production Readiness](/accounting-academy/module-6/6-3-production-readiness)
          * [Exercise: Production Deployment](/accounting-academy/module-6/6-exercise-production-deployment)
        </Step>
      </Steps>
    </div>
  </Card>
</Panel>

<Check>
  **What you'll learn in this lesson:**

  * Decide when a project needs one ledger vs. multiple ledgers
  * Identify the key attributes of every ledger
  * Design a multi-ledger structure for biochar and RNG projects
  * Understand how ledgers chain together through allocations
</Check>

In Mangrove, mass balance is represented by a series of **Ledgers**, each tracking the balance of stock at a stage within the Project's process. You can see a summary of the ledgers on the project Overview, or in the **Production Accounting** section of the project.

<img src="https://mintlify.s3.us-west-1.amazonaws.com/mangrovesystems-54ba4724/images/accounting-u/Screenshot%202026-02-10%20at%209.02.36%20PM.png" alt="Screenshot 2026 02 10 At 9 02 36 PM" />

## When you need multiple ledgers

In Modules 1–3, you worked with a **single ledger** — the simplest setup. But when your project has distinct stages where material transforms or accumulates before moving on, you need multiple ledgers.

| Ledger Count    | When to Use                                                                       | Example                                                   |
| --------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------- |
| **1 ledger**    | Simple projects with a single stage of production                                 | A facility that produces and delivers biochar in one step |
| **2–3 ledgers** | Projects with distinct accumulation stages where material "sits" before moving on | Feedstock received → biochar produced → carbon delivered  |
| **3+ ledgers**  | Complex multi-stage supply chains (use sparingly)                                 | Multi-facility operations with intermediate storage       |

<Warning>
  Keep it simple. Beyond 3 ledgers, the friction of managing balances between ledgers becomes significant. This isn't a hard rule — it depends on the complexity of your project — but start with fewer ledgers and add more only when a stage genuinely needs its own balance tracking.
</Warning>

The key question to ask: **Where does material accumulate before moving to the next stage?** Each accumulation point is a candidate for its own ledger.

## Ledger attributes

Every ledger in Mangrove has four key attributes:

| Attribute            | Description                          | Example (Biochar)                          |
| -------------------- | ------------------------------------ | ------------------------------------------ |
| **Unit**             | What's being tracked                 | Dry tonnes, biochar tonnes, tCO2e          |
| **Credit sources**   | What adds to the balance             | Batch types that feed this ledger          |
| **Debit sources**    | What removes from the balance        | Allocations to downstream ledgers, reports |
| **Allocation rules** | How material flows to the next stage | Proportional by mass, direct assignment    |

<Note>
  The unit can change between ledgers. For example, Ledger 1 might track dry tonnes of feedstock while Ledger 3 tracks tCO2e of carbon delivered. The allocation between them includes a conversion factor.
</Note>

## Example: Biochar project

A biochar project typically has three distinct accumulation points:

```mermaid theme={null}
graph LR
    A["**Ledger 1:**<br/>Feedstock Inventory<br/>(dry tonnes)"] --> B["**Ledger 2:**<br/>Biochar Production<br/>(biochar tonnes)"]
    B --> C["**Ledger 3:**<br/>Carbon Delivered<br/>(tCO2e)"]

    style A fill:#e1f5ff,stroke:#0066cc,stroke-width:2px
    style B fill:#fff4e1,stroke:#cc8800,stroke-width:2px
    style C fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px
```

| Ledger              | Unit           | Credits (what adds)                   | Debits (what removes)                   |
| ------------------- | -------------- | ------------------------------------- | --------------------------------------- |
| Feedstock Inventory | Dry tonnes     | Feedstock Receipt batches             | Allocation to Biochar Production        |
| Biochar Production  | Biochar tonnes | Production batches (from pyrolysis)   | Allocation to Carbon Delivered          |
| Carbon Delivered    | tCO2e          | Delivery batches (carbon sequestered) | Allocation to reports / credit issuance |

**How material flows:**

1. Feedstock arrives → credited to Ledger 1
2. Pyrolysis converts feedstock to biochar → debited from Ledger 1, credited to Ledger 2 (with conversion factor)
3. Biochar is delivered and sequestered → debited from Ledger 2, credited to Ledger 3 (with carbon content calculation)

## Example: RNG generator

A Renewable Natural Gas project has a similar three-stage structure but with different units:

```mermaid theme={null}
graph LR
    A["**Ledger 1:**<br/>Feedstock Input<br/>(lbs)"] --> B["**Ledger 2:**<br/>RNG Injected<br/>(MMBtu)"]
    B --> C["**Ledger 3:**<br/>RNG Transmitted<br/>(MMBtu)"]

    style A fill:#e1f5ff,stroke:#0066cc,stroke-width:2px
    style B fill:#fff4e1,stroke:#cc8800,stroke-width:2px
    style C fill:#e8f5e9,stroke:#2e7d32,stroke-width:2px
```

| Ledger          | Unit  | Credits (what adds)                              | Debits (what removes)                  |
| --------------- | ----- | ------------------------------------------------ | -------------------------------------- |
| Feedstock Input | lbs   | Feedstock intake batches                         | Allocation to RNG Injected             |
| RNG Injected    | MMBtu | Injection batches (gas injected at pipeline)     | Allocation to RNG Transmitted          |
| RNG Transmitted | MMBtu | Transmission batches (gas delivered to end-user) | Allocation to reports / RIN generation |

<Tip>
  Notice that Ledger 2 and Ledger 3 use the same unit (MMBtu) — the material doesn't change form between injection and transmission, but tracking them separately lets you account for pipeline losses and verify that transmitted volume never exceeds injected volume.
</Tip>

## Designing your ledger chain

Use these steps to design ledgers for any project:

<Steps>
  <Step title="Map the physical process">
    Draw out how material flows through your project from input to final output. Identify where material changes form, where it accumulates, and where it leaves the system.
  </Step>

  <Step title="Identify accumulation points">
    Each point where material "sits" before moving to the next stage is a potential ledger. Ask: does this stage need its own running balance?
  </Step>

  <Step title="Define units for each ledger">
    Choose the unit that makes sense for each stage. It's fine for units to change between ledgers — the allocation handles the conversion.
  </Step>

  <Step title="Define credit and debit sources">
    For each ledger, identify what batch types add to the balance and what removes from it (allocations to the next ledger, or to reports).
  </Step>

  <Step title="Map allocation rules">
    Define how material moves between ledgers. Common methods: proportional by mass, direct assignment (1:1 with a batch), or by conversion factor.
  </Step>
</Steps>

***

### Check your understanding

<Accordion title="When should you use multiple ledgers instead of one?" icon="circle-question">
  Use multiple ledgers when your project has **distinct accumulation stages** where material sits before moving to the next stage. If material changes form (e.g., feedstock → biochar → tCO2e) or passes through separate physical locations, each stage is a candidate for its own ledger.
</Accordion>

<Accordion title="Can different ledgers track different units?" icon="circle-question">
  Yes. Each ledger can track a different unit — for example, dry tonnes for feedstock, biochar tonnes for production, and tCO2e for delivered carbon. The **allocation between ledgers** handles the conversion from one unit to another using conversion factors.
</Accordion>

***

Next, learn how to create different batch types for each stage in [Lesson 4.3: Multiple Batch Types for Different Stages](/accounting-academy/module-4/4-3-multiple-batch-types).
