Rigorous smart contract and protocol security across EVM and Bitcoin L2 ecosystem @Stacks (Clarity)

Request an audit →
Joined September 2023
Announcement of an announcement: We'll soon, quite soon, publish our most comprehensive open-source contribution to the @Stacks ecosystem yet. Stay tuned!
2
11
707
Last week in web3 security we saw several exploits. Two of them, plus two from a few days earlier, came down to a check nobody made. Here is where each one broke and what we'd change: 🔹 Third-party MakerDAO ETH-A liquidation keeper: $538K loss (on @ethereum) This third-party keeper, a dormant 2020 proxy, never settled four auctions it had won, and its drain function had no auth, so anyone could take the 200 WETH. The bug was not in MakerDAO core. The lesson for anyone running a liquidation keeper is to put auth on every function that moves funds, even on a retired bot. 🔹 Third-party FlashLoopAdapter Safe module: $305K loss (on @ethereum) On Oct 1, this third-party Aave v3 loop module trusted any caller claiming it was enabled, then called a router the caller chose, so a fake Safe drained two real ones. If you're building a Safe module, you should check callers against Safes you track and never call addresses they supply. 🔹 GoldPesa: $114.9K loss (on @base) On Oct 2, GoldPesa's own Uniswap v4 hook rebalanced inside the attacker's unlock without checking deltas were settled, so its burn credit paid off the attacker's unpaid mint. Teams shipping a Uniswap v4 hook should require settled deltas before moving liquidity inside a caller's unlock. 🔹 Set Protocol: $13.7K loss (on @ethereum) An old v1 contract, still holding collateral after the team deprecated V2 and TokenSets, let anyone call actualizeFee(), which rounded unitShares up with no fee taken, so issuing before and redeeming after paid out extra. When building a rebalancing DeFi mechanism, make sure to round collateral per share in the protocol's favor. All of them mentioned hacks were the result of misplaced trust and unbacked assumptions. The protocols never actually checked: - who was calling - whether the books were settled - which way a number rounded If you're building or running contracts like these, from Safe modules to Uniswap v4 hooks, we at Cyba can review them for you. More on each hack in the reply below 👇
🤖 Made with AI
1
1
1
7
406
More on these, with PoCs you can hand to your devs or agents to adapt to your codebase: Third-party MakerDAO ETH-A liquidation keeper xitter.cf/DefimonAlerts/status/2… github.com/SunWeb3Sec/DeFiHa… Third-party FlashLoopAdapter Safe module xitter.cf/SlowMist_Team/status/2… github.com/SunWeb3Sec/DeFiHa… GoldPesa xitter.cf/SlowMist_Team/status/2… github.com/SunWeb3Sec/DeFiHa… Set Protocol xitter.cf/SlowMist_Team/status/2… github.com/SunWeb3Sec/DeFiHa… Credits to @DefimonAlerts and @SlowMist_Team for the initial analysis, and @DeFiHackLabs for the PoCs.
🚨SlowMist TI Alert🚨 💸 @aave v3 Loop Safe Module Loss: ~114.09 ETH 🔍 Root Cause: FlashLoopAdapter's open()/close() access control only checks ISafe(msg.sender).isModuleEnabled(address(this)), which is spoofable via a fake Safe that always returns true. Its _swap() then executes router.call with fully attacker-controlled router and calldata. Since the adapter is an enabled module of the victim Safes, the attacker set router=victim Safe and data=execTransactionFromModule to drain weETH and Aave collateral. 📌 Attacker: 0x42c2633438609881c8fBAb82414eb9A0c45F9353 📌 Victim: 0xe3b23e47df7cd85876ac6cb05bdb9d7cd5b28520, 0xcfedf95a3653a128dfc2e4288758a1a1850d169f 📌 Vulnerable Contract: 0x16bb8b912da187870c23ec6756bb3fad061283d8 Impact: ~114.09 ETH stolen from two Safe multisigs via forged Safe authentication and arbitrary module execution; ~1300 WETH debt repaid to unlock collateral. Powered by SlowMist.AI Tx: etherscan.io/tx/0x75328f916b…
4
49
We're happy to have once again collaborated with @AccountableData on securing their infrastructure. For this engagement, we reviewed Accountable's Collateral Fixed-Term Strategy, covering both the implementation itself and its integration with the broader vault infrastructure.
1
1
7
329
It's been a pleasure continuing to work with a team that keeps security close to the development process. Engagement details & full report ↓ cybasecurity.io/audits/accou… Also, a new engagement is already underway, marking yet another step in our growing collaboration. More to come!
1
3
768
We've completed our security audit for @AccountableData, reviewing a staking module extension to their DeFi vault infrastructure. The team's fixes were also verified through a dedicated fuzz testing campaign. More on the engagement: cybasecurity.io/audits/accou…
2
4
1,103
1/2 Back with another security review for @GraniteBTC. This engagement focused on liquidation improvements and protocol hardening, covering changes to liquidation flows, bad debt handling, staking mechanics, and related core functionality. Granite continues to build Bitcoin-backed liquidity infrastructure on Stacks through sBTC, while iterating on the protocol's security and robustness. Always a pleasure working with teams that treat security as an ongoing process rather than a checkbox.
1
2
1
7
1,422
1/2 We recently completed a security review for @GraniteBTC, a Bitcoin liquidity protocol built on @Stacks enabling users to borrow stablecoins against Bitcoin collateral through sBTC, developed by @trustmachinesco. This engagement focused on reviewing fixes, hardening efforts, and protocol enhancements across the protocol’s lending system, covering changes across borrowing, liquidation flows, staking, governance, LP incentives, oracle integrations, withdrawal logic and related core functionality. Granite combines Bitcoin-backed liquidity access with design choices such as isolated collateral, soft liquidations, and Bitcoin-native infrastructure. Happy to support teams building BTCfi infrastructure. Always a pleasure working with security-oriented teams pushing the ecosystem forward.
1
2
2
8
2,159
Our founder @abarbatei spoke last week at @ETHCluj about securing BTCfi and how Bitcoin''s expanding ecosystem introduces new security assumptions. Topics covered: 🟢 Bitcoin security assumptions 🔴 Historical Bitcoin network vulnerabilities (25 disclosed issues in the last 10 years) ⚪ Litecoin April incident analysis 🟡 BitVM technology 🟠 Bitcoin L2s: @Stacks, @citrea_xyz, @babylonlabs_io Understanding how security assumptions stack is critical for building and securing BTCfi systems. 🔗 Watch the full presentation: youtube.com/watch?v=dH9wjVw6…
3
1
7
1,533
Happy to be among the Romanian teams featured. Romania has a strong builder base across Ethereum and blockchain in general, with a lot of solid work happening quietly in the background. It's good to see more visibility on what's being built locally and how the ecosystem is taking shape. Well worth a read for anyone looking to understand the space better. open.substack.com/pub/locale…
3
10
523
Cyba Blockchain Security retweeted
The rsETH markets on Aave V3 and Aave V4 have been frozen. Aave's contracts have not been exploited and this is an exploit related to rsETH. The freeze follows an exploit of the Kelp DAO rsETH bridge. Freezing the rsETH markets prevents new deposits and borrowing against rsETH collateral while the situation is assessed. We are reviewing information about rsETH borrows on Aave that occurred after the exploit and will share more details as soon as possible. If the protocol accumulates bad debt from this incident, we'll explore paths to offset the deficit.
266
364
263
2,078
899,717
1/2 When we launched Cyba in February, we said to judge us by what we publish, how we review code, and the standards we hold ourselves to. We're continuing on that path by publishing security content that benefits the ecosystem. We're starting with a deep dive into Stacks principal (address) derivation and standard network checks. For those who may not know, @Stacks is the leading Bitcoin L2, where we have extensive experience securing protocols.
2
1
1
6
1,344
We've completed our security audit for @AccountableData, reviewing an extension to their DeFi credit vault infrastructure. Accountable is a key player operating at the intersection of DeFi and TradFi. Their vault-based credit layer programmatically allocates capital across lending strategies, with over $160M deployed to generate risk-adjusted yield. They are also building the Data Verification Network (DVN), a privacy-preserving infrastructure that verifies financial data directly at the source. It already secures $1B+ in assets across partners like Galaxy, Amber Group, and K3 Capital, positioning Accountable at the intersection of onchain finance and institutional reporting. Security at this scale is never a one-off.
1
2
8
2,111
Just kicked off a new audit for an extension to a complex DeFi strategy system. Good protocols don't treat audits as a one-time checkbox. Every production change deserves a security review. From first contact to audit kickoff: < 24h. Security doesn't end after the first audit.
1
2
8
837
Cyba Blockchain Security retweeted
🚨URGENT: Blockaid's system has identified a front-end attack on compound[.]finance, and is redirecting to a malicious website. If you’re connected, please refrain from signing transactions and avoid interactions with the dApp until the issue is resolved.
1
13
1
26
27,482
The ecosystem is maturing, and we're here to help ensure it grows safely xitter.cf/abarbatei/status/20296…
This weekend I participated in @CryptoExpoEu, the largest crypto and blockchain conference in Eastern Europe. I want to share a few takeaways from the event. At this point in the blockchain ecosystem, the people who are still here are those who are genuinely interested in the underlying technology, or are in a position where their employer has reached product-market fit in the industry. Like many others have pointed out, the tourists have left and only long-term players remain. There was also a surprising level of enthusiasm among people to mingle and learn about each other. Nobody was there to "just be there". they had come with a purpose, and that was networking. One realization I had is that what was known as "Crypto" just a few years ago has changed in the public's eyes. More specifically, there was a split. What I mean by that: I participated in @cometsweb3's Blockchain Builders Meetup (xitter.cf/cometsweb3/status/2027…), and the most common question (besides whether food is included in the event lol, gotta love the humor 😂) was: "what web3 internships are available?" There were a lot of students there. When I asked why they were interested in internships in crypto, they replied: "in Blockchain, not Crypto". Somewhere along the line, what we all knew as "Crypto" split into "Blockchain", the technology, and "Crypto", the degen side, roughly speaking. To me this is a clear sign of maturity. A surprising one for Romania, considering I started years ago when "everything was a scam". While I expected people working in the field to understand what we are building, I didn't expect outsiders to also understand. Really happy to see that. I'm also glad that I could catch up with old friends and meet new and very interesting people at the event. The ecosystem is quieter now, but the people who remain are the ones actually building.
4
124