Open research

Notes from the review desk.

Follow the money through DeFi protocols, the state through Solana programs, and the checks that make a cryptographic key usable.

12 articles / 4 topicsFollow via RSS

Research index

All articles

Subscribe to RSS

12 articles

Hack Analysis

Solv’s BRO vault incident and the backing behind a receipt

Reconciling custody with receipts explains how a single deposit could be credited twice. Solv’s later incident review establishes which vault and participants were affected.

Solv ProtocolIncorrect Accounting
3 min read
Solana

From mint to token account in SPL Token and Token-2022

Read a mint, derive its associated token account and interpret the size returned by the token program. Extensions can change both storage and the amount a recipient can spend.

SolanaSecurity
5 min read
Solana

Why Anchor accounts go stale after CPI, and when to reload

A token transfer changes the runtime balance from 40 to 55. Follow the two reads that still show 40 and the reload that lets the handler see 55.

SolanaSecurity
8 min read
Solana

Choosing init or init_if_needed for Anchor accounts

A vault record and its associated token account can require different initialization policies. Follow two deposits through the generated constraints and the handler.

SolanaSecurity
4 min read
DeFi

Morpho Internals Part 5: Who pays, owns the shares and can withdraw?

Trace the same payment into Morpho Blue and a MetaMorpho V1 vault. The caller, position owner, share owner and recipient can be different addresses.

MorphoLending
8 min read
DeFi

Morpho Internals Part 4: Where a MetaMorpho deposit goes

Track 60 units through two lending markets. Deposit caps decide where money goes in, while available liquidity and queue order decide what comes back out.

MorphoLending
28 min read
DeFi

Morpho Internals Part 3: What one oracle price buys

Turn a wstETH price into six-decimal USDC, follow the units through two feeds and see which side of the fraction changes when USDC moves.

MorphoLending
11 min read
Solana

Solana account creation when an address already holds lamports

A funded address can still need an application record. Follow the payer, owner program and rent shortfall through ordinary account initialization.

SolanaSecurity
3 min read
DeFi

Morpho Internals Part 2: How the borrow-rate curve moves

With the same 4% anchor, 85% and 95% utilization produce very different rates. Separate the price of borrowing now from the rate carried into the next interval.

MorphoLending
21 min read
DeFi

Morpho Internals Part 1: Lending, collateral and the last liquid USDC

One lender supplies 1,000 USDC and one borrower takes 860. Follow their separate positions through a withdrawal, a price change and interest accrual.

MorphoLending
26 min read
DeFi

What a Uniswap LP owns in V2 and V3

Follow the same two tokens through a proportional V2 deposit and a concentrated V3 position, then move the price to the edge of the range.

UniswapDeFi
5 min read
Cryptography

Elliptic-curve key validation from P-256 to X25519

A public key can have the expected length and still be unsuitable for ECDH. Follow a peer key through point validation and the TLS all-zero check.

Elliptic CurvesCryptography
4 min read