OPNVault
Secures OPN collateral to mint oUSD with debt capacity scaled by NeoID status
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/transferFromoverhead by executing direct internal burns (_burn) during settlements. - NeoID State Fallback: Interfaces with
INeoIDRegistryvia try/catch, falling back to a local verification registry (hasVerifiedIdentity) in case of external registry failure or uninitialized state. - Non-Recursive TBA Resolution: Implements
resolveIdentityHolderwith a strict30,000 gas limiton 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:
- 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. - 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.
- Smart-Wallet Portability for RWAs: Since tokenized RWA portfolios on OPN Chain utilize nested ERC-6551 accounts, checking credentials solely on
msg.senderwould 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
- Collateral Sourcing: Users lock native
OPNviaaddCollateral(), updating user balances and system-wide TVL variables. - Adaptive Credit Throttling: During
mintStablecoin(), the contract checks the user's root NeoID status. It evaluatesgetDynamicLTVFactor(), scaling down maximum credit capacities linearly if the Global Backing Ratio (GBR) drops below120%(1.2 ether) to a floor of 30% of the baseline limit at105%GBR. - 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.05on 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
totalBadDebtaccumulator.
- Anti-Gaming Limit: To prevent liquidators from performing micro-liquidations solely to harvest bonuses, the contract enforces
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
OPNVaultCDP contract and nativeoUSDstablecoin 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.05anti-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.