<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Igor Gulamov on Medium]]></title>
        <description><![CDATA[Stories by Igor Gulamov on Medium]]></description>
        <link>https://medium.com/@igorgulamov?source=rss-ff00d5d0ee10------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*elxG97yMDzc2J23B</url>
            <title>Stories by Igor Gulamov on Medium</title>
            <link>https://medium.com/@igorgulamov?source=rss-ff00d5d0ee10------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 25 Nov 2026 02:48:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@igorgulamov/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[We Got Tired of Smart Contract Hacks, So We Built Savant Chat]]></title>
            <link>https://medium.com/@igorgulamov/we-got-tired-of-smart-contract-hacks-so-we-built-savant-chat-f63f0e57b870?source=rss-ff00d5d0ee10------2</link>
            <guid isPermaLink="false">https://medium.com/p/f63f0e57b870</guid>
            <category><![CDATA[blockhain]]></category>
            <category><![CDATA[savant-chat]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[smart-contract-security]]></category>
            <dc:creator><![CDATA[Igor Gulamov]]></dc:creator>
            <pubDate>Mon, 17 Mar 2025 08:41:30 GMT</pubDate>
            <atom:updated>2025-03-17T08:41:30.706Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey! We’re the team behind <a href="https://savant.chat/">Savant Chat</a>. After watching project after project get drained because of some overlooked vulnerability, we basically said, “enough already.” You know that feeling when you read about yet another multi-million dollar hack and think, “this could have been prevented”? That was us, every other week.<br> The existing tools were driving us nuts. They’d flag a bunch of non-issues while completely missing the clever attack vectors that actually matter. You’d run them, fix everything they flagged, deploy with confidence… and then wake up to a drained contract. Not fun.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*03ynMFop0Eu8aBShR0LvrA.png" /></figure><h3>What we actually built</h3><p>We wanted something that thinks more like a security researcher and less like a static code analyzer. So we approached it differently:</p><ol><li>We first break down your Solidity code into logical chunks</li><li>Our primary AI agent digs in and thinks about what could go wrong, generating hypotheses about vulnerabilities</li><li>Then comes the cool part — a separate “critic” AI challenges these findings, helping filter out false alarms</li><li>Finally, you get a report that points to real issues, where exactly they are, and how to fix them</li></ol><p>This isn’t just scanning for known patterns — it’s more like having a thoughtful security researcher analyze your code, but available 24/7, 100 times faster and 10 times cheaper.</p><h3>Does it actually work? (Spoiler: Yes)</h3><p>Look, we know there’s a lot of AI hype out there. But we’ve put our system to the test. When evaluated by <a href="https://ctfbench.com/">CTFBench</a>, it achieved around 95% accuracy in finding vulnerabilities.<br> What we’re particularly proud of is how few false positives it produces. There’s nothing more frustrating than chasing down security “issues” that turn out to be nothing. We’ve optimized heavily to make sure that when Savant Chat flags something, it’s often a legitimate concern.</p><h3>How it’s being tested</h3><p>We wanted real validation, not just our own opinion that our tool is awesome. So we ran it through CTFBench — a testing framework that throws a bunch of vulnerable contracts at auditing tools. Our system caught about 95% of the vulnerabilities, which honestly surprised even us. Most tools out there struggle to break 50%. The test contracts include some pretty sneaky stuff too — hash collisions buried in innocent-looking code, subtle overflow issues, and those annoying logic flaws that hide in plain sight.</p><h3>How to use it in your workflow</h3><p>Just hook it into your existing setup and forget about it. Seriously. We made it play nice with whatever CI/CD setup you’re using. Push your code, grab a coffee, and by the time you get back, you’ll know if there’s anything sketchy going on.<br> If you’re building stuff day-to-day, this catches problems before they hit mainnet. And if you’re a security auditor who’s spent one too many late nights staring at transferFrom implementations, we feel your pain. Our tool handles the repetitive checks — you know, those moments when you bolt upright at 3 AM thinking, “wait, what if someone sandwiches this transaction between two flash loans during a migration?”<br> That’s <a href="https://savant.chat/">Savant Chat</a> — built by developers who got tired of seeing smart contract vulnerabilities cause problems over and over again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f63f0e57b870" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fawkes-crypto — a new lightweight framework for building zkSNARKs]]></title>
            <link>https://medium.com/zeropool/fawkes-crypto-a-new-lightweight-framework-for-building-zksnarks-eca22ff1e14b?source=rss-ff00d5d0ee10------2</link>
            <guid isPermaLink="false">https://medium.com/p/eca22ff1e14b</guid>
            <category><![CDATA[zksnark]]></category>
            <category><![CDATA[rust]]></category>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[ethereum]]></category>
            <dc:creator><![CDATA[Igor Gulamov]]></dc:creator>
            <pubDate>Sun, 03 May 2020 15:57:30 GMT</pubDate>
            <atom:updated>2020-05-03T15:57:30.903Z</atom:updated>
            <content:encoded><![CDATA[<h3>Fawkes-crypto — a new lightweight framework for building zkSNARKs</h3><p>There are following problems faced with developers programming ZKP solutions:</p><ul><li>specific environment where the solution could be executed</li><li>low performance of computations</li><li>non-Turing completeness of ZKP primitives, so, languages for general programming usually are unfriendly for building ZKP solutions</li></ul><p>We decided to build a high-level framework in pure Rust for building ZKP. Rust is fast, it could be compiled for any environment, the performance is high. Also, the huge capabilities of abstractions and meta-programming allow us to build ZKP source code like a native.</p><p>The source code of the library is available at <a href="https://github.com/zeropoolnetwork/fawkes-crypto">https://github.com/zeropoolnetwork/fawkes-crypto</a>.</p><p>Here is a comparison of the same circuit in different DSLs for Merkle root computation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa06a4f82a884f7612c1bd2d1a5bcf3f/href">https://medium.com/media/fa06a4f82a884f7612c1bd2d1a5bcf3f/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/101d6bdada75c1832b09ab6c24bd0212/href">https://medium.com/media/101d6bdada75c1832b09ab6c24bd0212/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/79080660a534e1831cf83f197a531b52/href">https://medium.com/media/79080660a534e1831cf83f197a531b52/href</a></iframe><p>So, we are very close to DSLs, and pure Rust easily allows us to build our solution for any environment and bind it to any software.</p><p>Currently, we are using bellman Groth16 as the backend for Fawkes-Crypto, but in the future, it could be other proving systems (for example, PLONK).</p><h3>Types</h3><p>All arithmetic inside the snark is defined over a prime field F_r, where r is an order of curve point (bn254 for Ethereum).</p><p>So, each native type is a composite of F_r items. We defined the base numeric type as Num. It allows all main arithmetizations and interactions with ZKP-related types.</p><p>Each native type in Fawkes-crypto is corresponding to the ZKP-related type. For example, see at the table</p><pre>native | ZKP<br>-------+------     <br>Num    | CNum   <br>bool   | CBool</pre><p>You may build structures, tuples, and arrays over these types and complex native types will be related to corresponding ZKP types.</p><p>ZKP-related types have a constraint system under the hood, so, if we process any expression with ZKP-related types, the program will build a constraint system. For Groth16 only multiplicative operations create new constraints, additions are free.</p><p>So, you can implement something like this</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d8ed00976855026b03a54d04a2207ff4/href">https://medium.com/media/d8ed00976855026b03a54d04a2207ff4/href</a></iframe><p>This expression is working. Constraints (costly things if we are speaking about zkSNARKs) are created only if we multiply numbers or doing something more complex. But all additions, subtractions, and constant multiplications (like x*num!(2)) are free. Also, all signal transmissions (move the data into function and return the data) are free too.</p><p>Also, variables could be constants. If there is a constant inside CNum, multiplication gates for such variables are free.</p><h4>Example with structures</h4><p>Here are type definitions for Montgomery points and Edwards to Montgomery transformations:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9cf4e0083393ac1cf6fbaa28b4ee0c8c/href">https://medium.com/media/9cf4e0083393ac1cf6fbaa28b4ee0c8c/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/545c15634ba3225d70583aa3c1a8a471/href">https://medium.com/media/545c15634ba3225d70583aa3c1a8a471/href</a></iframe><p>#[derive(Signal)] auto implement <a href="https://github.com/zeropoolnetwork/fawkes-crypto/blob/521fc6b6650b5e2d1a83b25fac3483485f2a3bdc/src/core/signal.rs#L10">Signal trait</a> for the ZKP type, bind it to corresponding native type.</p><p>Signal trait allows working with structs and arrays as with basic types. So, we can simply alloc variable or constant, or check signal for constant, extract data from the signal, implement if_else for types, and do other useful things.</p><p>Serialization, allocation, and deallocation is a big problem of bellman and libsnark. Fawkes-crypto solves it and brings working solution out of the box.</p><h4>Arrays</h4><p>In Rust, there are still no const generics. That’s why we parametrize array length with typenum crate.</p><p>Here is an example, how it works.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/05165235cae52d0b3dc8c5e8c816138f/href">https://medium.com/media/05165235cae52d0b3dc8c5e8c816138f/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7551b04227be6d35f2396cc4e0166908/href">https://medium.com/media/7551b04227be6d35f2396cc4e0166908/href</a></iframe><h3>Serialization</h3><p>All native types are full Serde-compatible. So, you can use serde for serialization of parameters.</p><h3>Limitations</h3><p>There are no loops with an arbitrary number of iterations and imperative conditionals. But functional conditionals are working (see example at the beginning), and you can combine them with a constant loop to build something like an arbitrary loop.</p><h3>Applied solutions with Fawkes-Crypto</h3><p>Fawkes-crypto is developed for ZeroPool. Our circuit is too sophisticated, so, we decide to present some more simple example for this workshop.</p><p>Also, Merkle proofs, hashes, and nullifiers are useful for ZeroPool too. So, we will use come source code from this solution in the ZeroPool circuit.</p><p>One of the simplest real-life purposes of applied ZKP is a non-custodial mixer.</p><p>Source code of the mixer is here: <a href="https://github.com/snjax/simple-mixer">https://github.com/snjax/simple-mixer</a>.</p><p>It is very similar to the classic zk-SNARKs example with proof of hash preimage knowledge when we have a public image, secret preimage, and prove, that we know preimage, corresponding to equation image := H(preimage), without revealing any data.</p><p>For the mixer, we prove the same thing for following equations</p><pre>root := merkle_proof(hash(preimage), mekle_proof)<br>nullifier := hash(preimage, &quot;nullifier_salt&quot;)</pre><p>where only root and nullifier are public and other things are private and in fact, are one big &quot;meta-preimage&quot; like in the example above.</p><p>The state of the mixer is one big Merkle tree with hashes of secrets and zeros.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/661/1*iARvXOzWV3xJYS6JyfA1_A.png" /><figcaption>The state of mixer</figcaption></figure><p>When the user deposits a fixed amount into the contract, he pushes the hash into the tree. Only the user knows the secret preimage.</p><p>When the user withdraws, he proves, that he knows anyone secret inside the tree and publishes the nullifier for this secret.</p><p>The contract checks uniqueness of the nullifier. If it’s ok, the withdrawal proceeds, else the transaction will be reverted.</p><p>Now let’s build one more mixer using the Fawkes-Crypto framework.</p><h3>Hashes and nullifiers</h3><p>To compute Merkle trees we need hashes. <a href="https://github.com/zeropoolnetwork/fawkes-crypto/blob/521fc6b6650b5e2d1a83b25fac3483485f2a3bdc/src/circuit/poseidon.rs#L42">Here</a> is the implementation of Poseidon hash in Fawkes-crypto.</p><p>To use it, call</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1c657d34c87b142b5575dea2e0548226/href">https://medium.com/media/1c657d34c87b142b5575dea2e0548226/href</a></iframe><p><a href="https://github.com/snjax/simple-mixer/blob/9340450e84429c2af864f3507764240f4da3f845/src/circuit/mod.rs#L14">Here</a> is an example of hash and nullifier computation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0c309841b35e399e29ca4f895fc573bf/href">https://medium.com/media/0c309841b35e399e29ca4f895fc573bf/href</a></iframe><h3>Merkle proofs</h3><p>To compute root from the proof and leaf we need Merkle proof implemented.</p><p><a href="https://github.com/zeropoolnetwork/fawkes-crypto/blob/521fc6b6650b5e2d1a83b25fac3483485f2a3bdc/src/circuit/poseidon.rs#L77">Here</a> is one for Fawkes-crypto.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fdcd041cf02bffa39d6b2eca3515f6c0/href">https://medium.com/media/fdcd041cf02bffa39d6b2eca3515f6c0/href</a></iframe><p>As you can see, there is an optimization in Merkle node picker with only one switch gate per the layer.</p><h3>Withdrawal circuit</h3><p>The final circuit is the function with public parameters, private parameters, and constant parameters as arguments.</p><p><a href="https://github.com/snjax/simple-mixer/blob/9340450e84429c2af864f3507764240f4da3f845/src/circuit/mod.rs#L45">Here</a> is withdrawal circuit.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1290dbfd1c1989a8baa8e68ec469103/href">https://medium.com/media/b1290dbfd1c1989a8baa8e68ec469103/href</a></iframe><p>We check that all bits are really bits. Also, we check the nullifier and Merkle root. The memo is an arbitrary field, bound to the snark, and store information for the contract. For example, we can store here the receiver’s address to prevent the front-run attack.</p><h3>Cli bindings</h3><p><a href="https://github.com/snjax/simple-mixer/blob/9340450e84429c2af864f3507764240f4da3f845/src/main.rs#L59">Here</a> we bind all types and functions to cli interface with the following macro.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bfa49e5fba57c12eb17bd9bdc49e5d77/href">https://medium.com/media/bfa49e5fba57c12eb17bd9bdc49e5d77/href</a></iframe><p>This interface provides main cli JSON input-output and ethereum bindings.</p><pre>USAGE:<br>    mixer &lt;SUBCOMMAND&gt;</pre><pre>FLAGS:<br>    -h, --help       Prints help information<br>    -V, --version    Prints version information</pre><pre>SUBCOMMANDS:<br>    generate-test-data    Generate test object<br>    generate-verifier     Generate verifier smart contract<br>    help                  Prints this message or the help of the given subcommand(s)<br>    prove                 Generate a SNARK proof<br>    setup                 Generate trusted setup parameters<br>    verify                Verify a SNARK proof</pre><h3>Ethereum bindings</h3><p>Let’s run following commands</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/529d0c3db2577d1988ab046102fbe7c5/href">https://medium.com/media/529d0c3db2577d1988ab046102fbe7c5/href</a></iframe><p>So, now we can deploy generated verifier.sol to Rinkeby <a href="https://rinkeby.etherscan.io/address/0xd16f1d885d60b806be1b6e61d37245bbdfe0babc">here</a>, linearize JSON data from proof.json into a 1-dimensional array and put this data and public inputs from inputs.json into the contract <a href="https://rinkeby.etherscan.io/tx/0x92271145df3d8dc5fa6fa65d479c0d74a88049140b7928363bcffe9f328a0f6d">here</a>.</p><p>As the result we have VerifyResult(true), so, we proved mixer spend on Ethereum.</p><h3>Conclusion</h3><p>Fawkes-crypto allows easily to develop complex ZKP solutions in pure Rust, like mixers, private transaction engines (like ZeroPool), and rollups. Now we have the Groth16 proving system at the backend.</p><p>But more complex things like FRI, PLONK, or nested pairings (if we are working with pairing-friendly cycles) could be potentially implementable in Fawkes-Crypto too in future.</p><p>You are always welcome to try current ZeroPool <a href="https://app.zeropool.network/">mainnet</a>, <a href="https://testnet.app.zeropool.network/">testnet</a> and join our <a href="https://t.me/ZeroPoolCommunity">telegram group</a>.</p><p>It is working with JS yet. But rewriting it into Rust is in progress.</p><p>We are open for collaboration with blockchains, engineers, and researchers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eca22ff1e14b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/zeropool/fawkes-crypto-a-new-lightweight-framework-for-building-zksnarks-eca22ff1e14b">Fawkes-crypto — a new lightweight framework for building zkSNARKs</a> was originally published in <a href="https://medium.com/zeropool">ZeroPool</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>