Skip to content
Go back

Inside Project 0's Security Stack: Rebuilding Trust in DeFi

Engineering

Every piece of software that handles money is a risk vector. AI has made finding vulnerabilities dramatically more persistent, with models probing systems around the clock.

That sounds like bad news for crypto. We believe it has, or is about to, make DeFi more secure than its centralized counterparts.

Over the last year, cyber attackers have arguably benefitted from an offense-dominant environment with less secured attack surface area and teams equipped with weaker AI cyber models. We are nearing, or for much of DeFi have potentially passed, a turning point where cyber security becomes defense-dominant, with teams having access to powerful models that can comprehensively review code before it ships to production. Bugs that arrive or remain on production are less likely to be severe, and automated bug bounty systems can quickly remove any lower priority bugs that may have escaped review. There are only a finite amount of bugs in serious production code, and teams shipping that code now, or soon will, have the upper hand.

However, security extends beyond code. In the first half of 2026, DeFi protocols lost $1.32 billion across 344 incidents. Excluding last year’s $1.45 billion Bybit hack, losses were roughly 28% higher. Compromised private keys overtook smart contract bugs as the leading attack vector for the first time on record, highlighting the risk to the people and infrastructure behind protocols.

Drift illustrates this shift. On April 1, attackers drained $285 million after spending months socially engineering its Security Council into pre-signing transactions that concealed admin approvals. They struck days after the Council reduced its multisig threshold to 2-of-5 and removed its timelocks. With admin control, they listed fake collateral and drained real assets.

Stronger code alone can only mitigate this. Audits, bug bounties and formal verification need to work alongside secure key management and operational safeguards.

Every incident damages confidence beyond the affected protocol. Users everywhere ask the same question: is my capital safe here?

At Project 0, we believe restoring trust in DeFi is extremely important for the success of not only Project 0, but the industry as a whole. We built our security stack to showcase that. No single audit, key or safeguard stands between an attacker and your capital. Instead, we run a set of independent defenses, each designed so that if one is tested, the others still hold.

Here’s what that stack looks like, and how we built it around the lessons DeFi keeps learning the hard way.

Over Three Years of Proven Security

P0’s programs have gone more than three years without a program exploit, including zero oracle exploits, across $19.33B in processed volume.

We go further yet when our users find trouble. Earlier this year, a P0 user clicked a phishing link on a third-party site and had their wallet completely compromised. While the rest of the user’s funds were drained, the roughly $3 million they had deposited on P0 was still there, because our account architecture had blocked the attacker’s drainer. We built a recovery tool in real time (while the team was traveling, huddled in an airport), tested it with our own money, and recovered our user’s funds from the exploiter’s control.

Most protocols have no one to call. We think serious capital deserves a team that picks up.

No Single Key, No Single Person

Drift fell because too few signers guarded too much power, and nothing slowed the attack down.

On P0, upgrading the program requires 7 of 15 multisig signers. Important configuration changes, including bank parameters, oracle settings and risk profiles, require 5 of 15. Access is limited to what each role needs, and every change is threat-modeled before it ships.

Routine adjustments have their own permissions. Dedicated “curve” and “limit” admins can adjust interest rate curves and caps as conditions change, without getting access to more sensitive controls like changing oracles or listing new banks.

During an incident, speed matters. Two signatures can pause the entire program, stopping all actions while the team responds. Turning it back on requires a full vote. That lets us react quickly without giving those two signers the power to restart operations on their own.

More safeguards are coming in version 0.1.12, currently targeted for the next two to three weeks. This upgrade will disallow durable nonces and introduce an additional timelocked multisig for critical changes, including oracle settings and adding new banks. The timelock adds a delay before those changes take effect, giving the team time to spot and respond to suspicious activity.

You can find the full breakdown of admin roles and permissions on GitHub.

The idea is simple: move quickly to contain a problem, and give sensitive changes more time and scrutiny.

Brutus: Custom-Built Risk Management

Project 0 runs on Brutus, our dynamic risk engine. Brutus adjusts risk recommendations as markets move. Every parameter change set by Brutus is on-chain, transparent and verifiable.

Brutus deserves its own article, and we’ll follow up with what it’s capable of soon. Here, we’ll detail some of the extensive program safeguards we’ve complemented Brutus with.

Circuit Breakers

During abnormal price moves, circuit breakers pause new borrowing, leveraged withdrawals and liquidations. Repayments and debt-free withdrawals remain available, subject to applicable flow limits.

Two additional safeguards limit how much an attack can drain:

Together, these controls limit both how much collateral value the system recognizes and how quickly liquidity can leave, helping contain the damage even if a manipulated oracle reports an effectively infinite price.

Risk Review Beyond the Code

Managing risk also means understanding who is taking it. We review users’ risk profiles to help them find strategies with a risk-reward balance suited to their goals and tolerance for losses.

That scrutiny extends to every venue we integrate into our unified margin and credit market. We conduct in-depth due diligence before adding an integration and continue reviewing its risks afterward. An integration passing its initial review is the start of that process, not the end.

Oracles That Assume the Worst

The Drift attacker’s fake collateral was backed by a pool with about $500 of real liquidity and weeks of wash-traded price history. Price feeds remain one of the easiest ways into a protocol.

P0 prices every asset conservatively:

A thirty-minute price spike can’t inflate your borrowing power on P0.

Paying Hackers to Find Bugs First

Our bug bounty pays up to $500,000 for critical vulnerabilities: 2% of the value at risk, with a $50,000 minimum. High-severity bugs earn $10,000 to $50,000.

In 2025, a researcher reporting through our bounty found a critical flaw in our flash-loan logic that put more than $160 million in deposits at risk. We patched it before any manipulation strategies could be enacted. No funds were lost.

Security Beyond Code: STRIDE

A code audit cannot tell you whether a team can govern upgrades, protect signing access or respond to an incident. Project 0 also participates in STRIDE, a Solana security initiative developed by Asymmetric Research and the Solana Foundation.

STRIDE examines security across eight pillars and 40 controls, including program security, governance, external dependencies, infrastructure, release processes and incident response. Its independent assessments and public findings give teams a common framework for identifying gaps and give users more to inspect than an audit badge. You can learn more at stride.asymmetric.re.

Vaults That Don’t Just Chase Yield

Project 0 Vaults, built with Gamma, are held to the same standard.

Drift showed the danger of yield-chasing vaults: one Drift-integrated product that routed capital to the highest rates lost about 93% of its TVL while allocating into Drift during Drift’s exploit. That vault shut down shortly after Drift confirmed it was hacked.

Our vaults:

Operationally, Gamma’s keys sit in non-exportable Google Cloud KMS, every team account requires a hardware security key, and vault program upgrades require a 3-of-5 timelocked Squads multisig outside the runtime environment.

The Drift Test

P0 connects your capital across Solana’s biggest venues, meaning a failure somewhere else can reach our users, even when our own code holds. Drift was that test.

Our program was integrated with Drift during Drift’s exploit, yet P0 lenders were protected far more than if they had deposited directly in Drift.

Approximately $1.91 million in bad debt was absorbed by the shared credit pool and allocated by asset risk:

Asset groupWrite-down
USDC, SOL, USDT1%
BTC, ETH and other majors2.61%
WIF, BONK and governance tokens6.62%

These calculations assumed Drift assets would go to zero.

Using P0 to diversify collateral sources while not fragmenting collateral proved to be a durable advantage when it was needed most, even at the very beginning of P0’s protocol journey. As P0 scales, so does its protection for its diversified users.

Audits, Every Time the Code Changes

Project 0 has completed 12 independent audits. Our code has been reviewed by OtterSec, Sec3, Hashlock, Accretion, Adevarlabs and Ackee Blockchain.

Every new smart contract gets a full audit before launch, and existing contracts are re-reviewed periodically. When we shipped liquidations, insurance, staked collateral, e-mode, our Kamino integration and fixed-price banks, each one went back to auditors first. Some of DeFi’s costliest exploits came from code added after the audit.

Everything is public. Our credit and risk engine is built on the marginfi protocol, the full audit history is on GitHub, and you can inspect the build yourself.

What’s Next

Trust in DeFi won’t come back through promises. It will come back through track records, transparency and systems built to hold when things go wrong.

No protocol is risk-free, and anyone promising that is selling something. What we can promise is that no single failure should be enough to hurt you. A phished signer, a manipulated price or a failed integration should each run into another wall. Every defense in this post exists because someone, somewhere, learned a lesson the hard way. Our job is to learn those lessons before they cost you, and to earn your trust every day we’re live.

Dig into our audits, oracle design and bug bounty at 0.xyz/security.

Try Project 0 today at 0.xyz ->

This article is for informational purposes only and is not a warranty, guarantee or investment advice. No system is fully immune to risk.


Share this post on:

Previous Post
DeFi for AI Agents: Co-Pilot Yield Without Lifting a Finger
Next Post
Introducing Project 0 Vaults: Machine Learning Grade Yield

Newsletter

Join the Project 0 Newsletter

Receive the latest product updates and announcements on Project 0.