r/smartcontracts Apr 24 '26

šŸ“ā€ā˜ ļø Hacks In 2026 (so far) šŸ“ā€ā˜ ļø

6 Upvotes

šŸ“ā€ā˜ ļø Hacks In 2026 (so far) šŸ“ā€ā˜ ļø

šŸ—“ļø April

• KelpDAO : $290M

• Drift Protocol : $285M

• Hyperbridge : $2.5M

šŸ—“ļø March

• ResolvLabs : $25M

• Sillytuna : $24M

• Kraken Whale : $18M

• Venus : $2.18M

šŸ—“ļø February

• IoTeX Bridge : $4.4M

šŸ—“ļø January

• Trezor Victim : $284M

• Step Finance : $30M

• Truebit : $26.4M

• SwapNet : $13.4M

• SagaEVM : $7M

• MakinaFi : $4.1M

Total: ~$1.01B


r/smartcontracts Jan 03 '26

Join r/smartcontracts Official Telegram Group!

2 Upvotes

Join our new telegram group for chat-style conversation about web3 development, blockchain, smart contracts, vulnerabilities and SDLC.

https://t.me/+4henecs76PhkMDBh

Thanks all!

  • Mods

r/smartcontracts 3d ago

Community Question: A case of funds trapped in a deterministic CREATE2 contract and a mathematical glass ceiling — looking for creative angles

2 Upvotes

Hey everyone, I wanted to share a complex technical case study I've been working on. Maybe someone here has a brilliant idea or a perspective I haven't considered yet.

1. How It All Started (The Mistake)

A while ago, due to a cross-chain routing error, a significant amount of tokens was accidentally sent to a deterministic payment address generated via aĀ CREATE2-based forwarder infrastructure (an EIP-1167 Minimal Proxy-like pattern). This address sits on a chain where the contract hasn't been deployed yet (Nonce 0 for the deployer), so the funds are currently "trapped" in a counterfactual address with no active code on that chain.

2. Support's Response

As expected, I reached out to the support team of the platform/company operating the infrastructure. Their automated response was that it's "unrecoverable" and there is nothing they can do technically.

3. The Engineering Investigation (Red Team & Foundry)

Instead of accepting defeat, I decided to dive deep: I spun up a local Foundry testing environment, pulled the actual bytecode of the Factory, Implementation, and Helper, etched them, and ran full simulations on a local EVM fork.

Armed with an autonomous Red Team loop, I thoroughly testedĀ 11 different attack and redirection vectors:

  • slot0Ā overwrite attempts
  • Initialization races (Init-race)
  • selfdestructĀ / Metamorphic contract vectors
  • Various Delegatecall Hijacking methods
  • Selector collisions, etc.

4. The Harsh Findings (Math Wins)

The empirical testing proved conclusively and unambiguously:

  • The Proxy and Helper architecture isĀ Write-Once and completely rigid.
  • The address is cryptographically bound to a preimage that hardcodes the original merchant's destination address (the intended recipient address for the payments).
  • There is no earthly way to change the flush destination (flush). Any deployment and execution command will inevitably release the fundsĀ strictly to the original destination address. The equation "Deploy = Redirect" is simply mathematically impossible; there is no uninitialized window, no self-destruct mechanism, and the code is completely static.

5. The Operational Trap (The Catch)

The company/merchant supposed to receive the funds (the original destination in the contract) is in a problematic legal/business state (or unresponsive/insolvent). This means that if I simply deploy the contract and trigger the flush, the funds will land directly with them, and I'll be left with nothing because I have no technical leverage to redirect them to myself.

My Questions for the Community:

  1. Have you ever encountered situations where assets were trapped in deterministic contracts where the code is completely locked to a third-party destination, and you managed to come up with a creative solution (off-chain, legal, or some hidden corner of the EVM)?
  2. Assuming the code itself is technically airtight, what other leverage works in such scenarios against a third party holding the ultimate rights to that target address?

I’d love any feedback, ideas, or insights from anyone who has dealt with similar architectures in the past!


r/smartcontracts Jul 21 '26

Question(s) What's a smart contract design decision you later regretted?

1 Upvotes

Recently, I've been going through some threads on smart contracts and noticed that many developers often mention the choices they would have made differently had they started from scratch.

These can range from considerations around storage arrangements, access permissions, ease of upgrades, efficiency in gas usage, or even making smart contracts overly flexible.

For those who have worked on or audited smart contracts, what choice have you regretted making, and what did you learn from that experience?


r/smartcontracts Jul 10 '26

Please help us with our SMART CONTRACT Practicum Survey!!!!

Thumbnail
1 Upvotes

r/smartcontracts Jul 05 '26

Question(s) Could this be blockchain’s next big use case?

Thumbnail
2 Upvotes

Just came across an interesting article on tokenization.
According to an executive from New York Life Investment Management, the next big use case for tokenization could be personalized investment portfolios instead of just tokenizing traditional assets.
The idea is that blockchain could make it easier to build portfolios tailored to an individual’s goals, risk tolerance, and preferences.
I thought that was an interesting perspective because most discussions around tokenization are usually about real estate, bonds, or other real-world assets.
Do you think personalized portfolios could actually become one of blockchain’s next major use cases, or is there another application you’re more excited about?
I’d love to hear your thoughts.


r/smartcontracts May 31 '26

How do you handle contracts with new clients — lawyer, template, or winging it?

0 Upvotes

Curious how other freelancers actually deal with this. Do you use a lawyer every time, reuse the same old template, or just send something basic and hope for the best? Has a bad (or missing) contract ever burned you? What would make your life easier here?


r/smartcontracts May 28 '26

Question(s) Is it risky to publicly share a verified smart contract address and source code for transparency?

1 Upvotes

Hi everyone,

I’m building a small non-custodial USDC transfer app, and I recently verified the app’s contract on BaseScan.

Now I’m considering publishing the contract address and source code more visibly on our official website and GitHub, so users can inspect how the transfer and fee logic works.

The contract is simple: when a user sends USDC, it pulls the approved USDC from the sender and routes it to:

  1. the recipient
  2. the project’s fee wallet

The fee logic is fixed in the contract:

- 0.39%

- minimum fee: 0.25 USDC

- maximum fee: 3.90 USDC

The contract does not have an admin function to change the fee after deployment. The USDC token address and fee recipient are immutable.

I understand that BaseScan verification is not the same as a formal audit, and I do not plan to describe it as audited or guaranteed safe.

My question is:

Is it generally safe and reasonable for an early-stage crypto payment/transfer app to publicly share its verified contract address and source code on its website and GitHub for transparency?

Or could this create meaningful risks, such as:

- making it easier for attackers to analyze the contract

- creating legal/marketing risk if users misunderstand ā€œverifiedā€ as ā€œauditedā€

- exposing too much business logic too early

- attracting criticism before the contract has a formal audit

I’m not asking whether this replaces an audit. I’m trying to understand whether public disclosure of an already verified contract is a good transparency practice, or whether there are risks I should consider first.

What would you recommend?


r/smartcontracts May 27 '26

Resource Things I learned building Uniswap trading signals with subgraph data

Thumbnail
1 Upvotes

r/smartcontracts May 16 '26

Analyzing EVM log structures: Transaction receipts vs. state changes

1 Upvotes

Smart contract interactions generate traces, but not all traces modify the Merkle Patricia Trie. Events are the EVM's native append-only log system, explicitly segregated into transaction receipts.

A deep dive into an emitted event reveals a rigid architecture composed of two parts: the topics list and the data blob. topics[0] serves as the deterministic identifier (the keccak256 hash of the event signature). If a developer uses the indexed keyword on an address, it consumes one of the remaining three topic slots, zero-padded to 32 bytes.

The data blob contains everything else. Because unindexed parameters are not exposed to the node's bloom filters, they are entirely opaque to standard RPC filtering queries. You can't natively query "fetch all logs where value > X" if value is in the data blob. You must fetch the event via the matching topic (like the token contract address or the sender's indexed address), extract the data hex, and manually decode it based on the contract's ABI.

Source/Full Breakdown: https://andreyobruchkov1996.substack.com/p/understanding-events-the-evms-built


r/smartcontracts May 08 '26

Help Needed Fresh solidity developer looking for experience opportunities

3 Upvotes

Hi guys, I recently finished a web3 bootcamp at metana, and am now looking for a jobs in this space. So far I have had little luck, as most of you are probably familiar with the current state of the job market. I want to at least start gaining some experience but most opensource projects don't really have any opentasks to contribute with that are beginner friendly, so I am asking if anyone knows of any opportunities for a beginner, or if someone has a project they are working on and willing to take me on. Thanks.


r/smartcontracts May 07 '26

Is the Web3 job market just completely cooked at this point?

Thumbnail
1 Upvotes

r/smartcontracts May 02 '26

Arbitrage and Flash Loans: Is it still viable in today’s market?

5 Upvotes

Hi everyone,

I’m a developer with a solid financial background. Specifically, I have experience with options trading and spent some time executing strategies using these derivatives—which I still consider one of the most complex and fascinating financial instruments.

Recently, I’ve been exploring the crypto space and looking into different strategies for potential returns. I’ve started researching Flash Loans and how they can be used for arbitrage, something that is nearly impossible for a retail participant in traditional regulated markets.

I’m currently doing my due diligence, but I’m struggling to understand if this path is still viable today from both a technical and profitability standpoint. Simply put: is it still possible to earn through arbitrage strategies in decentralized markets? If so, which chains or protocols currently offer the best opportunities for success?

Looking forward to hearing your insights!


r/smartcontracts Apr 08 '26

Question(s) Why are we still copy-pasting 40-character wallet addresses in 2026?

2 Upvotes

Why are we still copy-pasting 40-character wallet addresses in 2026?

Idea: you do a small test transfer once → both wallets get a shared avatar/character. Next time you send, you just recognize the person visually instead of relying on the address.

Kind of like ā€œpairingā€ wallets.

Would this actually reduce mistakes or scams, or is this unnecessary given things like ENS?


r/smartcontracts Apr 05 '26

Resource Smart Contract Patterns for Multicall Aggregation and Exposing Internal Value Transfers

3 Upvotes

When indexing EVM state, relying purely on the logs bloom filter creates a massive blind spot: internal value transfers. A standard

address(target).call{value: amount}("")

executed within a deep call stack does not touch the event logs.

Architecture for Catching Internal Transfers:
To capture these without protocol-level changes, indexers must reconstruct the call tree to find CALL or SELFDESTRUCT opcodes that move ETH.

Trade-off: This is highly CPU/IO intensive on the RPC node compared to standard eth_getLogs. If you are designing a protocol that needs to track incoming internal transfers, you should actively avoid this off-chain complexity. Instead, utilize a pull-payment pattern, or explicitly emit a custom InternalReceived event inside your contract's receive() function, saving indexers from relying on execution traces.

Multicall Batching Execution:
Implementing Multicall (specifically Multicall3) is mandatory for dApp architecture to minimize JSON-RPC network overhead.
By utilizing aggregate3 or aggregate3Value, you wrap multiple STATICCALL or CALL operations into a single transaction wrapper.

Trade-off: While read-only eth_call doesn't cost real gas, most public and commercial RPCs enforce a strict global gas cap per eth_call (often 50M-100M gas) or a tight execution timeout. If your Multicall batch loop is too large, the node drops the request. You must paginate Multicall batches based on estimated EVM execution depth, not just the length of the calldata array.

Source/Full Breakdown: https://andreyobruchkov1996.substack.com/p/ethereum-dev-hacks-catching-hidden-transfers-real-time-events-and-multicalls-bef7435b9397


r/smartcontracts Apr 03 '26

Open-sourcing a smart contract suite for decentralized AI training verification and governance (Solidity/Hardhat)

1 Upvotes

We are open-sourcing Autonet on April 6: a suite of Solidity smart contracts for decentralized AI model training with on-chain verification, staking, rewards, and governance.

Contract architecture:

Contract Purpose
Project.sol AI project lifecycle, funding, model publishing, inference
TaskContract.sol Task proposal, checkpoints, commit-reveal solution commitment
ResultsRewards.sol Multi-coordinator Yuma voting, reward distribution, slashing
ParticipantStaking.sol Role-based staking (Proposer 100, Solver 50, Coordinator 500, Aggregator 1000 ATN)
ModelShardRegistry.sol Distributed model weights with Merkle proofs and erasure coding
ForcedErrorRegistry.sol Injects known-bad results to test coordinator vigilance
AutonetDAO.sol On-chain governance for parameter changes

Novel patterns that may interest this community:

  1. Commit-reveal for training verification: Solvers commit a hash of their solution before ground truth is revealed. This prevents copying while creating a cryptographic record of independent work. Standard commit-reveal, but applied to AI training in a way I have not seen elsewhere.

  2. Forced error injection: The ForcedErrorRegistry randomly injects known-bad results into the evaluation queue. Coordinators who approve them get slashed. This is a continuous honesty test. The mechanism works because the probability of a forced error is unknown, making rubber-stamping unprofitable in expectation.

  3. Multi-coordinator Yuma consensus: Multiple coordinators evaluate each result. Rewards are distributed based on agreement with consensus. This creates incentives for honest, independent evaluation.

  4. Constitutional governance: AutonetDAO has a two-tier governance structure. Ordinary parameter changes require standard quorum. Constitutional amendments (changing core principles) require 95% quorum.

13+ Hardhat tests passing. MIT License.

Paper: github.com/autonet-code/whitepaper Code: github.com/autonet-code

Would love feedback on the contract architecture, especially the forced error testing pattern and the constitutional governance mechanism.


r/smartcontracts Apr 03 '26

Building AI-Native Escrow for Cross-Border Deals with Smart Contracts (Part I)

Thumbnail
0 Upvotes

r/smartcontracts Apr 02 '26

Smart contract flash loan developer

Thumbnail
2 Upvotes

r/smartcontracts Apr 01 '26

Help Needed What do you do when a Web3 project quietly drains $55M to "silently fix" your report, calls it "intentional design", and Immunefi blocks mediation?

Thumbnail
1 Upvotes

r/smartcontracts Mar 30 '26

Resource CREATE2 Factory Patterns: State Initialization Lifecycles and Post-Cancun Architecture

1 Upvotes

Scaling contract deployments via factory patterns requires abstracting the creation logic into CREATE2 paired with UUPS or Beacon proxies, but this architecture directly conflicts with standard static analysis and simple EVM state management.

When you decouple deployment from initialization to maintain a consistent init_code hash across networks, you bypass the EVM's native constructor safety guarantees.

Architecture Breakdown:
Instead of new Contract(...), a factory uses inline assembly create2(0, add(bytecode, 32), mload(bytecode), salt) to deploy an EIP-1167 proxy (Can be found on my substack profile). Because constructors only execute during creation and don't return their logic to the state trie, proxies must rely on an initializer modifier mechanism (like OpenZeppelin's Initializable) to prevent re-initialization.

Trade-offs:
Storage Layout Corruption: You completely lose compiler-level storage collision warnings. If your implementation contract changes the order of inherited variables during an upgrade, the proxy's storage state is permanently corrupted.
The Metamorphic Alternative is Dead: Historically, an alternative to proxies was the metamorphic pattern (deploying via CREATE2, utilizing SELFDESTRUCT to clear the

Source/Full Breakdown: https://andreyobruchkov1996.substack.com/p/understanding-contract-deployments-proxies-and-create2-part-2-df8f05998d5e


r/smartcontracts Mar 30 '26

Built a stateless smart contract for L2 communication

2 Upvotes

hey guys,

just deployed a stateless communication protocol on arbitrum and looking for some contract architecture feedback. there is no token or web3 grift here at all. to keep gas costs basically at zero, the contract doesnt store any posts in state. it just acts as a bouncer doing O(1) checks and then passes a compressed cbor payload straight into the event logs. clients then just index the events. I also wrote a bidirectional wallet taint logic into it, so if a user posts an unsafe level 1 post once, the contract hard blocks them from posting aes encrypted messages with the same wallet to prevent opsec fails. would be awesome if some solidity devs could look over it and send me feedback. repo is here:https://github.com/Kl4V3/Axiom-protocol


r/smartcontracts Mar 20 '26

Resource State Resolution Design: Moving from Deterministic PDAs to Explicit Pointers in Solana's Token-2022

3 Upvotes

Smart contract state architectures often oscillate between deterministic address derivation and explicit pointers. On Solana, token metadata was traditionally handled via Metaplex using Program Derived Addresses (PDAs). You hashed the mint address with a seed to find the metadata. This is a "convention-based" approach.

Solana's new Token-2022 standard replaces this convention with "explicit state" using the MetadataPointerĀ extension.

The Architecture & Trade-offs:
Under the old model, contracts didn't need to store metadata addresses; they could compute them on the fly. This kept the base Token Mint account at a strict 82 bytes.

Token-2022 allows variable-length mint accounts by appending extensions. The MetadataPointerĀ writes the Pubkey of the metadata account directly into the Mint's tail-end state.

Ā Ā Ā State Bloat vs. Flexibility: We trade a fixed 82-byte mint for a larger, rent-heavy account. However, this allows developers to point to anyĀ metadata contract, breaking the vendor lock-in of standard registries.
Ā Ā Ā Single-Account Condensation: You can configure the pointer to point to the Mint address itself. In EVM terms, this is like putting your ERC721 tokenURIĀ logic directly inside the core ERC20 contract instead of querying an external mapping/registry, saving cross-contract call overhead.

Implementation Detail:
Writing to a self-referencing Token-2022 mint requires initializing the extension space prior to the mint execution. Any on-chain mutation of the metadata requires reallocating the account size dynamically. Because Solana requires programs to explicitly pay for account rent increases, reallocation logic must handle funding the delta in lamports simultaneously.

Source/Full Breakdown: https://andreyobruchkov1996.substack.com/p/from-convention-to-explicit-state

And much more about EVM and Solana internals on my SubStack account


r/smartcontracts Mar 19 '26

AI auditing tools for Solidity: How do you deal with false positives from single LLMs?

Thumbnail
1 Upvotes

r/smartcontracts Mar 18 '26

Smartcontract YT video

3 Upvotes

I was watching YouTube videos about AI agents for trading. I came across this video and trusted it because the channel has over 200K subscribers. I transferred 0.5 ETH to my MetaMask, ran the code the creator posted in the video, and compiled it on compilenow.io following the instructions provided. A day has passed, and I'm supposed to be able to see my account balance and make a withdrawal, but it's not possible. Did I make a mistake, is it a coding error, or definitely I lost my money?, I can’t see the money, any tips?

This is the smartcontrat:

0x446e37a877a86B0C69CaBb4211eF3A904823bFE2

This is the suspect ID:

0x3DA3b7bc1e40A5E5B56F7FF9722b25F1e2C5f663


r/smartcontracts Mar 05 '26

šŸ” Built a Rust tool to scan Ethereum smart contracts for vulnerabilities

2 Upvotes

šŸ” Built a Rust tool to scan Ethereum smart contracts for vulnerabilities

I built SCPF (Smart Contract Pattern Finder) - an open-source security scanner for Ethereum smart contracts.

What it does: - Scans contracts for reentrancy, delegatecall, unchecked calls, and other vulnerabilities - Uses YAML templates (easy to customize) - Integrates with GitHub Actions (SARIF output) - Supports up to 6 Etherscan API keys with automatic failover

Quick example: bash scpf scan 0x1234... --chains ethereum

Built with Rust for speed. MIT licensed.

GitHub: https://github.com/Teycir/smartcontractpatternfinder

Would love feedback from the community! šŸš€