# Detailed Explanation of the Core Mechanism Architecture

The design philosophy of the OmniPact protocol is based on "Deterministic Execution" and "Game Theoretic Equilibrium". This chapter will analyze, from the micro-level of mathematical models and algorithm implementation, how the protocol constructs a censorship-resistant, collusion-proof, and Turing-complete decentralized trust network.

### 1 .The OES Engine

OES (Omni Escrow System) is the core of the protocol, designed with a Finite State Machine (FSM) architecture to ensure the atomicity and irreversibility of the on-chain state transition of each transaction.

#### 1.1 Deterministic State Automaton

The transaction lifecycle is abstracted as a mathematical set $S = \\{S\_{init}, S\_{lock}, S\_{del}, S\_{disp}, S\_{fin}, S\_{void}\\}$。State transition function $\delta: S \times E \rightarrow S$Defines the unique legal path, where $E$ is the set of triggering events.

State Transition Topology and Constraint Logic:

1. $$ $S\_{init} \rightarrow S\_{lock}$ $$ (Atomic Locking):
   * Constraints: $$ $\sum\_{i=1}^{n} Asset\_i \ge Amount\_{req}$ $$。The state changes atomically only when sufficient funds are deposited into the Vault contract. At this point, the ownership of the funds is taken over by the smart contract, and any unilateral withdraw call from either party will be `revert`。
2. $$ $S\_{lock} \rightarrow S\_{del}$ $$ (Proof of Delivery):
   * The seller submits hash evidence $$ $H(E)$ $$(such as IPFS CID or logistics API signature).In this state, the buyer's funds remain locked, but the seller obtains an on-chain certificate of "fulfilled" and opens the inspection window.（Inspection Window, $$ $T\_{insp}$ $$）。
3. $$ $S\_{del} \rightarrow S\_{fin}$ $$ (Settlement):
   * Trigger condition: called by the buyer `confirm()` or triggered by the time oracle$$ $t\_{now} > t\_{lock} + T\_{insp}$ $$ and there is no dispute.
   * Execution logic: Contract triggering `Call` Operation, execution of funds $$ $Asset \rightarrow Seller$ $$ transfer.
4. $$ $S\_{any} \rightarrow S\_{disp}$ $$ (Dispute Injection):
   * This is the "abnormal interrupt vector" of the protocol. Once triggered, the FSM is suspended, control is transferred to the DAN governance contract, and funds enter a "frozen state" waiting for input signals from the arbitration layer.

#### 1.2 Timelocks with Liveness Guarantees

To prevent "Deadlock" attacks (i.e., the permanent locking of funds due to the loss of one party's private key)，OES introduces dual-layer temporal guardrails (Dual-Layer Temporal Guardrails)：

* T\_{delivery}(Delivery timeout threshold):

  If t\_{now} > T\_{delivery}and the state remains S\_{lock},Mathematical logic determines that the seller is in default (Default)。The buyer obtains ForceWithdraw Permission.
* T\_{approval} (Approval silence threshold):

  If t\_{now} > T\_{delivery} + T\_{insp}and the status is S\_{del}, mathematical logic determines that the buyer is satisfied by default.Keepers Network invocable ForceRelease，Earn Gas compensation and complete the payment to the seller.

***

### 2.DAN: Decentralized Arbitration Network

DAN is a crowdsourced oracle network based on Schelling Point game theory, designed to resolve "non-deterministic disputes," which we define as an "objectified consensus system of subjective truth."

#### 2.1 Cryptographic Sortition & Sybil Resistance

To ensure the independence of the jury, we have abandoned simple pseudo-randomness and adopted Verifiable Random Functions (VRF) for weighted lottery drawing.

Probability selection formula:

For any node $i$, the probability $P(i)$ that it is selected as an arbitrator is defined as:

$$
P(i) = \frac{\sqrt{S\_i} \cdot R\_i}{\sum\_{j=1}^{N} (\sqrt{S\_j} \cdot R\_j)}
$$

* $$ $S\_i$ $$: The number of $PACT tokens staked by the node (using square root smoothing to prevent monopoly by whales).
* $$ $R\_i$ $$: The Omni-Score reputation coefficient of the node (normalized).
* Sybil Resistance：due to $$ $\sqrt{A+B} < \sqrt{A} + \sqrt{B}$ $$，Splitting an account will lead to a decrease in the total selection probability, thereby mathematically suppressing the sybil attack.

#### 2.2 Schelling Point Game and Commit-Reveal Voting Mechanism

DAN is built on the Nash equilibrium: in a non-cooperative game, if you cannot communicate with other arbitrators, the best strategy is to choose "the option you think most people will choose" (i.e., the truth).

Two-Phase Protocol:

1. Commit Phase :

   Arbitrator J\_i locally generates voting intention V and introduces high-entropy random salt Salt. Submit the hash value to the chain:

$$
H\_i = \text{Keccak256}(V\_i \parallel Salt\_i \parallel \text{Address}\_i)
$$

* Security purpose: Hide the voting content to prevent "bandwagon voting" or "lazy arbitration".

1. Reveal Phase :

   The arbitrator publicly discloses V\_i and Salt\_i. The smart contract verifies whether H\_i matches.
2. Incentive Mechanism :

$$
Reward\_i = \begin{cases} B\_{base} + \frac{S\_{slashed}}{N\_{maj}} & \text{if } V\_i = V\_{majority} \ -S\_{stake} \cdot \alpha & \text{if } V\_i \neq V\_{majority} \end{cases}
$$

Reward\_i = \begin{cases} B\_{base} + \frac{S\_{slashed}}{N\_{maj}} & \text{if } V\_i = V\_{majority} \\\ -S\_{stake} \cdot \alpha & \text{if } V\_i \neq V\_{majority} \end{cases}

* If an arbitrator votes for the minority, a certain proportion of their pledged assets $$ $\alpha$ $$ It will be confiscated and distributed to the majority arbitrators. This constitutes a strong economic constraint, forcing the nodes to tend to be honest.

#### 2.3  Recursive Appeal & Supreme Court

To correct statistical biases, the system supports recursive appeals. In each round of appeal, the number of arbitrators grows exponentially. ($$ $2k+1$ $$)，The pledge cost has doubled.

Supreme Court Trigger:

When the cost of appeal $C\_{appeal} > \text{DisputeAmount} \times 50\\%$ Or when global security parameters are triggered, the Final Adjudication Senate elected by the DAO will intervene.The Final Adjudication Senate no longer relies on randomness, but conducts open voting based on real-name reputation (Proof of Identity). Its rulings have eventual consistency (Eventual Consistency) and directly rewrite the Ledger state.

***

### 3.Omni-ID： (Reputation Vector Model)

Omni-ID is not just an NFT; it is a dynamic reputation container built based on the ERC-5192 (Minimal Soulbound NFTs) standard. The Reputation Score is not accumulated linearly; instead, it is a complex function based on time decay and multi-dimensional vectors.

#### 3.1 Reputation Algorithm

User's current reputation $$ $R(t)$ $$ Determined by the following models:

$$
R(t) = \tanh\left(\frac{V\_{tx}}{K}\right) \cdot (1 - e^{-\lambda T\_{age}}) \cdot C\_{history} - P\_{malicious}
$$

* $$ $\tanh(\cdot)$ $$: Hyperbolic tangent function, ensuring that the score has an upper limit (such as 1000 points) and that it changes along with the transaction amount $$ $V\_{tx}$ $$ Increase, diminishing marginal returns.
* $$ $(1 - e^{-\lambda T\_{age}})$ $$: Time maturity factor. Even if a new account has a huge transaction volume, its credit score will be limited by the account's duration (to prevent "flash" fraud).
* $$ $C\_{history}$ $$: Fulfillment coefficient (number of successful transactions / total number of transactions).
* $$ $P\_{malicious}$ $$: Penalty term. Once a fraudulent act occurs (losing an arbitration), this term will expand exponentially, instantly destroying credibility, realizing that "building credibility is like hiking up a mountain, while destroying credibility is like falling from a height."

#### 3.2 Permissioned Access Control

The underlying layer of the smart contract is based on $$ $R(t)$ $$ Implement Access Control List (ACL):

* Tier 1 (Newbie): Only for small transactions, with high fees and full collateral required.
* Tier 3 (Veteran): Unlock unsecured lending, qualification to act as an arbitrator, and API high-frequency call permissions.

***

### 4.Privacy & ZK-Compliance

OmniPact adopts a hybrid architecture of "on-chain verification and off-chain computing", which defends users' privacy sovereignty while complying with GDPR and AML regulations.

#### 4.1 Zero-Knowledge Proofs

We have integrated zk-SNARKs (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) technology.

* Circuit Logic :

  The prover $P$ proves to the verifier $V$ (smart contract) that:

  "I know the private key of a legitimate KYC credential $C$, and this credential has not expired, and the identity is not in the OFAC sanctions list hash tree $T$."
* Output:

  Only Proof $\pi$ and Nullifier (to prevent double usage) are stored on the chain, without storing any PII (Personally Identifiable Information). This achieves compliance at the mathematical level.

#### 4.2 ECIES Hybrid Encryption and TEE Enclave

For sensitive business data (such as original RWA contracts, API Keys):

1. Transport layer: Uses ECIES (Elliptic Curve Integrated Encryption Scheme). The sender derives a temporary shared key using the receiver's ETH public key to achieve end-to-end encryption.
2. Computation Layer: For data that requires "burn after reading" or "privacy-preserving computation", a Trusted Execution Environment (TEE) built using Intel SGX / AMD SEV is utilized. Data is decrypted and processed within the CPU hardware isolation area. Due to memory encryption, even the Node Operator cannot peek into the content of the data.
