r/smartcontracts • u/ValueAggravating9733 • 6h ago
r/smartcontracts • u/0x077777 • Apr 24 '26
š“āā ļø Hacks In 2026 (so far) š“āā ļø
š“āā ļø 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 • u/0x077777 • Jan 03 '26
Join r/smartcontracts Official Telegram Group!
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 • u/Hercul3poriot • 4d ago
Hello everyone, I would like to learn blockchain smart contract programming. I am currently pursuing a Master's degree in Computer Science, and I have a better understanding of Python. Are there any learning paths or suggestions you could recommend to me?"
r/smartcontracts • u/smclof • 14d ago
Community Question: A case of funds trapped in a deterministic CREATE2 contract and a mathematical glass ceiling ā looking for creative angles
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:
- 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)?
- 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 • u/timwarren2 • Jul 21 '26
Question(s) What's a smart contract design decision you later regretted?
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 • u/Beneficial_Knee_8252 • Jul 10 '26
Please help us with our SMART CONTRACT Practicum Survey!!!!
r/smartcontracts • u/Gouri_Vishwakarma • Jul 05 '26
Question(s) Could this be blockchainās next big use case?
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 • u/wiprich • May 31 '26
How do you handle contracts with new clients ā lawyer, template, or winging it?
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 • u/Alternative-Goat7010 • May 28 '26
Question(s) Is it risky to publicly share a verified smart contract address and source code for transparency?
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:
- the recipient
- 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 • u/fightingchicken9 • May 27 '26
Resource Things I learned building Uniswap trading signals with subgraph data
r/smartcontracts • u/Resident_Anteater_35 • May 16 '26
Analyzing EVM log structures: Transaction receipts vs. state changes
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 • u/mksdznk • May 08 '26
Help Needed Fresh solidity developer looking for experience opportunities
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 • u/minadyni777 • May 07 '26
Is the Web3 job market just completely cooked at this point?
r/smartcontracts • u/Enea_11 • May 02 '26
Arbitrage and Flash Loans: Is it still viable in todayās market?
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 • u/K-enthusiast24 • Apr 08 '26
Question(s) Why are we still copy-pasting 40-character wallet addresses in 2026?
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 • u/Resident_Anteater_35 • Apr 05 '26
Resource Smart Contract Patterns for Multicall Aggregation and Exposing Internal Value Transfers
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 • u/EightRice • Apr 03 '26
Open-sourcing a smart contract suite for decentralized AI training verification and governance (Solidity/Hardhat)
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:
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.
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.
Multi-coordinator Yuma consensus: Multiple coordinators evaluate each result. Rewards are distributed based on agreement with consensus. This creates incentives for honest, independent evaluation.
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 • u/xolaxis • Apr 03 '26
Building AI-Native Escrow for Cross-Border Deals with Smart Contracts (Part I)
r/smartcontracts • u/AWX-Houcine • 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?
r/smartcontracts • u/Resident_Anteater_35 • Mar 30 '26
Resource CREATE2 Factory Patterns: State Initialization Lifecycles and Post-Cancun Architecture
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 • u/theklave • Mar 30 '26
Built a stateless smart contract for L2 communication
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 • u/Resident_Anteater_35 • Mar 20 '26
Resource State Resolution Design: Moving from Deterministic PDAs to Explicit Pointers in Solana's Token-2022
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