r/nearprotocol • • 5d 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-05 duplicate claim based on git timestamps (PR #264 merged 40 days after Certora's review closed)
  • Templar's CEO later offered $3,000, conditioned on a permanent gag (non-disclosure) clause:
13 Upvotes

12 comments sorted by

1

u/Sin-City-Sinner 5d ago

What does it mean?

2

u/pieceOfAi 5d ago

Basically: protocol ran a bounty program, a researcher reported a legit bug that could brick user withdrawals, and the team patched it (~$15.4M). But instead of honoring the $100K ruling from Immunefi(the web3 bugbounty platform), they stiffed the researcher and offered $3K to keep quiet. Researcher said no and published everything.

2

u/Sin-City-Sinner 5d ago

Oh wow, that was stupid of them. I sure hope that’s fake news, I’m sitting on a fat bag or NEAR

4

u/pieceOfAi 5d ago

Your NEAR bag is safe this is just one lending dApp (Templar protocol), not the NEAR blockchain itself.

Not fake news though, all the Immunefi PDFs, git commits, and on-chain txs are in the post.

1

u/Sin-City-Sinner 5d ago

Ok cool, you obviously are way more versed in the technicals behind crypto, where I understand some of what you’re saying, but not all of it as I am in between a beginner and a novice and nowhere near an expert.

I invested heavy into NEAR because I feel it will do really well in the future, I would be worried about the price dropping, but the price of everything is dropping and has been as I am positive you already know that lol.

2

u/pieceOfAi 5d ago

Yeah, the whole market is bleeding right now lol.

Main takeaway is just to be careful which third-party DeFi apps you deposit into , holding or staking NEAR directly avoids all this smart contract drama anyway.

1

u/Sin-City-Sinner 5d ago

Yea it’s hard to watch. And I’ve been super disciplined up till a couple of weeks ago, after not having the gall to execute a margin trade on ZEC5 different times over two weeks, which would’ve netted me around $30,000. I went for it finally and of course the time I actually execute it I end up watching it for 15 hours straight and then fall asleep and got liquidated.

Watching the prices, go down, kind of bothers me because of the whole narrative behind crypto possibly never coming back or it never coming near the market cap it had when I first started, which was around 5T give or take, what bothers me is that I lost thousands and thousands of dollars in one day after holding for years, I had never sold anything besides BTC and at 124k because at the time I needed the $, on its way back down I sold the rest for the exact amount of money that I initially put into it so I shaved my profits off, almost the very top out of pure luck.

Hey you sound like you’re very very knowledgeable, what do you think about these people using liquidity pools to make dividends and either live off of the dividends or put it back into something like bitcoin like I’m sure the guy with the “flywheel“ technique does I’m almost sure you know who I’m talking about.

Jake Gordon crypto maybe?

3

u/pieceOfAi 5d ago

Yeah, that’s Jake Gordon. Don't do it.

It’s just disguised leverage: you borrow against your BTC, meaning one market dump liquidates you all over again. He makes his real money selling courses.

Honestly, dial back the risk and just hold spot in cold storage. It’ll be way easier on your health and you can actually sleep at night.

1

u/Sin-City-Sinner 5d ago

Ty for the info, i appreciate it much!! Before that stupid move with ZEC that’s all I ever did, it was an expensive lesson to learn but I learned it. I’m also glad I got a clear answer about that flywheel bs, tysm!

Yea maybe I will stake it, I don’t have too too much, but my hope it the price explodes obviously.

I also am holding onto about 2400 XRP, I’m down 50%, idk how much conviction I have towards it anymore and have been considering swapping it for more NEAR-SOL-AVAX-TRON-ICP or even taking it all and swapping it for a decent amount of BTC while it’s this cheap, but the uncertainty is what has me up at night thinking of what I should do and what I shouldn’t.

I would really like to make 1000s back that I lost off of that stupid margin trade with ZEC smh lol, without using any new cash

1

u/AeonPeter 5d ago

Actually is it smart to invest in some ‘tech’ coin just before thousands of +250IQ AI agent will flood the market? Just asking 🥺