REA Concept

Difficult-to-Interpret Blockchain Transactions

Compared to traditional financial transactions, blockchain transactions are often more complex, making the underlying events they represent difficult to understand. This complexity is further exacerbated when transactions involve smart contracts. Due to the decentralized nature of blockchain, anyone can create smart contracts without clear rules, leading to an increasing number of difficult-to-interpret transactions.

This presents two problems:

  1. Lack of Clarity: Ordinary users find it challenging to understand the impact behind blockchain transactions, preventing accurate financial analysis.

  2. Integration Difficulties: Traditional platforms face compatibility issues when integrating blockchain transactions, hindering the broader application of blockchain technology.

To address these issues, we need a standardized and normalized information model that can handle blockchain transactions in a user and system-compatible manner.

REA Information Model

REA (Resource, Event, Agent) is a perfect solution. REA is a new accounting information model proposed by William E. McCarthy in 1982. It is an original description method of a business's economic activities, modeling the important resources, events, participants, and their interrelationships. It centralizes the storage of all business-related content (financial and non-financial) in databases by their actual semantics rather than artificially processed debit and credit entries.

The three main features of the REA model are data-based, semantic-based, and structure-based. These features meet the need to understand and store blockchain transactions and can be accepted by traditional ERP systems. Here is an example demonstrating the information results interpreted based on the REA model.

Blockchain TxREA Interpretation

0x37cd2a3f7c1bf25276b39f629677d10c0d32a7a0ab8fa24c9ef15ad2c9a7afa6

  • 0xbed…7c6b repaid a loan principal of 2,000 USDC to Aave Protocol v2

  • 0xbed…7c6b paid a loan interest of 340.35 USDC to Aave Protocol v2

  • 0xbed…7c6b paid a gas fee of 0.0066 ETH to Ethereum Validator

EventsResourcesAgents (from)Agents (to)

repay (loan principal)

2,000 USDC ($2,000)

0xbed...7c6b

Aave Protocol v2

pay (loan interest)

340.353418 USDC ($340.35)

0xbed...7c6b

Aave Protocol v2

pay (gas)

0.006266591 ETH ($10.8)

0xbed...7c6b

Ethereum Validator

REA Data Scheme

Through the Mest Protocol, anyone can annotate an Agent for a blockchain address, and if the address is a smart contract, they can also annotate Event information for the corresponding contract method.

{
  "id": "4376c65d2f232afbe9b882a35baa4f6fe8667c4e684749af565f981833ed6a65",
  "pubkey": "6e468422dfb74a5738702a8823b9b28168abab8655faacb6853cd0ee15deee93",
  "created_at": 1673347337,
  "kind": 1011,
  "address": "0x37cd2a3f7c1bf25276b39f629677d10c0d32a7a0ab8fa24c9ef15ad2c9a7afa6",
  "tags": [
    ["agent", "Aave Protocol v2", "4376c65d2f232afbe9b882a35baa4f6fe8667c"]
    ["event", "Repay loan", "0x573ade81", "bab026fc230a0e3542bfaded54263d2d542fa"],
    ...
  ],
  "sig": "908a15e46fb4d8675bab026fc230a0e3542bfade63da02d542fb78b2a8513fcd0092619a2c8c1221e581946e0191f2af505dfdf8657a414dbca329186f009262"
}

The tags represent labels related to the address, divided into two types: agent and event:

  • Agent tag ["agent", "agent name", "tag submission ID"]

  • Event tag ["event", "event name", "contract method signature", "tag submission ID"]

Each address can contain multiple agent and event tags, and how these tags will be used is up to the application layer to decide, such as introducing a voting mechanism to select consensus labels, etc.

最后更新于