r/nearprotocol • u/pieceOfAi • 2d ago
DISCUSSION Post-mortem: Templar Protocol (NEAR) withdrawal-queue freeze flaws (~$15.4M supply patched), zero-access-key Stellar USDC market, and Immunefi #77956
Technical post-mortem on Immunefi Report #77956 against Templar Protocol (templarfi.org, deployed on NEAR): two withdrawal-queue flaws (8 TGas callback OOG + unbounded queue walk hitting NEAR's 4.0 MB NEP-509 storage-proof limit, even at max 1,000 TGas) that could permanently freeze supplied funds, including ~$1.50M of Stellar USDC in a market with zero access keys (ixlm-ixlmusdc.v1.tmplr.near).
https://4hm8d.github.io/templar-protocol-near-withdrawal-queue-freeze/
Over 6 months:
- ~$1.44M USDC (96%) moved out of that keyless market into a keyed replacement in July (with ~$59K USDC residual active supply remaining)
- 22 keyed markets (~$15.40M supply) were patched Oct 7–8, 2026
- Immunefi Mediation formally ruled Critical ($100,000 owed) on Oct 22, rejecting a retroactive Certora
L-05duplicate claim based on git timestamps (PR #264merged 40 days after Certora's review closed) - Templar's CEO later offered $3,000, conditioned on a permanent gag (non-disclosure) clause:
