Per-ID Accounting is a blockchain accounting framework that aggregates and manages financial positions—such as assets, debts, and collateral—at the level of a user's unique identity, which can span multiple blockchain addresses or smart contracts. Unlike traditional address-based models that treat each wallet as a separate entity, this model provides a consolidated, holistic view of a user's on-chain financial state. It is fundamental for enabling sophisticated DeFi primitives like undercollateralized lending, cross-margin trading, and unified credit scoring by understanding a user's total exposure and creditworthiness across their entire portfolio.
Per-ID Accounting
What is Per-ID Accounting?
A blockchain accounting model that tracks assets and liabilities for individual user identities rather than just wallet addresses.
The model operates by linking disparate addresses and smart contract positions to a cryptographically verifiable user identifier, such as a decentralized identifier (DID). This allows protocols to perform global risk calculations across all of a user's interconnected positions. For instance, a lending protocol using Per-ID Accounting can assess the combined value of a user's collateral spread across ten wallets against their total borrowed assets from multiple pools, enabling features like portfolio margining and preventing users from over-leveraging by opening isolated positions on different addresses.
Key technical implementations often involve stateful smart contracts or specialized oracle networks that maintain and attest to a user's aggregated balance sheet. When a user interacts with a protocol, it can query this attested state to make permissioned decisions, such as granting a loan based on total net worth rather than single-asset collateral. This shifts the paradigm from collateral-centric to identity-centric finance, reducing capital inefficiency and enabling trust-based transactions that mirror traditional finance, but on a transparent, programmable blockchain substrate.
The primary use cases for Per-ID Accounting are found in advanced DeFi lending, prime brokerage services, and on-chain credit markets. It allows for undercollateralized loans, where credit is extended based on a user's verified reputation and overall asset footprint. Furthermore, it is crucial for cross-protocol composability, as a user's risk profile can be portable across different applications, creating a seamless and integrated financial experience without the silos of address-based isolation.
Adopting Per-ID Accounting introduces complex challenges around privacy, identity proofing, and state management. Solutions must balance transparency with data minimization, often leveraging zero-knowledge proofs to attest to financial health without revealing underlying transaction details. Its development represents a significant evolution in blockchain economic design, moving the ecosystem closer to replicating the nuanced financial relationships of the traditional world while retaining the core benefits of decentralization and auditability.
How Per-ID Accounting Works
A technical breakdown of the accounting model that tracks assets and liabilities for individual entities within a shared ledger.
Per-ID accounting is a blockchain-native accounting model that tracks assets, liabilities, and transaction history for distinct, non-custodial entities (IDs) within a single shared ledger state. Unlike traditional aggregate models that pool funds, this system maintains isolated financial statements for each participant, enabling precise attribution of on-chain activity—such as yields, fees, and debt positions—to specific wallets, smart contracts, or sub-entities. This granularity is fundamental for protocols managing complex financial relationships, like those in decentralized finance (DeFi) and real-world asset (RWA) tokenization.
The mechanism operates by mapping all on-chain events—deposits, withdrawals, interest accruals, fee assessments—to a unique identifier, often a cryptographic public key or a smart contract address. Each ID's state is updated atomically with every transaction, ensuring its balance sheet reflects real-time solvency and performance. This is analogous to a bank maintaining separate ledgers for each customer, but executed transparently and programmatically on a blockchain. Key technical components include state trees for efficient proof-of-inclusion and event-sourcing patterns that reconstruct any entity's historical position from an immutable log.
A primary application is in decentralized lending protocols. When a user deposits collateral, the system does not merely add to a global pool; it credits a liability to the protocol's balance sheet and an asset to the user's Per-ID account. Interest accrues specifically to that account, and liquidation triggers are evaluated against its isolated collateral ratio. This prevents the misallocation of risk and ensures precise settlement. Similarly, in decentralized autonomous organizations (DAOs) with sub-treasuries or venture arms, Per-ID accounting allows each department to have its own transparent, auditable capital account while sharing the underlying treasury smart contract.
Implementing this model requires careful smart contract architecture to avoid state bloat and ensure gas efficiency. Common patterns involve using nested mappings (e.g., mapping(address => mapping(address => uint256))) to track assets per user per token, or employing synthetic asset systems where balances are represented as shares of a global pool, with the accounting logic ensuring correct entitlement. The choice between an explicit balance model and an implicit share model depends on the trade-offs between computational cost and accounting clarity for the specific use case.
For analysts and auditors, Per-ID accounting provides the foundational data structure for generating compliant financial reports, calculating protocol revenue, and assessing entity-specific risk. It transforms raw blockchain transaction data into organized, attributable financial statements. This capability is critical for institutional adoption, as it enables the transparency of public blockchains to be harnessed for traditional financial scrutiny, moving beyond simple balance queries to holistic financial analysis of on-chain entities.
Key Features of Per-ID Accounting
Per-ID Accounting is a blockchain accounting model that tracks assets and liabilities for each unique user identifier (ID) within a smart contract, enabling granular financial primitives. This contrasts with traditional models that pool user funds.
Granular Isolated Positions
Each user's position is tracked as a distinct, non-fungible ledger entry within the protocol's state. This enables:
- Isolation of risk: One user's insolvency does not directly impact others.
- Individual collateralization: Loan-to-Value (LTV) ratios and health factors are calculated per user.
- Customizable terms: In theory, parameters like interest rates could be set per ID, though often standardized.
Direct Asset Ownership
Assets are not commingled in a shared pool. When a user deposits ETH, the protocol's accounting state records that specific balance against their ID. This creates clear, auditable ownership trails and simplifies the proof of reserves, as the sum of all user balances must equal the contract's total holdings.
Enabling Under-Collateralized Lending
By associating debt with a specific, non-fungible ID, protocols can implement credit-based systems. Lenders can assess the risk of a specific borrower's ID over time, allowing for:
- Credit lines: Reusable borrowing capacity.
- Reputation-based terms: Better rates for reliable borrowers.
- This is a foundational shift from the over-collateralized norm in DeFi.
Composability & Interoperability
A standardized Per-ID state model allows other smart contracts ("composers") to programmatically inspect and interact with a user's isolated position. Examples include:
- Portfolio managers that can rebalance across multiple protocols using a single user ID.
- Cross-margin accounts that net positions across different asset markets.
- Risk oracles that aggregate health factors.
Contrast with Pool-Based Models
This model is fundamentally different from Automated Market Makers (AMMs) or shared liquidity pools.
- AMM: Users provide liquidity to a shared fungible pool (e.g., LP tokens), sharing in pooled profits and losses.
- Per-ID: Users maintain direct, isolated claim to their specific deposited assets and generated yield. Risk and reward are not shared with other participants by default.
Implementation & Gas Overhead
The main technical trade-off is increased gas cost and state bloat. Storing and updating a separate ledger for each user is more expensive than updating a single pool balance. Optimizations include:
- Using storage slots efficiently (e.g., packing data).
- State rent concepts or periodic settlement to prune inactive accounts.
- Accepting higher cost for the benefit of advanced financial logic.
Comparison with ERC-20 and ERC-721 Accounting
A comparison of the core accounting methodologies for fungible (ERC-20), non-fungible (ERC-721), and per-ID (ERC-1155) token standards.
| Accounting Feature | ERC-20 (Fungible) | ERC-721 (Non-Fungible) | ERC-1155 (Per-ID) |
|---|---|---|---|
Primary Unit of Account | Global Token Balance | Individual Token ID | Balance per Token ID |
Balance Tracking Method | Single | Dual | Nested |
Transfer Granularity | Fungible Amount | Whole NFT (Token ID) | Amount per Token ID |
Batch Operations | |||
Single Contract Multi-Asset Support | |||
Gas Efficiency for Multi-Transfers | Linear cost per recipient | Linear cost per NFT | Constant cost for batch |
Default Metadata Association | Contract-level (optional) | Per Token ID | Per Token ID |
Examples and Use Cases
Per-ID Accounting is a financial model that tracks assets and liabilities for each unique user or entity, enabling granular risk management and capital efficiency. Below are key applications and real-world implementations.
GameFi & NFT-Fi Economics
Play-to-earn games and NFT lending use Per-ID Accounting to manage in-game assets and financial stakes.
- Player inventories: Each player's earned tokens, NFTs, and in-game items are accounted for separately.
- NFT-collateralized loans: Platforms like NFTfi track loans against specific NFT collateral held in a user's wallet, with liquidation triggers based on that NFT's value.
- Yield-bearing NFTs: The yield generated by a staked NFT (e.g., from a liquidity position) is attributed to the holder's specific token ID.
Institutional Treasury Management
DAOs and crypto-native companies use Per-ID Accounting for precise treasury management and multi-sig operations.
- Departmental budgeting: Funds can be allocated to specific sub-DAOs or project wallets, with spending tracked per entity.
- Vesting schedules: Token grants for employees or investors are managed per recipient, with automated, transparent unlock schedules.
- Grant disbursement: Grant programs can track funding, milestones, and remaining balances for each grantee individually on-chain.
Regulatory Compliance & Reporting
Per-ID Accounting provides an immutable audit trail essential for financial compliance.
- Tax reporting: Every transaction and yield event is attributable to a specific wallet, simplifying capital gains calculations.
- Proof-of-Reserves: Exchanges and custodians can cryptographically prove customer liabilities match held assets by aggregating Per-ID balances.
- Anti-Money Laundering (AML): While pseudonymous, the persistent ledger of activity per address aids in chain analysis and investigation.
Per-ID Accounting
An advanced accounting model that tracks assets and liabilities for individual user identifiers, enabling granular financial analysis and efficient resource management on blockchain networks.
Per-ID Accounting is a blockchain-native accounting paradigm that maintains separate, auditable ledgers for each unique user identifier (ID), such as an address or smart contract, rather than aggregating data into monolithic global states. This model treats each ID as an independent accounting entity with its own balance sheet, tracking assets, liabilities, and transaction history in isolation. The approach provides a foundational layer for on-chain financial primitives, enabling precise attribution of value flows and capital efficiency metrics directly from the protocol layer, which is essential for decentralized finance (DeFi) and institutional-grade analytics.
The technical efficiency of this model stems from its deterministic state resolution. By isolating financial states per ID, systems can compute an entity's net position without needing to process the entire global ledger, drastically reducing computational overhead for common queries like balance checks or profit/loss calculations. This isolation also enhances data sharding and parallel processing capabilities, as the state for non-interacting IDs can be managed independently. Furthermore, it enables selective state pruning and history compaction for inactive accounts, optimizing long-term blockchain storage requirements without compromising auditability for active participants.
For developers and protocols, Per-ID Accounting unlocks powerful primitives such as real-time risk engines, automated margin calls, and cross-margin collateral management that operate with atomic precision. A practical example is a lending protocol that can instantly calculate the loan-to-value ratio for a single borrower by querying only that user's isolated state, rather than scanning all collateral and debt positions. This granularity also facilitates composable financial statements, where the aggregated activity of a DAO treasury or a fund's portfolio can be derived by summing the per-ID states of its constituent addresses, providing transparency and operational efficiency unmatched by traditional batch-processing methods.
Ecosystem Usage
Per-ID Accounting is a blockchain accounting model that tracks assets and liabilities for individual user identities (IDs) rather than wallet addresses, enabling unified financial profiles across multiple chains and wallets.
Core Mechanism
At its core, Per-ID Accounting creates a persistent, on-chain identity primitive (like a Soulbound Token or a verifiable credential) that acts as a root account. All financial interactions—deposits, loans, trades—are recorded as credits and debits against this single ID, regardless of which underlying wallet address or blockchain was used. This decouples financial state from specific addresses, enabling portable reputation and cross-chain composability.
Key Distinction from UTXO/Account Models
This model differs fundamentally from traditional blockchain accounting:
- UTXO Model (Bitcoin): Tracks discrete, unspent transaction outputs linked to specific script hashes (addresses).
- Account Model (Ethereum): Maintains balance and nonce for each externally owned account (EOA) address.
- Per-ID Model: Aggregates state from all addresses and smart contracts associated with a verified identity into a single ledger. It answers "what is Alice's net position?" not "what is in wallet 0xABC?"
Enabling Under-Collateralized Lending
A primary use case is enabling trust-based or under-collateralized lending. By aggregating a user's total on-chain assets, income streams, and repayment history across all their wallets, a protocol can assess cross-margin creditworthiness. A user could post collateral on Arbitrum and borrow against it on Base, with the Per-ID ledger managing the global risk position, moving beyond isolated, over-collateralized pools.
Composability & Programmable Finance
Per-ID Accounting acts as a financial layer for DeFi composability. Smart contracts can permissionlessly query a user's holistic balance sheet. This enables:
- Universal debt ceilings: A single borrowing limit across multiple protocols.
- Cross-protocol margin calls: Automated liquidation if aggregate health factor falls below a threshold.
- Portable social recovery: Financial accounts recoverable via identity, not seed phrases.
Implementation & Primitives
Implementation relies on key cryptographic and blockchain primitives:
- Identity Attestations: Verifiable credentials or Soulbound Tokens (SBTs) issued by registries (e.g., ENS, proof-of-personhood protocols) to bind wallets to an ID.
- State Networks: Specialized L2s or co-processors (like zkRollups or Coprocessors) that maintain the canonical, aggregated ledger off-chain or on a dedicated chain for scalability.
- Verification Modules: Smart contracts that verify attestations and allow protocols to query the Per-ID state.
Challenges & Considerations
Widespread adoption faces significant hurdles:
- Privacy: Aggregating all financial activity under one ID creates profound privacy risks, requiring advanced zero-knowledge proofs.
- Identity Sybil Resistance: The system's integrity depends on robust, sybil-resistant identity issuance, a non-trivial problem.
- Standardization: Requires industry-wide standards for ID formats, attestation schemas, and state query APIs to achieve interoperability.
- Legal & Regulatory: May create clearer liability trails, intersecting with KYC/AML frameworks.
Frequently Asked Questions (FAQ)
Common questions about the Per-ID Accounting model, a foundational concept for tracking on-chain activity and managing protocol incentives.
Per-ID Accounting is a blockchain data model that tracks and aggregates on-chain activity (like gas fees, transactions, or rewards) for a unique identifier, such as a wallet address or smart contract. It works by mapping all relevant on-chain events to a persistent ID, creating a continuous, non-resettable ledger of that entity's behavior and contributions over time. This model is fundamental for protocols that need to calculate user-specific metrics, distribute rewards based on historical activity, or implement Sybil-resistance mechanisms by analyzing the provenance of an identity's actions. Unlike simple balance tracking, it creates a longitudinal profile of an entity's entire on-chain footprint.
Get In Touch
today.
Our experts will offer a free quote and a 30min call to discuss your project.