Back to leaderboard
Season 1 · DeFi & Open Finance

OPNVault

Secures OPN collateral to mint oUSD with debt capacity scaled by NeoID status

Stage 1, ReviewDeFi & Open Finance

by drkamilla3920 · submitted Jun 12, 2026

Community votes

0

Voting opens when this submission reaches the Top 10 stage.

Overall score

/ 100

Weighted average across the 5 judging criteria.

Description

01/03

What the builder said.

Written by the team, rendered as the markdown they typed in the submission wizard.

What we built

OPNVault is a unified EVM-compatible Collateralized Debt Position (CDP) smart contract (OPNVault.sol) that inherits the ERC20 standard, functioning as both the vault engine and the stablecoin itself (oUSD).

The implementation enforces the following custom state controls and integrations:

  • Unified CDP Ledger: Consolidates debt and collateral accounting into a single address space, bypassing standard approve / transferFrom overhead by executing direct internal burns (_burn) during settlements.
  • NeoID State Fallback: Interfaces with INeoIDRegistry via try/catch, falling back to a local verification registry (hasVerifiedIdentity) in case of external registry failure or uninitialized state.
  • Non-Recursive TBA Resolution: Implements resolveIdentityHolder with a strict 30,000 gas limit on external calls. It halts evaluation if a nested contract owner is detected (tbaOwner.code.length > 0) to prevent stack-exhaustion and reentrancy loops.
  • Asymmetric Price Sanity Guard: Bounds manual admin overrides (setEmergencyManualPrice) to a maximum increase of +20% and a minimum of -90% relative to the last cached oracle price (lastValidPrice).

Why

We engineered this unified CDP architecture to align with the core primitives and economic design of OPN Chain:

  1. Gas Minimization on L1: Traditional multi-contract CDP designs require separate transactions for vault deposits, credit approvals, and token transfers. By consolidating the vault ledger and minting logic into OPNVault is ERC20, we eliminate state-sync overhead and reduce the transaction footprint during debt settlement.
  2. Identity-Tiered Leverage (NeoID): Rather than enforcing a static, conservative Loan-to-Value (LTV) limit across all users, the contract optimizes capital parameters based on sovereign credentials: verified NeoID accounts operate on a 70% baseline LTV, while unverified addresses are limited to 45% LTV.
  3. Smart-Wallet Portability for RWAs: Since tokenized RWA portfolios on OPN Chain utilize nested ERC-6551 accounts, checking credentials solely on msg.sender would penalize smart contract wallets. Tracing ownership to the root EOA ensures nested portfolios safely inherit the primary controller's NeoID status without exposing the contract to gas-griefing.

How it works

  1. Collateral Sourcing: Users lock native OPN via addCollateral(), updating user balances and system-wide TVL variables.
  2. Adaptive Credit Throttling: During mintStablecoin(), the contract checks the user's root NeoID status. It evaluates getDynamicLTVFactor(), scaling down maximum credit capacities linearly if the Global Backing Ratio (GBR) drops below 120% (1.2 ether) to a floor of 30% of the baseline limit at 105% GBR.
  3. Game-Theoretic Liquidation Constraints: If a position's health factor falls below 1.0 ether, it is marked for liquidation.
    • Anti-Gaming Limit: To prevent liquidators from performing micro-liquidations solely to harvest bonuses, the contract enforces resultingHF >= 1.05 on partial liquidations.
    • Dust Cleanup: If remaining collateral falls below 0.001 OPN, the contract forces a full liquidation to clean up state dust.
    • Insolvency Cap: If a position is fully insolvent, the bonus is capped at 103% to protect backing, and bad debt is logged to the totalBadDebt accumulator.

Roadmap

02/03

What ships next.

The builder's own next-quarter plan. Use it to gauge follow-through and ambition.

Season 1 - DeFi & Open Finance (Q2 2026 - Current)

  • Deployment & Validation (Completed): Deployed core OPNVault CDP contract and native oUSD stablecoin ledger on OPN Testnet, validating basic credit state transitions and health factor evaluations.
  • Risk Constraint Testing (Active): Executing automated test scenarios to stress-test oracle circuit-breaker failover limits and verify the resultingHF >= 1.05 anti-gaming threshold.
  • Pre-Execution Simulator: Polished the React frontend dashboard with live, local transaction simulation capabilities for active position health monitoring.

Season 2 - Identity & Reputation (Q3 2026)

  • Reputation-Tiered LTV Scaling: Upgrade on-chain identity checks from a boolean status to a continuous reputation score. Connect LTV caps directly to NeoID Trust Score parameters (scaling baseline LTV up to 80% for high-reputation holders).
  • EVM Gas Profiling for TBA: Optimize the assembly implementation of the single-hop ERC-6551 owner resolver (resolveIdentityHolder), minimizing SLOAD/EXTCODESIZE overhead during execution.

Season 3 - Real World Assets (Q4 2026)

  • Multi-Collateral Adapter Layer: Transition OPNVault from a single-collateral engine to a multi-collateral CDP architecture. Integrate custom adapter vaults to support fractionalized, yield-bearing real-world assets (RWAs) as collateral.
  • Risk Parameter Decentralization: Relinquish deployer contract ownership to an on-chain Multi-Sig Timelock Controller, enabling community-governed voting on dynamic risk parameters, caps, and stability reserve thresholds.

On-chain proof

03/03

1 contract on OPN Chain.

The chain itself confirmed every deployment is valid, signed by the builder's wallet, and inside the season's window.

  • 01OPN USD StablecoinPrimary

    0xFc88002b58429D06e8D2b01f7b4Ab86c1A14927B

    tx 0x998f20582c675b76f70e580089a2d30f73fa4b17d6078b6bae3f0c829e41ae33

    deployed Jun 9, 2026 · block 18239522