In May 2026, an independent security audit of PFund's smart contract suite (PFundFactory, PFundPool, PFundPoolModule, PFundToken, PFundPoolDeployer) concluded with zero critical or high-severity vulnerabilities, fully verifying fifteen core protocol invariants. The audit team validated approximately 2,200 lines of Solidity code managing complex economic interactions. This outcome is the direct result of deliberate architectural choices merging AMM mechanics, fund accounting, and collateralized lending to ensure deep protocol resilience.
Innovation 1: Structural-Level Reentrancy Isolation
Reentrancy attacks remain a critical threat vector, having caused massive exploits like the 2016 DAO hack. Alongside the standard nonReentrant modifier, PFund implements a structural layer restricting module callbacks strictly to moments when the pool contract's internal lock is in the _ENTERED state. External logic within PFundPoolModule executes exclusively when the pool is already processing an internal transaction. The audit team classified PFund's layered reentrancy defense as "structural-grade".
Innovation 2: The Global NVP Index for On-Chain Fund Accounting
Distributing yield accurately to dynamic pool participants has historically required heavy computation or approximation errors. PFund resolves this via the Global Net Value Per Share index (globalNVP), a protocol-wide variable encoding the complete yield distribution history.
- At initialization, globalNVP is normalized to 1.
- When yield enters the Savings Pool, the liquid balance (savingsQuote) increases, proportionally updating globalNVP.
- Users record their entry index (nvp0) upon joining the pool.
- Earned returns are calculated dynamically as: $savings \times (globalNVP - nvp0) / nvp0$. The invariant that savingsQuote strictly remains greater than or equal to the sum of all users' principal shares holds at all times. This distribution mechanism demands O(1) storage reads and writes per transaction, delivering computational scalability entirely independent of user volume.
Innovation 3: The Oracle-Free Lending Architecture
Standard DeFi lending protocols depend heavily on price oracles, facing systemic failures, bad debt, and cascade liquidations when oracle feeds are manipulated or delayed. PFund removes this dependency entirely through an oracle-free lending architecture. Borrowing capacity relies on the formula: $B_0 = stakedToken \times savings / (liquidBalance + stakedToken)$ Available credit = $B_0 - borrowed$. A user's collateral consists entirely of their economic contribution to the Savings Pool (savings), an asset that accrues monotonically and remains isolated from AMM price volatility. An 80% AMM market crash leaves the lending system unaffected, as the collateral is strictly denominated in the pool's quote asset. The audit confirmed five mathematical lending invariants:
- I-1: Borrowing limits are rigorously bounded by a user's personal Savings Pool contribution ratio.
- I-2: Total pool borrowing permanently remains less than or equal to savingsQuote. The protocol executes atomic reductions and rejects any transaction exceeding this limit.
- I-3: Borrowing reduces the liquid balance without altering the principal ledger (totalSavingsShares) or the yield index (globalNVP) of any participant.
- I-4: Borrowing transactions never modify a user's savings or nvp0 values.
- I-5: Repayment unstaking formulas guarantee that released stake quantities remain within safe thresholds, leaving residual stake to fully cover residual debt.
Innovation 4: Anti-Leverage-Spiral Design
PFund prevents leverage spiral attacks through self-limiting credit mechanics. Subsequent borrow attempts face a reduced available credit ceiling of $B_0 - borrowed\_prev$. Since the previously borrowed amount is greater than zero, consecutive credit availability strictly diminishes. Simultaneously, the pool's global lending ceiling (savingsQuote) drops, producing diminishing marginal credit across both the individual and pool levels. This recursion securely converges to zero—an emergent mathematical property verified in Section 3.4 of the audit report.
Innovation 5: The Layered Tax Mechanism
AMM systems frequently suffer liquidity drains when early participants execute high-profit exits, heavily taxing subsequent users. PFund's linear profit tax mechanism converts this externality into a positive-sum redistribution:
- Profit ≤ 5%: Zero tax applies.
- Profit 5%–500%: A linear tax rate scales proportionally with profitability.
- Profit > 500%: A flat 50% tax cap goes into effect. Half of all tax revenue flows to the Savings Pool, while the remaining half enters the points reward pool. High-gain exits automatically become major yield events for remaining participants, establishing a dynamic where winners fund the ecosystem transparently.
Vision: From Protocol to Financial Infrastructure
PFund's modular design separates governance (PFundFactory), custody and accounting (PFundPool), and business logic (PFundPoolModule) to function as a declaration of long-term intent. User data stored in pool contracts persists indefinitely and remains entirely unaffected by module upgrades. The accounting layer is immutable. This architecture serves as the definitive financial infrastructure layer intended to power MEME markets over the coming decade.