3.2 The Vault Standard: OmniVault

OmniVault is the "central bank" of the protocol. It adopts a Singleton architecture to centrally manage all liquidity within the protocol. To maximize capital efficiency and ensure the rigor of accounting standards, OmniVault strictly adheres to the ERC-4626 Tokenized Vault Standard.

3.2.1 ERC-4626 Implementation for Yield-Bearing Escrow

In traditional guarantee agreements, funds remain idle during the Lock Period, resulting in significant opportunity costs. OmniVault converts idle funds into interest-bearing assets through modular Strategy Adapters.

1. Architecture Logic

OmniVault implements the IERC4626 interface. When a user deposits assets (such as USDC) into the collateral contract, the Vault will perform the following atomic operations:

  • Deposit: User deposits

  • Mint: Vault Mint internal tokens according to the current exchange rate (份额)。

  • Invest: Vault will Inject into low-risk DeFi protocols that have passed DAO whitelist certification (such as Aave V3 Lending Pool or Lido Staking).

2. Share Calculation

To handle the balance changes caused by interest accrual, Vault only tracks shares internally. The asset exchange rate is determined by the following formula:

ExchangeRate=TotalAssetsunderlying+AccumulatedYieldTotalSharesmintedExchangeRate = \frac{TotalAssets_{underlying} + AccumulatedYield}{TotalShares_{minted}}
  • When the guarantee ends (Finalization), the seller receives not only the original principal but also can choose to be configured to receive principal + returns, or the agreement will use the return portion as Protocol Revenue to repurchase $PACT tokens.

  • Risk isolation: Each asset (such as USDC, ETH) corresponds to an independent Vault instance to prevent the spread of bad debts from a single asset.

3. Strategy Safety

To prevent risks from external DeFi protocols, OmniVault has implemented strict "Conservative LTV" (Conservative Loan-to-Value) and "Emergency Exit" mechanisms. Once a peg deviation in an external protocol is detected, the Keeper will trigger emergencyWithdraw(), withdrawing the funds to the local Vault for freezing.


3.2.2 Asset Segregation Logic

Although all funds are physically stored in the same Vault contract address, logically, the funds for each secured transaction are absolutely isolated. This design of "physical centralization and logical isolation" greatly reduces Gas consumption.

1. Virtual ledger (Virtual Accounting Ledger)

VaultIt internally maintains a multi-dimensional mapping table as the sole source of truth(Source of Truth):

Solidity

2. Access Control List(Access Control List - ACL)

OmniVault Not just anyone can call it. It implements a strict whitelist mechanism:

  • OnlyOES: Only when OmniRegistryregistered in and the status is Active OES instance of(Proxy Contract)Only has the right to call transfer or withdraw Function.

  • Scope Restriction: OES instance A can only operate _escrowBalances[ID_A] funds. It strictly prohibits accessing or embezzling the balance of OES Instance B. This eliminates the risk of cross-order fund embezzlement at the code level.

3. Flash Loans & Liquidity Buffer

Due to Vault's deep capital pool, OmniVault natively supports the ERC-3156 Flash Loan standard.

  • Idle uninvested funds can be lent to arbitrageurs.

  • The handling fee generated by flash loans (such as 0.09%) is directly injected intoAccumulatedYieldso that all users engaged in secured transactions can passively share in this profit.

  • Safety lock: The flash loan logic is being ReentrancyGuard Wrap, and strictly verify callback the integrity of the remaining balance afterwards, ensuring zero risk to the principal.


OmniPact is not just a payment or transaction tool, but a financial infrastructure with DeFi composability and capital efficiency.

Last updated