<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged evm</title>
<link>https://coderlegion.com/tag/evm</link>
<description>Powered by Question2Answer</description>
<item>
<title>Building a Real MetaMask + Ethereum Sepolia Payment Flow for MyZubster</title>
<link>https://coderlegion.com/28576/building-a-real-metamask-ethereum-sepolia-payment-flow-for-myzubster</link>
<description>&lt;p&gt;Building a Real MetaMask + Ethereum Sepolia Payment Flow for MyZubster&lt;/p&gt;
&lt;p&gt;I’ve been working on the next stage of the MyZubster Marketplace: connecting authenticated users, MetaMask wallets, signed marketplace requests, and real blockchain payment verification.&lt;/p&gt;
&lt;p&gt;The target flow is:&lt;/p&gt;
&lt;p&gt;MyZubster account&lt;br&gt;
→ verified MetaMask wallet&lt;br&gt;
→ signed marketplace request&lt;br&gt;
→ seller acceptance&lt;br&gt;
→ Ethereum Sepolia payment&lt;br&gt;
→ server-side verification&lt;br&gt;
→ PAID&lt;br&gt;
→ COMPLETED&lt;/p&gt;
&lt;p&gt;This week we reached an important milestone: real wallet ownership verification is working end-to-end.&lt;/p&gt;
&lt;p&gt;What is working now&lt;/p&gt;
&lt;p&gt;We created a completely isolated E2E environment on the VPS instead of experimenting directly in production.&lt;/p&gt;
&lt;p&gt;The test stack currently runs as:&lt;/p&gt;
&lt;p&gt;React frontend&lt;br&gt;
127.0.0.1:3010&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    ↓ proxy
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;MyZubster backend&lt;br&gt;
127.0.0.1:5010&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;MongoDB + Ethereum Sepolia RPC&lt;/p&gt;
&lt;p&gt;The environment stays private. Instead of exposing the development ports publicly, I access the React frontend from my local machine using an SSH tunnel.&lt;/p&gt;
&lt;p&gt;That also means I can use the real MetaMask browser extension against the remote test backend.&lt;/p&gt;
&lt;p&gt;Real MetaMask verification&lt;/p&gt;
&lt;p&gt;The first working flow is:&lt;/p&gt;
&lt;p&gt;Authenticated MyZubster user&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Connect MetaMask&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Backend generates challenge&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;MetaMask personal_sign&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Backend verifies signature&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Wallet becomes VERIFIED&lt;/p&gt;
&lt;p&gt;And this is now working with a real wallet.&lt;/p&gt;
&lt;p&gt;The UI successfully reached:&lt;/p&gt;
&lt;p&gt;Verified · 0xBBBc51B471…03f514bCBb&lt;/p&gt;
&lt;p&gt;with confirmation that the wallet was linked to the MyZubster account.&lt;/p&gt;
&lt;p&gt;The important detail is that this is not a payment.&lt;/p&gt;
&lt;p&gt;personal_sign is only being used to prove wallet ownership.&lt;/p&gt;
&lt;p&gt;No ETH is transferred and no gas is consumed.&lt;/p&gt;
&lt;p&gt;Authentication and wallet ownership are separate&lt;/p&gt;
&lt;p&gt;One thing I wanted to preserve in the architecture is a strict distinction between platform identity and blockchain identity.&lt;/p&gt;
&lt;p&gt;A user first authenticates with MyZubster, currently through mechanisms such as Google or GitHub OAuth.&lt;/p&gt;
&lt;p&gt;MetaMask then proves control of an EVM address.&lt;/p&gt;
&lt;p&gt;So:&lt;/p&gt;
&lt;p&gt;AUTHENTICATED ≠ WALLET VERIFIED&lt;/p&gt;
&lt;p&gt;And later:&lt;/p&gt;
&lt;p&gt;WALLET VERIFIED&lt;br&gt;
≠ REQUEST SIGNED&lt;br&gt;
≠ TX SUBMITTED&lt;br&gt;
≠ PAID&lt;br&gt;
≠ COMPLETED&lt;/p&gt;
&lt;p&gt;Those states should never collapse into a single “connected” status.&lt;/p&gt;
&lt;p&gt;An interesting network detail&lt;/p&gt;
&lt;p&gt;The wallet verification test happened while MetaMask was on:&lt;/p&gt;
&lt;p&gt;chainId 84532&lt;/p&gt;
&lt;p&gt;which is Base Sepolia.&lt;/p&gt;
&lt;p&gt;The Marketplace payment system itself targets:&lt;/p&gt;
&lt;p&gt;Ethereum Sepolia&lt;br&gt;
chainId 11155111&lt;br&gt;
0xaa36a7&lt;/p&gt;
&lt;p&gt;That is intentional.&lt;/p&gt;
&lt;p&gt;Wallet ownership verification proves control of an EVM address.&lt;/p&gt;
&lt;p&gt;The actual payment step independently checks the required network and can request MetaMask to switch to Ethereum Sepolia before sending anything.&lt;/p&gt;
&lt;p&gt;Signed Marketplace requests&lt;/p&gt;
&lt;p&gt;The next layer is already implemented.&lt;/p&gt;
&lt;p&gt;When a Buyer requests a real Marketplace listing, MyZubster can generate an order-specific challenge.&lt;/p&gt;
&lt;p&gt;The Buyer signs it with MetaMask:&lt;/p&gt;
&lt;p&gt;Marketplace listing&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Order challenge&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;personal_sign&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Signature verification&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Signed request&lt;/p&gt;
&lt;p&gt;Again, this does not move funds.&lt;/p&gt;
&lt;p&gt;It creates cryptographic evidence that the verified Buyer wallet approved that specific request.&lt;/p&gt;
&lt;p&gt;The Seller can then see wallet evidence before deciding whether to accept the order.&lt;/p&gt;
&lt;p&gt;The payment architecture&lt;/p&gt;
&lt;p&gt;After Seller acceptance, the server creates an ETH payment intent.&lt;/p&gt;
&lt;p&gt;That intent defines the expected:&lt;/p&gt;
&lt;p&gt;sender&lt;br&gt;
recipient&lt;br&gt;
amount&lt;br&gt;
chain&lt;/p&gt;
&lt;p&gt;The frontend then verifies that the currently selected MetaMask account matches the Buyer wallet.&lt;/p&gt;
&lt;p&gt;It also verifies Ethereum Sepolia.&lt;/p&gt;
&lt;p&gt;Only then can it call:&lt;/p&gt;
&lt;p&gt;ethereum.request({&lt;br&gt;
  method: &quot;eth_sendTransaction&quot;,&lt;br&gt;
  ...&lt;br&gt;
})&lt;/p&gt;
&lt;p&gt;MetaMask still requires explicit approval from the user.&lt;/p&gt;
&lt;p&gt;MyZubster never receives the private key.&lt;/p&gt;
&lt;p&gt;A transaction hash is not proof of payment&lt;/p&gt;
&lt;p&gt;This is probably the part of the architecture I care most about.&lt;/p&gt;
&lt;p&gt;The browser submitting a transaction hash does not automatically change the order to PAID.&lt;/p&gt;
&lt;p&gt;The backend independently checks the blockchain through the Sepolia RPC.&lt;/p&gt;
&lt;p&gt;It verifies things such as:&lt;/p&gt;
&lt;p&gt;correct sender&lt;br&gt;
correct recipient&lt;br&gt;
correct network&lt;br&gt;
correct amount&lt;br&gt;
successful transaction&lt;br&gt;
minimum confirmations&lt;/p&gt;
&lt;p&gt;The lifecycle can therefore look like:&lt;/p&gt;
&lt;p&gt;TX_SUBMITTED&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;CONFIRMING&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;3 confirmations&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; ↓
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;PAID&lt;/p&gt;
&lt;p&gt;If something does not match, the verifier can reject the transaction instead.&lt;/p&gt;
&lt;p&gt;What has actually been tested&lt;/p&gt;
&lt;p&gt;So far the real environment has validated the isolated VPS deployment, frontend/backend proxy, Ethereum Sepolia RPC access, SSH browser access, OAuth-authenticated MyZubster session, MetaMask detection, wallet connection, real personal_sign, server-side signature verification, and successful wallet linking.&lt;/p&gt;
&lt;p&gt;The blockchain payment code exists, but I am deliberately not calling the whole Marketplace payment flow complete yet.&lt;/p&gt;
&lt;p&gt;What remains&lt;/p&gt;
&lt;p&gt;The next E2E test needs two actors:&lt;/p&gt;
&lt;p&gt;Seller account + Seller MetaMask wallet&lt;/p&gt;
&lt;p&gt;Buyer account + Buyer MetaMask wallet&lt;/p&gt;
&lt;p&gt;The Seller will create an ETH listing.&lt;/p&gt;
&lt;p&gt;The Buyer will sign a request.&lt;/p&gt;
&lt;p&gt;The Seller will inspect and accept it.&lt;/p&gt;
&lt;p&gt;The Buyer will then submit a real Ethereum Sepolia transaction using test ETH.&lt;/p&gt;
&lt;p&gt;Finally, the backend should independently detect and verify the transaction before changing the order to:&lt;/p&gt;
&lt;p&gt;PAID&lt;/p&gt;
&lt;p&gt;and eventually:&lt;/p&gt;
&lt;p&gt;COMPLETED&lt;/p&gt;
&lt;p&gt;After the happy path works, we still need negative tests for wrong wallets, wrong networks, wrong recipients, incorrect amounts, failed transactions, insufficient confirmations, and reused transaction hashes.&lt;/p&gt;
&lt;p&gt;Why I’m building it this way&lt;/p&gt;
&lt;p&gt;I don’t want “Connect Wallet” to become a magic button that implicitly means identity, authorization, payment, and settlement.&lt;/p&gt;
&lt;p&gt;Each operation should have its own proof.&lt;/p&gt;
&lt;p&gt;OAuth&lt;br&gt;
→ proves the MyZubster account&lt;/p&gt;
&lt;p&gt;Wallet signature&lt;br&gt;
→ proves control of the address&lt;/p&gt;
&lt;p&gt;Order signature&lt;br&gt;
→ proves approval of the request&lt;/p&gt;
&lt;p&gt;Blockchain transaction&lt;br&gt;
→ proves value movement&lt;/p&gt;
&lt;p&gt;Server verifier&lt;br&gt;
→ proves that the transaction matches the order&lt;/p&gt;
&lt;p&gt;That makes the system more complex than a simple wallet-connect demo, but it also makes the trust model much clearer.&lt;/p&gt;
&lt;p&gt;The first major milestone is now working:&lt;/p&gt;
&lt;p&gt;a real authenticated MyZubster user can connect MetaMask, sign an off-chain challenge, and have their EVM wallet independently verified and linked by the backend.&lt;/p&gt;
&lt;p&gt;Next stop: the first complete Buyer → Seller transaction on Ethereum Sepolia.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/28576/building-a-real-metamask-ethereum-sepolia-payment-flow-for-myzubster</guid>
<pubDate>Fri, 25 Sep 2026 05:53:49 +0000</pubDate>
</item>
<item>
<title>Enterprise Vulnerability Management: A Comprehensive Guide</title>
<link>https://coderlegion.com/15541/enterprise-vulnerability-management-a-comprehensive-guide</link>
<description>
&lt;h2&gt;Understanding Enterprise Vulnerability Management (EVM)&lt;/h2&gt;
&lt;p&gt;Okay, let's dive into Enterprise Vulnerability Management (evm). You ever stop to think how many doors and windows you have in your house? Now, imagine that for your &lt;em&gt;entire&lt;/em&gt; company. Scary, right?&lt;/p&gt;
&lt;p&gt;EVM is basically a super organized system for finding, fixing, and keeping an eye on weaknesses in your company's tech stuff. (&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.pmi.org/learning/library/earned-value-management-benefits-5881&quot;&gt;EVM for the rest of us - PMI&lt;/a&gt;) Think of it as a continuous cycle of security check-ups, but on a grand scale.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Definition&lt;/strong&gt;: It's the process of finding, checking, fixing, and reporting flaws in your it setup. (&lt;a rel=&quot;nofollow&quot; href=&quot;https://aws.amazon.com/what-is/debugging/&quot;&gt;What is Debugging? - Debugging Explained - Amazon AWS&lt;/a&gt;) SentinelOne says it's all about closing those exploit paths &lt;em&gt;before&lt;/em&gt; the bad guys get a chance. That sounds pretty good, right?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scope&lt;/strong&gt;: It covers &lt;em&gt;everything&lt;/em&gt;, from your office computers, cloud servers, phones, and even those weird iot devices, according to sentinelone. (&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.sentinelone.com/cybersecurity-101/endpoint-security/endpoint-protection/&quot;&gt;What is Endpoint Protection? A Comprehensive Guide 101&lt;/a&gt;)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Why it Matters&lt;/strong&gt;: Honestly, there's a &lt;em&gt;ton&lt;/em&gt; of reasons to care. It protects from cyber attacks, helps you follow rules (compliance!), keeps things running smoothly, handles remote workers, and helps your security team handle all of it.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Okay, so maybe you're not a techie. But, trust me, this stuff matters to &lt;em&gt;everyone&lt;/em&gt;&amp;mdash;especially the people holding the purse strings.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Quantifying the Risk&lt;/strong&gt;: It's about figuring out &lt;em&gt;how much&lt;/em&gt; you could lose if something goes wrong. Think about it: a data breach can cost millions and ruin your reputation. For example, a retail company might calculate that a breach of their customer database could lead to millions in fines, lost sales due to reputational damage, and the cost of credit monitoring for affected customers.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ROI (Return on Investment)&lt;/strong&gt;: Showing that spending money on evm &lt;em&gt;actually&lt;/em&gt; saves you money in the long run. It's like saying, &quot;Hey, spending a little now means we won't get hit with a &lt;em&gt;huge&lt;/em&gt; bill later.&quot; For instance, an organization might track the reduction in security incidents and the associated costs (like incident response and downtime) after implementing an EVM program, demonstrating a clear financial benefit.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Aligning With Business Goals&lt;/strong&gt;: evm needs to fit in with what your company &lt;em&gt;actually&lt;/em&gt; cares about. Are you okay with some risk, or do you want to be super careful?&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here's a peek at how EVM might look in action:&lt;/p&gt;
&lt;p&gt;Imagine a hospital. They've got &lt;em&gt;tons&lt;/em&gt; of devices: computers, medical equipment, you name it. An evm program would constantly scan all those devices for weaknesses &lt;em&gt;before&lt;/em&gt; some hacker does.&lt;/p&gt;
&lt;img src=&quot;https://cdn.pseo.one/6853a4a8a2796a91bb994a76/687e6d61f6fe799d28851eff/enterprise-vulnerability-management-comprehensive-guide/mermaid-diagram-1.svg&quot; alt=&quot;Diagram 1&quot; width=&quot;100%&quot; style=&quot;width: 100%; display: block; float: left;&quot;&gt;

  
&lt;p&gt;&lt;em&gt;Diagram 1 illustrates the cyclical nature of Enterprise Vulnerability Management, showing the key phases from identification to remediation and continuous monitoring.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Alright, that's the basic idea behind Enterprise Vulnerability Management. Now that you have a general understanding, up next, we'll dive deeper into the business case for evm.&lt;/p&gt;
&lt;h2&gt;Key Components of an Effective EVM Program&lt;/h2&gt;
&lt;p&gt;Okay, so you're trying to build an Enterprise Vulnerability Management (evm) program. Where do you even start? It's like trying to organize your junk drawer &amp;ndash; overwhelming, but &lt;em&gt;totally&lt;/em&gt; doable if you break it down.&lt;/p&gt;
&lt;p&gt;An effective evm program isn't just about buying a fancy scanner; it's about building a solid, repeatable process. Think of these components as the pillars holding up the whole operation.&lt;/p&gt;
&lt;p&gt;First things first, you gotta know what you &lt;em&gt;have&lt;/em&gt;. It's kinda like figuring out what ingredients are in your fridge &lt;em&gt;before&lt;/em&gt; you try to cook dinner.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automated asset discovery&lt;/strong&gt;: Use tools that automatically find &lt;em&gt;everything&lt;/em&gt; connected to your network. This includes servers, workstations, cloud instances, and even those weird iot devices no one remembers setting up.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Accurate asset inventory&lt;/strong&gt;: Keep a detailed, up-to-date list of all assets. I mean, &lt;em&gt;really&lt;/em&gt; detailed &amp;ndash; operating systems, software versions, network addresses, who owns it, etc.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Asset classification&lt;/strong&gt;: Categorize assets based on how important they are to the business. A database with customer data is way more critical than, say, the breakroom tv. This way, you know what to focus on first.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Think about a retail chain; they've got point-of-sale systems, inventory servers, customer databases, and a whole lotta other stuff. If they don't know &lt;em&gt;everything&lt;/em&gt; that's connected to their network, they're basically leaving doors unlocked for hackers.&lt;/p&gt;
&lt;p&gt;Alright, now that you know what you have, you need to find out what's broken. This is where the scanning comes in.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Right vulnerability scanners&lt;/strong&gt;: Pick the right tools for the job. What I mean is, you need scanners that can handle your specific environment &amp;ndash; operating systems, applications, network devices, the whole shebang.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Optimal scan configuration&lt;/strong&gt;: Configure those scanners &lt;em&gt;correctly&lt;/em&gt;. Don't just run them out of the box; tweak the settings to get the best coverage and accuracy.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Vulnerability scoring&lt;/strong&gt;: Understand vulnerability scoring systems. The Common Vulnerability Scoring System (cvss) gives each vulnerability a severity score.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Authenticated vs. unauthenticated&lt;/strong&gt;: Know the difference here. Authenticated scans log into systems to get a &lt;em&gt;much&lt;/em&gt; deeper look. Unauthenticated scans are like knocking on the door &amp;ndash; they only see what's visible from the outside.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;According to &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.tenable.com/source/vulnerability-management&quot;&gt;Tenable&lt;/a&gt;, vulnerability management solutions help organizations accurately identify, investigate and prioritize vulnerabilities across their attack surface.&lt;/p&gt;
&lt;p&gt;Found the problems? Great! Now, let's fix 'em.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Risk-based remediation&lt;/strong&gt;: Fix the &lt;em&gt;most dangerous&lt;/em&gt; stuff first. Don't waste time patching low-risk vulnerabilities when critical systems are exposed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automated patch deployment&lt;/strong&gt;: Automate as much of the patch deployment process as possible. This saves &lt;em&gt;tons&lt;/em&gt; of time and reduces the chance of human error.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Exception management&lt;/strong&gt;: Sometimes, you can't patch something right away. Maybe it'll break a critical application, or there's no patch available yet. That's were compensating controls come in.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Compensating Controls&lt;/strong&gt;: These are security measures put in place to reduce the risk of a vulnerability when the primary control (like patching) isn't feasible or immediately possible. For example, if a critical server can't be patched due to compatibility issues, a compensating control might be to isolate that server on a separate network segment (network segmentation) or to implement stricter access controls and monitoring for it. In essence, they're alternative security safeguards to mitigate risk.&lt;/p&gt;
&lt;p&gt;Oh, and don't forget about sso and user management. You can implement this for enterprise client with &lt;a rel=&quot;nofollow&quot; href=&quot;https://ssojet.com&quot;&gt;SSOJet&lt;/a&gt;'s api-first platform.&lt;/p&gt;
&lt;p&gt;Okay, so you've scanned, assessed, and patched. Are you done? Nope!&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Key Performance Indicators (kpis)&lt;/strong&gt;: Set up kpis to track the effectiveness of your evm program. Things like: How many vulnerabilities are found per month? How long does it take to patch them?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dashboards and reports&lt;/strong&gt;: Create dashboards and reports to visualize your progress and identify trends. SentinelOne says that auditors expect to see logs of weaknesses identified, patching deadlines, and confirmation of patch implementations.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stakeholder communication&lt;/strong&gt;: Keep everyone in the loop. Let management know what you're doing, what progress you're making, and what risks you're facing.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;img src=&quot;https://cdn.pseo.one/6853a4a8a2796a91bb994a76/687e6d61f6fe799d28851eff/enterprise-vulnerability-management-comprehensive-guide/mermaid-diagram-2.svg&quot; alt=&quot;Diagram 2&quot; width=&quot;100%&quot; style=&quot;width: 100%; display: block; float: left;&quot;&gt;

  
&lt;p&gt;&lt;em&gt;Diagram 2 outlines the core components of an effective EVM program, from asset management and scanning to remediation and reporting.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;These key components are &lt;em&gt;essential&lt;/em&gt; for building a solid Enterprise Vulnerability Management program. Next up, we'll dive into some of the tools and technologies that can help you automate and streamline the whole process.&lt;/p&gt;
&lt;h2&gt;The EVM Process: A Step-by-Step Guide&lt;/h2&gt;
&lt;p&gt;Okay, so you're thinking about vulnerability management? It's more than just running a scan and hoping for the best, you know? It's a process, a cycle, a &lt;em&gt;whole thing&lt;/em&gt;. Think of it like this: you wouldn't build a house without a plan, right? Same goes for keeping your systems safe.&lt;/p&gt;
&lt;p&gt;First up, you gotta figure out what you're actually trying to protect. It's not just about slapping a firewall on everything and calling it a day.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Defining the scope of the evm program&lt;/strong&gt; is essential. What's in bounds? What's out? Are we talking &lt;em&gt;everything&lt;/em&gt;, or just the stuff that makes us money? You need to decide what is important. Consider factors like business criticality (e.g., systems directly supporting revenue generation), regulatory requirements (e.g., HIPAA for healthcare data), and the overall attack surface.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Identifying key stakeholders and their responsibilities&lt;/strong&gt; is crucial. Who is in charge of what? Is it the it team? The security team? Some random guy named bob in accounting? Someone needs to own this, or it'll fall apart fast.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Establishing policies and procedures&lt;/strong&gt; is surprisingly important. What happens when a vulnerability is found? Who gets notified? What's the timeline for fixing it? write it down, or you'll be making it up as you go.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Next, you need to go hunting for problems.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Conducting asset discovery and vulnerability scanning&lt;/strong&gt; is the main event. You need to find &lt;em&gt;everything&lt;/em&gt; connected to your network, and then scan it for weaknesses. Think of it like walking around your house and jiggling all the doorknobs.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Analyzing scan results and identifying vulnerabilities&lt;/strong&gt; is where it gets tricky. You'll probably get a &lt;em&gt;ton&lt;/em&gt; of results and decide what's important.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Validating vulnerabilities and eliminating false positives&lt;/strong&gt; is essential, because scanners aren't perfect. You don't want to waste time chasing ghosts, you know?&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Now you know what's broken; let's fix it.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prioritizing vulnerabilities based on risk&lt;/strong&gt; is key. Not all vulnerabilities are created equal. Some are minor annoyances, others are gaping holes that could sink the ship.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Developing remediation plans and assigning owners&lt;/strong&gt; is important. How are you going to fix each vulnerability? Who's going to do it? What is the timeline?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Implementing remediation actions (patching, configuration changes, etc.)&lt;/strong&gt; is the actual work. This is where you roll up your sleeves and start patching systems, changing configurations, and generally making things more secure.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You fixed the problems, but this is not over. You need to make sure they stay fixed.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Verifying the effectiveness of remediation actions&lt;/strong&gt; is essential. Did the patch actually work? Are you &lt;em&gt;sure&lt;/em&gt;? Don't just assume it's fixed; double-check.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Monitoring systems for new vulnerabilities&lt;/strong&gt; is a never-ending process. New vulnerabilities are discovered &lt;em&gt;all the time&lt;/em&gt;, so you need to keep scanning and assessing.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Generating reports and tracking progress&lt;/strong&gt; is how you know if you're actually getting better. Are you finding fewer vulnerabilities over time? Are you patching them faster?&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;As &lt;a rel=&quot;nofollow&quot; href=&quot;https://escape.tech/blog/vulnerability-management-lifecycle/&quot;&gt;Escape.tech&lt;/a&gt; notes, it's about evolving beyond mere compliance and building a &quot;&lt;em&gt;thriving organism capable of adapting to and repelling sophisticated cyber attacks&lt;/em&gt;&quot;. That puts it nicely, right?&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So, that's the Enterprise Vulnerability Management process in a nutshell. Next up, we'll dive into the tools and technologies that can help you automate and streamline the whole thing.&lt;/p&gt;
&lt;h2&gt;Challenges in Enterprise Vulnerability Management&lt;/h2&gt;
&lt;p&gt;Okay, so you're trying to wrangle all the moving parts in Enterprise Vulnerability Management (evm)? It's like herding cats, isn't it? So many things can go wrong, so many things to keep track of.&lt;/p&gt;
&lt;p&gt;One of the biggest headaches is just the &lt;em&gt;sheer volume&lt;/em&gt; of vulnerabilities you're dealing with. I mean, &lt;em&gt;hundreds&lt;/em&gt;, sometimes &lt;em&gt;thousands&lt;/em&gt;, popping up every month. It's a constant barrage.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Sorting Through the Noise&lt;/strong&gt;: You're not just seeing a list; you're trying to figure out what &lt;em&gt;actually&lt;/em&gt; matters. Is this a minor glitch, or is it the kind of thing that'll let hackers waltz right in? It's a constant gamble.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prioritization Headaches&lt;/strong&gt;: Deciding what to fix first? That's the real trick. You can't patch everything at once, so you're constantly weighing risks, potential impacts, and the resources ya got. Kinda like playing whack-a-mole, but with really nasty consequences if you miss one.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automation to the Rescue&lt;/strong&gt;: Thankfully, there are tools out there that can help you sort and prioritize. These tools help you to automate vulnerability and threat management, which is essential in large organizations.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And then there's the whole legacy system problem. Old systems that can't be easily patched, or might break if you &lt;em&gt;do&lt;/em&gt; try to patch them.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Unpatchable&lt;/strong&gt;: You've got these ancient systems humming along, keeping the lights on, but they're basically sitting ducks. No new patches, no support, just a big ol' vulnerability waiting to be exploited.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Compensating Controls&lt;/strong&gt;: If you can't patch, you gotta get creative, right? Things like network segmentation, intrusion detection, all that jazz. It's like putting up extra walls and security cameras around a rickety old building.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Upgrade or Die Trying&lt;/strong&gt;: Eventually, you gotta bite the bullet and upgrade or replace these dinosaurs. But that's a project in itself, right? Planning, budgeting, migrating data &amp;ndash; it's a &lt;em&gt;whole thing&lt;/em&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Don't even get me started on the distributed workforce. Remote workers, home networks, personal devices &amp;ndash; it's a whole new can of worms.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Wild West&lt;/strong&gt;: Remote devices are outside your nice, controlled network. You don't know what kinda security they got, what kinda networks they're connecting to. It's like sending your data out into the wild west.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Home Network Nightmares&lt;/strong&gt;: Home networks are notoriously insecure. Weak passwords, outdated routers, you name it. It's a hacker's playground.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Policy Enforcement&lt;/strong&gt;: Getting remote workers to follow security rules? Good luck with that. You need strong policies, clear communication, and maybe a lil' bit of nagging.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And then there&amp;rsquo;s the whole DevSecOps thing. Getting security baked into the development process from the start.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Shifting Left (and Hoping for the Best)&lt;/strong&gt;: The idea is to catch vulnerabilities early, &lt;em&gt;before&lt;/em&gt; they make it into production. Sounds great in theory, but it requires a &lt;em&gt;major&lt;/em&gt; culture shift. Integrating security into the development pipeline means developers need to be security-aware, and security teams need to collaborate closely with development. This can involve training, providing secure coding guidelines, and embedding security testing tools directly into the CI/CD pipeline.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automated Scans in the Pipeline&lt;/strong&gt;: You can automate vulnerability scans in the ci/cd pipeline, which is great. But you gotta make sure the scans are accurate, fast, and don't slow down development &lt;em&gt;too&lt;/em&gt; much. This helps catch common coding errors and dependency vulnerabilities early, reducing the burden on later stages of the EVM process.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security and Devs &amp;ndash; Friends, Not Foes&lt;/strong&gt;: Getting security and development teams to actually &lt;em&gt;work together&lt;/em&gt;? That's the real challenge. Breaking down silos, fostering collaboration, it's a long process. When security is seen as a blocker, it's ignored. When it's integrated as a shared responsibility, it becomes a force multiplier for EVM.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;So, yeah, Enterprise Vulnerability Management? It's not for the faint of heart. But, knowing these challenges is half the battle. Next up, we'll dive into some of the tools and technologies that can help you automate and streamline the whole process.&lt;/p&gt;
&lt;h2&gt;Best Practices for a Robust EVM Program&lt;/h2&gt;
&lt;p&gt;Alright, so you're trying to keep your Enterprise Vulnerability Management (evm) program from going off the rails? It's like trying to juggle chainsaws while riding a unicycle, right? Let's talk best practices...&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Establish Clear Policies and Procedures:&amp;lt;&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;
</description>
<category>Other</category>
<guid isPermaLink="true">https://coderlegion.com/15541/enterprise-vulnerability-management-a-comprehensive-guide</guid>
<pubDate>Thu, 23 Apr 2026 22:56:14 +0000</pubDate>
</item>
<item>
<title>Part-1: Intro to MEV(Maximal Extractable value) Attack</title>
<link>https://coderlegion.com/4496/part-1-intro-to-mev-maximal-extractable-value-attack</link>
<description>&lt;ul&gt;
&lt;li&gt;MEV attacks happen when someone (usually &lt;code&gt;a miner, validator, or bot&lt;/code&gt;) manipulates the order of pending transactions in Ethereum (EVM chains) to make extra money&lt;/li&gt;
&lt;li&gt;&lt;p&gt;This attaclk is done by &lt;code&gt;front-running, back-running, sandwich or liquidation attacks&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;mempool&lt;/code&gt; -&amp;gt; this is a &lt;code&gt;public memory pool&lt;/code&gt;, where all TNX are visible&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;code&gt;bots and attackers&lt;/code&gt; scans mempool for higher and profitable trades&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Note: This is just an intro for MEV attack with minimal code example. Part-2 will contain the code example for each attack type in MEV&lt;/strong&gt;&lt;/p&gt;
&lt;h2 id=&quot;how-this-attacks-work-&quot;&gt;How this attacks work?&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;valid user submits TNX for some operation -&amp;gt; &lt;code&gt;attacker/bots&lt;/code&gt; scan the mempool for &lt;code&gt;profitable opportunities or for high trades&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;before user submit and completes TNX -&amp;gt; &lt;code&gt;attacker/bots&lt;/code&gt; manipulates the &lt;code&gt;block/price/protocol&lt;/code&gt; to earn more profit&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;core-concepts-of-mev&quot;&gt;Core concepts of MEV&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;it is easier to take advantage of MEV opportunities on &lt;code&gt;ethereum than bitcoin&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Due to &lt;code&gt;Ethereum account model&lt;/code&gt; as compared to &lt;code&gt;Bitcoin UTXO model&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;arbitrage trading&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;liquidation&lt;/li&gt;
&lt;li&gt;sandwiching&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;types-of-mev-attacks&quot;&gt;Types of MEV Attacks&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Front-running attack&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;An attacker/bot scans mempool for higher trading price and sees &lt;code&gt;user TNX waiting&lt;/code&gt; to be processed and quickly submits their own -&amp;gt; &lt;code&gt;just ahead of yours&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// protocol will submit TNX to select a winner -&amp;gt;  attacker/bot sees TNX in mempool -&amp;gt; realizes they are not winner
// before protocol completes TNX and select a winner  -&amp;gt;   attacker refunds all token from protocol
// winner ends up getting lower winning price  -&amp;gt; attacker/bot gets their token
function selectWinner() external;
function refund(uint256 amount) external;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;user submit TNX  -&amp;gt;  &lt;code&gt;attacker/bot scans TNX in mempool&lt;/code&gt; -&amp;gt;  attacker submit their own TNX before user can submit their TNX&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Sandwich attack&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;An attacker places &lt;code&gt;one transaction just before user&lt;/code&gt; and &lt;code&gt;another just after user&lt;/code&gt;  -&amp;gt; sandwiching your trade.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// attacker/bot TNX  -&amp;gt;&amp;gt;&amp;gt;  user TNX  -&amp;gt;&amp;gt;&amp;gt;   attacker/bot TNX
// user takes flashloan to buy token  -&amp;gt;  attacker/bot buys token before user  -&amp;gt;  increases the token price
// user buys token at higher price -&amp;gt;  after users TNX  -&amp;gt;  attacker/bot sells token at higher price
function flashloan(to, token, amount) external;
function Tswap(token, amount) external;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Attacker buys before you and sells after you&lt;/code&gt;  -&amp;gt;&amp;gt;&amp;gt;  earning profit and users ends up paying higher price&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Arbitrage MEV Attack&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;An attacker &lt;code&gt;exploits price differences&lt;/code&gt; for a token across different DEX's at the same time&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// tokenA costs -&amp;gt; 100 USDC on uniswap
// tokenA costs -&amp;gt; 150 USDC on sushi at same time
// attacker/bots continuously scans mempool for higher trades and price changes
function tokenA_pool_uni(amount) external;
function tokenA_pool_sushi(amount) external;
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;attacker/bot&lt;/code&gt; always looks for &lt;code&gt;higher and profitable trades in mempool&lt;/code&gt; to gain profit&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Liquidation MEV Attack&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;On DeFi lending protocols&lt;/code&gt;, if someone’s loan goes &lt;code&gt;under-collateralize&lt;/code&gt; (not enough assets to back the loan, e.g., in a price drop), anyone can &lt;code&gt;repay their debt and claim their collateral—with a profit bonus&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;MEV bots race to be first and claim the extra bonus&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// A loan on Aave or Compound is about to be liquidated. 
// Bots spot the chance, quickly repay the debt, seize the collateral (often at a discount), 
// and resell it for a reward
&lt;/code&gt;&lt;/pre&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;JIT (Just-In-Time) MEV Attack&lt;/strong&gt;:&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;simple-contract-example-for-mev-attack&quot;&gt;Simple contract example for MEV Attack&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;the contract is vulnerable to MEV attack&lt;/li&gt;
&lt;li&gt;attacker/bot can scan mempool for TNX and password  -&amp;gt;&amp;gt;&amp;gt;  withdraws funds before user could&lt;/li&gt;
&lt;li&gt;To run the code on remix checkout the below link(Thanks to CyfrinUpdraft):&lt;br&gt;
 &lt;a rel=&quot;nofollow&quot; href=&quot;https://remix.ethereum.org/#url=https://github.com/Cyfrin/sc-exploits-minimized/blob/main/src/MEV/Frontran.sol&amp;amp;lang=en&amp;amp;optimize=false&amp;amp;runs=200&amp;amp;evmVersion=null&amp;amp;version=soljson-v0.8.20+commit.a1b79de6.js&quot;&gt;Run code on remix&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;contract FrontRan {
    error BadWithdraw();

    bytes32 public s_secretHash;

    event success();
    event fail();

    constructor(bytes32 secretHash) payable {
        s_secretHash = secretHash;
    }

    // userA -&amp;gt; call withdraw() with valid password to withdraw 100ETH
    // userB -&amp;gt; user MEV Bot frontrun the TNX, uses the valid password from userA's TNX and calls the withdraw()
    // userB -&amp;gt; withdraws 100ETH before userA withdraws funds
    function withdraw(string memory password) external payable {
        if (keccak256(abi.encodePacked(password)) == s_secretHash) {
            (bool sent,) = msg.sender.call{value: address(this).balance}(&quot;&quot;);
            if (!sent) {
                revert BadWithdraw();
            }
            emit success();
        } else {
            emit fail();
        }
    }
    function balance() external view returns (uint256) {
        return address(this).balance;
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;mitigation&quot;&gt;Mitigation&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Proper &lt;code&gt;slippage protection&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;use of &lt;code&gt;private RPC url&lt;/code&gt; and &lt;code&gt;Private transactions (Flashbots, MEV-resistant chains).&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;And, base on protocol implement the protection&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;resources&quot;&gt;Resources&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.galaxy.com/insights/research/mev-how-flashboys-became-flashbots&quot;&gt;https://www.galaxy.com/insights/research/mev-how-flashboys-became-flashbots&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://blockworks.co/news/curve-suffers-exploit&quot;&gt;https://blockworks.co/news/curve-suffers-exploit&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.flashbots.net/&quot;&gt;https://docs.flashbots.net/&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Blockchain Sec</category>
<guid isPermaLink="true">https://coderlegion.com/4496/part-1-intro-to-mev-maximal-extractable-value-attack</guid>
<pubDate>Thu, 07 Aug 2025 17:24:51 +0000</pubDate>
</item>
<item>
<title>Private variables are not really private on EVM</title>
<link>https://coderlegion.com/3833/private-variables-are-not-really-private-on-evm</link>
<description>&lt;h2 id=&quot;private-variables-on-evm-blockchains-are-not-really-private-and-hidden&quot;&gt;&lt;strong&gt;Private variables on EVM blockchains are not really private and hidden&lt;/strong&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Do you think storing important keys and data in private key's are safer on EVM chains. Definition say's all, EVM is an transparent chain&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Attackers&lt;/strong&gt; will always looks for deployed contract addresses of contracts that are vulnerable and contains funds&lt;/li&gt;
&lt;li&gt;marking a variable as &lt;strong&gt;private&lt;/strong&gt; only prevents other contracts from accessing it. &lt;/li&gt;
&lt;li&gt;State variables marked as &lt;strong&gt;private and local variables are still publicly accessible&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;simple-contract-scenario&quot;&gt;&lt;strong&gt;Simple contract scenario&lt;/strong&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The given contract stores &lt;code&gt;password&lt;/code&gt; on-chain and it is marked as &lt;code&gt;private variable&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;contract Vault {
        bool public locked;
@&amp;gt;  bytes32 private password;

    constructor(bytes32 _password) {
        locked = true;
        password = _password;
    }
    function unlock(bytes32 _password) public {
        if (password == _password) {
            locked = false;
        }
    } 
}
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Above Contract stored password inside an private variable, thinking that it's safer and no one can access it!!!&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;simple-way-to-access-private-and-public-data-of-deployed-contracts&quot;&gt;&lt;strong&gt;Simple way to access private and public data of deployed contracts&lt;/strong&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;With the help of &lt;code&gt;contract addess&lt;/code&gt; and &lt;code&gt;storage layout&lt;/code&gt;, attackers can easily read the data from private and public data stored on-chain&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;1-through-cast-commands-&quot;&gt;1. &lt;strong&gt;Through cast commands&lt;/strong&gt;:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Dev's using foundry can use &lt;code&gt;cast commands&lt;/code&gt; to access storage layout of any contract using below commands.&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;cast storage --rpc-url $SEPOLIA_RPC_URL --etherscan-api-key $ETHERSCAN_API_KEY CONTRACT_ADDRESS SLOT_NUMBER
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;This command can be used to easily read private variables stored on-chain&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;2-through-etherscan-&quot;&gt;2. &lt;strong&gt;Through Etherscan&lt;/strong&gt;:&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to &lt;code&gt;Etherscan&lt;/code&gt; and search for &lt;code&gt;contract address&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Copy and explore the &lt;code&gt;TNX hash from internal transactions&lt;/code&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://coderlegion.com/?qa=blob&amp;amp;qa_blobid=14878155312318759240&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Go for &lt;code&gt;state&lt;/code&gt; and look for all &lt;code&gt;storage value&lt;/code&gt; present!!!&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src=&quot;https://media.daily.dev/image/upload/s--zu3-liw0--/f_auto/v1751011864/ugc/content_bb67d3b1-b31b-4f4d-9fcc-78ac559a7f56?_a=BAMClqZW0&quot; alt=&quot;PRIVATE-DATA-2&quot;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://media.daily.dev/image/upload/s--3Uttqpoc--/f_auto/v1751011870/ugc/content_a86d4e88-5a7a-40de-8723-acc06926d127?_a=BAMClqZW0&quot; alt=&quot;PRIVATE-DATA-3&quot;&gt;&lt;/p&gt;
&lt;h2 id=&quot;try-this-ctf-to-gain-more-understanding&quot;&gt;Try this CTF to gain more understanding&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://ethernaut.openzeppelin.com/level/8&quot;&gt;https://ethernaut.openzeppelin.com/level/8&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;real-time-case-studies-you-want-to-look&quot;&gt;Real time case studies you want to look&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://blog.ethereum.org/2016/12/05/zksnarks-in-a-nutshell&quot;&gt;https://blog.ethereum.org/2016/12/05/zksnarks-in-a-nutshell&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;so-be-aware-of-what-you-are-storing-on-chain-and-how-you-are-enabling-attackers-to-explore-your-contract-and-drains-out-all-funds&quot;&gt;So be aware of what you are storing on-chain and how you are enabling attackers to explore your contract and drains out all funds&lt;/h3&gt;
</description>
<category>Blockchain Sec</category>
<guid isPermaLink="true">https://coderlegion.com/3833/private-variables-are-not-really-private-on-evm</guid>
<pubDate>Tue, 08 Jul 2025 20:22:09 +0000</pubDate>
</item>
<item>
<title>Advance EVM - Opcodes, low-level calls and instructions</title>
<link>https://coderlegion.com/3708/advance-evm-opcodes-low-level-calls-and-instructions</link>
<description>&lt;h2 id=&quot;evm-compatible-opcodes-and-calling&quot;&gt;EVM compatible, opcodes and calling&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;The EVM basically represents all the instructions a computer needs to be able to read.&lt;/li&gt;
&lt;li&gt;Any language that can compile down to bytecode with these opcodes is considered &lt;strong&gt;EVM compatible&lt;/strong&gt;'&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Data in Transactions&lt;/strong&gt;:&lt;ul&gt;
&lt;li&gt;When we send a transaction, it is &lt;code&gt;compiled&lt;/code&gt; down to bytecode&lt;/li&gt;
&lt;li&gt;The EVM processes this data to determine which function to call and what inputs to provide.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Bytecode&lt;/strong&gt;:&lt;ul&gt;
&lt;li&gt;When a contract is deployed, it is compiled into &lt;code&gt;bytecode understood by the EVM.&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;This &lt;code&gt;bytecode&lt;/code&gt; represents exactly the &lt;code&gt;low level instructions&lt;/code&gt; to make our contract happen.&lt;/li&gt;
&lt;li&gt;This &lt;strong&gt;bytecode consist of opcodes&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Opcodes&lt;/strong&gt;:&lt;ul&gt;
&lt;li&gt;Each opcode is a 2-character hexadecimal, represents some special instruction&lt;/li&gt;
&lt;li&gt;This opcode reader is sometimes abstractly called the &lt;code&gt;EVM&lt;/code&gt;   &lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Encoding Data&lt;/strong&gt;:&lt;ul&gt;
&lt;li&gt;Now, &lt;code&gt;ABI encoding will convert data into bytes&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Ex: &lt;strong&gt;abi.encodePacked() || abi.encode()&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Decoding data&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Decoding is the process of taking the raw bytes and reconstructing the original data&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ex:  &lt;strong&gt;abi.decode()&lt;/strong&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;call&lt;/strong&gt; &lt;/p&gt;
&lt;pre&gt;&lt;code&gt; - How we call functions to change the state variable of the blockchain
 ```js
 function stateChange(address _address) public {
     s_state[_address] = 12;
 }
 ```
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;staticcall&lt;/strong&gt;&lt;pre&gt;&lt;code&gt;- This is how (at a low level) we do our &quot;view&quot; or &quot;pure&quot; function calls  
 ```js
 function getState() public view returns(uint256){
     return s_state;
 }
 ```
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&quot;send-tnx-that-call-functions-with-just-data-field-populated-evm-signature-selector-&quot;&gt;Send TNX that call functions with just data field populated (EVM Signature Selector)&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;In order to call a function using only the data field of call, we need to encode:&lt;ol&gt;
&lt;li&gt;function name&lt;/li&gt;
&lt;li&gt;parameters we want to add&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Now each contract assigns each function a &lt;strong&gt;&lt;code&gt;function ID/Method ID&lt;/code&gt;&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Function selector&lt;/strong&gt; is the first 4 bytes of the function signature&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Function signature&lt;/strong&gt; a string that defines the function name &amp;amp; &lt;pre&gt;&lt;code&gt;parameters
**Ex :  transfer(address,uint256)**
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Lets assume, we need to call &lt;code&gt;transfer(address,uint256)&lt;/code&gt; function but by filling the data field!!!&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;getFunctionSelector&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;- By this method we will get function selector of the calling function.
&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;function getSelector() public pure returns (bytes4 selector) {
    selector = bytes4(keccak256(bytes(&quot;transfer(address,uint256)&quot;)));
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;call Transfer Function with selector&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Will use &lt;strong&gt;&lt;code&gt;abi.encodeWithSelector(bytes4 selector, args1, args2)&lt;/code&gt;&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// Here, using EVM cheatcodes we can directly call the transfer() function using data-field

function callTransferData(address _address, uint256 _amount) public returns (bytes4 ,bool) {
    (bool success, bytes memory data) = address(this).call(
        abi.encodeWithSelector(getSelector(), _address,_amount)
    );
    return (bytes4(data), success);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;call Transfer Function with signature&lt;/code&gt;&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Will use &lt;strong&gt;&lt;code&gt;abi.encodeWithSignature(string functSignature, args1, args2)&lt;/code&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;pre&gt;&lt;code class=&quot;language-js&quot;&gt;// Here, we will not use function selector. Rather, we will use function signature to call our transfer() function by populating data field.

function callTransferDataSig(address _address, uint256 _amount) public returns (bytes4 ,bool) {
    (bool success, bytes memory data) = address(this).call(
        abi.encodeWithSignature(&quot;transfer(address,uint256)&quot;, _address,_amount)
    );
    return (bytes4(data), success);
}
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Note: If there is anything wrong or if you want to share more concepts or if have any doubts. Pls comment below!!!&lt;/strong&gt;&lt;/p&gt;
</description>
<category>Blockchain Sec</category>
<guid isPermaLink="true">https://coderlegion.com/3708/advance-evm-opcodes-low-level-calls-and-instructions</guid>
<pubDate>Thu, 03 Jul 2025 14:13:21 +0000</pubDate>
</item>
<item>
<title>What is StarkNet and How Does It Differ from zkSync?</title>
<link>https://coderlegion.com/1257/what-is-starknet-and-how-does-it-differ-from-zksync</link>
<description>&lt;h3 id=&quot;starknet-vs-zksync&quot;&gt;StarkNet Vs. zkSync&lt;/h3&gt;
&lt;p&gt;As Ethereum continues to grapple with scalability challenges, Layer 2 solutions have emerged as a critical innovation to enhance the network’s performance. Among these solutions, StarkNet and zkSync are two of the most prominent projects leveraging zero-knowledge rollups (zk-rollups) to scale Ethereum. While both aim to solve similar problems; high gas fees, slow transaction speeds, and limited throughput—they differ significantly in their architecture, features, and use cases. In this article, we’ll explore what StarkNet is, how it works, and how it compares to zkSync.&lt;/p&gt;
&lt;h3 id=&quot;what-is-starknet-&quot;&gt;What is StarkNet?&lt;/h3&gt;
&lt;p&gt;StarkNet is a decentralized, permissionless Layer 2 scaling solution built on Ethereum that uses STARK proofs (a type of zero-knowledge proof) to enable scalable and secure smart contract execution. Developed by StarkWare, StarkNet allows developers to deploy complex dApps while maintaining Ethereum-level security.&lt;/p&gt;
&lt;p&gt;Key features of StarkNet include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scalability&lt;/strong&gt;: StarkNet can process thousands of transactions per second, far exceeding Ethereum’s current capacity.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security&lt;/strong&gt;: By anchoring its data back to Ethereum, StarkNet inherits the robust security guarantees of the Ethereum mainnet.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flexibility&lt;/strong&gt;: StarkNet supports general-purpose smart contracts, making it suitable for a wide range of applications, from DeFi to gaming.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Privacy&lt;/strong&gt;: STARK proofs inherently protect user privacy by not revealing transaction details on-chain.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;StarkNet is designed to be a general-purpose zk-rollup, meaning it can handle arbitrary computations and smart contracts, much like Ethereum itself.&lt;/p&gt;
&lt;h3 id=&quot;what-is-zksync-&quot;&gt;What is zkSync?&lt;/h3&gt;
&lt;p&gt;zkSync is another Layer 2 scaling solution built on Ethereum that uses SNARK proofs (a different type of zero-knowledge proof) to achieve scalability. Developed by Matter Labs, zkSync focuses on providing fast, low-cost transactions while maintaining Ethereum’s security.&lt;/p&gt;
&lt;p&gt;Key features of zkSync include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;User-Friendly&lt;/strong&gt;: zkSync is designed to be intuitive for users and developers, with support for EVM compatibility (via zkEVM).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Low Fees&lt;/strong&gt;: Transactions on zkSync are significantly cheaper than on Ethereum mainnet.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Instant Finality&lt;/strong&gt;: Like other zk-rollups, zkSync provides near-instant transaction finality.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Focus on Payments&lt;/strong&gt;: Early versions of zkSync were optimized for payments and token transfers, though newer iterations (e.g., zkSync Era) now support smart contracts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;zkSync aims to provide a seamless experience for Ethereum users, enabling them to enjoy faster and cheaper transactions without sacrificing security.&lt;/p&gt;
&lt;h3 id=&quot;key-differences-between-starknet-and-zksync&quot;&gt;Key Differences Between StarkNet and zkSync&lt;/h3&gt;
&lt;p&gt;While both StarkNet and zkSync are zk-rollup solutions, they differ in several important ways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Proof Technology&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;StarkNet: Uses STARK proofs (Scalable Transparent ARguments of Knowledge). STARKs are considered more scalable and quantum-resistant but require more computational resources to generate.&lt;/li&gt;
&lt;li&gt;zkSync: Uses SNARK proofs (Succinct Non-Interactive ARguments of Knowledge). SNARKs are smaller and faster to verify but rely on trusted setups, which some consider a potential vulnerability.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Smart Contract Support&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;StarkNet: Designed as a general-purpose zk-rollup, StarkNet supports complex smart contracts and arbitrary computations. However, writing smart contracts on StarkNet requires learning Cairo, a specialized programming language.&lt;/li&gt;
&lt;li&gt;zkSync: With the release of zkSync Era, zkSync now supports EVM-compatible smart contracts, allowing developers to deploy existing Ethereum dApps with minimal changes.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Developer Experience&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;StarkNet: Developers need to learn Cairo, which has a steeper learning curve compared to Solidity (the language used on Ethereum). This can be a barrier for adoption, especially for developers unfamiliar with StarkNet’s ecosystem.&lt;/li&gt;
&lt;li&gt;zkSync: zkSync’s EVM compatibility makes it easier for developers to migrate their projects from Ethereum. This lowers the barrier to entry and accelerates adoption.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Transaction Costs&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;StarkNet: Transaction costs on StarkNet are generally lower due to the efficiency of STARK proofs. However, the cost can vary depending on the complexity of the computation.&lt;/li&gt;
&lt;li&gt;zkSync: zkSync also offers low transaction costs, particularly for simple payments and token transfers. Smart contract interactions may incur slightly higher fees.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;StarkNet: Ideal for applications requiring high scalability and flexibility, such as gaming, NFTs, and complex DeFi protocols.&lt;/li&gt;
&lt;li&gt;zkSync: Suited for both payments and smart contract-based applications, with a focus on user-friendly experiences.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Ecosystem Maturity&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;StarkNet: Still in its early stages of adoption, StarkNet’s ecosystem is growing but remains smaller compared to zkSync’s.&lt;/li&gt;
&lt;li&gt;zkSync: zkSync has gained significant traction, with many projects already deploying on its platform. Its EVM compatibility has accelerated adoption among Ethereum developers.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;real-world-use-cases&quot;&gt;Real-World Use Cases&lt;/h3&gt;
&lt;p&gt;Both StarkNet and zkSync are being used in real-world applications, though their focus areas differ slightly:&lt;/p&gt;
&lt;p&gt; &lt;strong&gt;StarkNet Use Cases&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Immutable X: A Layer 2 solution for NFTs that leverages StarkNet’s scalability to enable gas-free minting and trading.&lt;/li&gt;
&lt;li&gt;dYdX: A decentralized exchange that uses StarkNet’s technology for margin trading and derivatives.&lt;/li&gt;
&lt;li&gt;Gaming: StarkNet’s high throughput makes it ideal for blockchain games requiring frequent, low-cost transactions.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; &lt;strong&gt;zkSync Use Cases&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Argent: A popular crypto wallet that uses zkSync for low-cost transactions.&lt;/li&gt;
&lt;li&gt;Loopring: A decentralized exchange and payment protocol built on zkSync.&lt;/li&gt;
&lt;li&gt;DeFi Protocols: Projects like ZigZag Exchange and Mute.io leverage zkSync for scalable DeFi applications.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;the-future-of-starknet-and-zksync&quot;&gt;The Future of StarkNet and zkSync&lt;/h3&gt;
&lt;p&gt;Both StarkNet and zkSync are poised to play a pivotal role in Ethereum’s scalability roadmap. Here’s what the future might hold for each:&lt;/p&gt;
&lt;p&gt; StarkNet&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Continued development of Cairo and developer tools to make it easier for developers to build on StarkNet.&lt;/li&gt;
&lt;li&gt;Expansion into new use cases, particularly in gaming and NFTs.&lt;/li&gt;
&lt;li&gt;Integration with Ethereum 2.0 and sharding to further enhance scalability.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt; zkSync&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wider adoption of zkSync Era, particularly among Ethereum developers looking for EVM-compatible scaling solutions.&lt;/li&gt;
&lt;li&gt;Partnerships with major projects and ecosystems to drive liquidity and usage.&lt;/li&gt;
&lt;li&gt;Potential integration with other blockchains beyond Ethereum.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;StarkNet and zkSync are two of the most innovative Layer 2 solutions addressing Ethereum’s scalability challenges. While both rely on zk-rollups to achieve their goals, they cater to slightly different audiences and use cases:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;StarkNet excels in scalability and flexibility, making it ideal for complex applications like gaming and NFTs.&lt;/li&gt;
&lt;li&gt;zkSync prioritizes user-friendliness and EVM compatibility, appealing to developers looking for a seamless transition from Ethereum.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Ultimately, the choice between StarkNet and zkSync depends on your specific needs. If you’re building a highly scalable, custom application, StarkNet might be the better fit. If you’re looking for an easy-to-use, EVM-compatible solution, zkSync could be the way to go.&lt;/p&gt;
&lt;p&gt; Ready to Explore StarkNet and zkSync?&lt;br&gt;
Here are some resources to help you get started:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://starknet.io/&quot;&gt;StarkNet Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://zksync.io/&quot;&gt;zkSync Developer Portal&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whether you choose StarkNet or zkSync, both platforms represent the cutting edge of blockchain scalability and are paving the way for a more efficient and accessible web3 future.&lt;/p&gt;
</description>
<category>Blockchain</category>
<guid isPermaLink="true">https://coderlegion.com/1257/what-is-starknet-and-how-does-it-differ-from-zksync</guid>
<pubDate>Wed, 26 Feb 2025 09:36:42 +0000</pubDate>
</item>
</channel>
</rss>