<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ToTo Bugelman</title>
    <description>The latest articles on DEV Community by ToTo Bugelman (@toto_bugelman_aece7be7171).</description>
    <link>https://dev.to/toto_bugelman_aece7be7171</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3301314%2Fc9e2824a-9d85-4144-a017-07890e604658.png</url>
      <title>DEV Community: ToTo Bugelman</title>
      <link>https://dev.to/toto_bugelman_aece7be7171</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/toto_bugelman_aece7be7171"/>
    <language>en</language>
    <item>
      <title>Bug Bounty Dex223</title>
      <dc:creator>ToTo Bugelman</dc:creator>
      <pubDate>Sat, 30 Aug 2025 17:38:39 +0000</pubDate>
      <link>https://dev.to/toto_bugelman_aece7be7171/bug-bounty-dex223-590</link>
      <guid>https://dev.to/toto_bugelman_aece7be7171/bug-bounty-dex223-590</guid>
      <description>&lt;p&gt;A new player has appeared in the DeFi segment – &lt;a href="https://www.dex223.io/" rel="noopener noreferrer"&gt;Dex223&lt;/a&gt;. A DEX platform focused on the ERC-223 fungible token standard. The developers led by the anonymous security expert Dexaran are promoting &lt;a href="https://dexaran.github.io/erc223/" rel="noopener noreferrer"&gt;ERC-223&lt;/a&gt; as a safe replacement for &lt;a href="https://ethereum.org/en/developers/docs/standards/tokens/erc-20/#reception-issue" rel="noopener noreferrer"&gt;ERC-20&lt;/a&gt;. It was recently &lt;a href="https://gist.github.com/Dexaran/108b78e597fccb4ec9947dcd4df7ac95" rel="noopener noreferrer"&gt;announced&lt;/a&gt; that the DEX core is ready, with internal and &lt;a href="https://beosin.com/resources/understanding-erc-223-a-superset-of-erc-20-and-its-application" rel="noopener noreferrer"&gt;external audits&lt;/a&gt; conducted. Dex223 announces the final stage before the official launch – the Bug Bounty program.&lt;br&gt;
Dex223 invites researchers, blockchain engineers, and dApp developers to contribute to the security of the platform by receiving rewards for discovered vulnerabilities and errors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scope of Research
&lt;/h2&gt;

&lt;p&gt;Not all Dex223 modules are covered by the Bug Bounty program, only the core, ready to enter the market.&lt;/p&gt;

&lt;p&gt;What Bug Bounty participants can work on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Smart contracts: all Dex223 contracts in the Ethereum mainnet and test networks (&lt;a href="https://github.com/EthereumCommonwealth/Dex223-contracts/tree/253367297d9093db21661b297cdbb104d8579e35" rel="noopener noreferrer"&gt;Dex223-contracts&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Web application: &lt;a href="https://test-app.dex223.io" rel="noopener noreferrer"&gt;https://test-app.dex223.io&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Exchange interface: &lt;a href="https://test-app.dex223.io/en/swap" rel="noopener noreferrer"&gt;https://test-app.dex223.io/en/swap&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;API: public and authenticated endpoints (including fiat money in/out).&lt;/li&gt;
&lt;li&gt;Infrastructure: cloud services and deployment pipelines.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What is not included in the Bug Bounty scope:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MarginModule – margin trading module.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;PriceOracle – price oracles required for margin trading.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Known issues: &lt;br&gt;
Pool creation: Error when one token is ERC-20 Origin and the other is ERC-223 Origin with no existing ERC-20 wrapper.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Auto-conversion: No auto-conversion of ERC-20 wrapper tokens to ERC-223 Origin in pools that have only ERC-20-side liquidity for an ERC-20/223 pair.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Third-party services not owned by Dex223.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;DDoS attacks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Physical security assessment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Social engineering.&lt;br&gt;
A report can be submitted to the GitHub repository “&lt;a href="https://github.com/rroland10/dex223-bug-bounty/issues" rel="noopener noreferrer"&gt;dex223-bug-bounty&lt;/a&gt;”:&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Click New Issue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose a template: Bug Report, Feature Request, or Question.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fill in what you found, where it is, and how to reproduce it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Submit. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Error Levels and Rewards
&lt;/h2&gt;

&lt;p&gt;Dex223 has differentiated 4 levels of problem severity and corresponding rewards:&lt;br&gt;
Critical – 30M D223. A vulnerability that can completely disrupt the workflow of contracts.&lt;br&gt;
High – 7M D223. A serious problem with serious consequences, but not affecting the entire platform.&lt;br&gt;
Medium – 3M D223. May lead to loss of funds under certain conditions.&lt;br&gt;
Information – 1M D223. Best practices, documentation improvements, low-impact issues.&lt;br&gt;
Rewards are paid primarily in the platform’s native token D223. But there are exceptions for the possibility of payment in another cryptocurrency or bank transfer. It is also worth noting that Dex223 is considering the possibility of long-term partnership within special programs. The detailed structure of rewards, payment periods, and conditions can be read on GitHub &lt;a href="https://github.com/rroland10/dex223-bug-bounty/blob/main/REWARDS.md" rel="noopener noreferrer"&gt;Bug Bounty&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Good Opportunity
&lt;/h2&gt;

&lt;p&gt;Not every day does a new player appear in the DeFi sector with innovations different from the existing market.&lt;br&gt;
Dex223 has two unique features: support for both ERC-223 and ERC-20 token standards; hybrid liquidity pools capable of operating without splitting into separate pools, which in itself positively affects the platform’s liquidity and slippage in trading operations. Dex223 also implements one of the safest types of margin trading – encapsulated. It is all the more interesting for researchers and dApp engineers to participate in Bug Bounty Dex223. In addition to financial benefits, there is an opportunity to work on ERC-223 and dApps based on it, thereby increasing one’s qualifications and gaining recognition in the community, and with the significant spread of ERC-223, possibly being among the first on the crest of the wave.&lt;/p&gt;

&lt;p&gt;Useful links:&lt;br&gt;
Problem report submission page “&lt;a href="https://github.com/rroland10/dex223-bug-bounty/issues" rel="noopener noreferrer"&gt;dex223-bug-bounty/issues&lt;/a&gt;”. &lt;br&gt;
Contact with developers: &lt;a href="http://t.me/dex223_defi" rel="noopener noreferrer"&gt;Telegram&lt;/a&gt; or &lt;a href="https://discord.com/channels/314812276878082048/1206737530175885353" rel="noopener noreferrer"&gt;Discord&lt;/a&gt;. &lt;br&gt;
&lt;a href="https://blog.dex223.io/en/40b40033-2a37-450d-96c0-ca90d30f6866?slug=bug-bounty-2025" rel="noopener noreferrer"&gt;Official blog&lt;/a&gt; of Dex223.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>web3</category>
      <category>security</category>
    </item>
    <item>
      <title>Solidity. Hooks in smart contracts.</title>
      <dc:creator>ToTo Bugelman</dc:creator>
      <pubDate>Thu, 31 Jul 2025 13:02:10 +0000</pubDate>
      <link>https://dev.to/toto_bugelman_aece7be7171/solidity-hooks-in-smart-contracts-1j6j</link>
      <guid>https://dev.to/toto_bugelman_aece7be7171/solidity-hooks-in-smart-contracts-1j6j</guid>
      <description></description>
      <category>solidity</category>
      <category>smartcontract</category>
      <category>web3</category>
    </item>
    <item>
      <title>Solidity. Hooks in smart contracts.</title>
      <dc:creator>ToTo Bugelman</dc:creator>
      <pubDate>Sat, 28 Jun 2025 15:58:14 +0000</pubDate>
      <link>https://dev.to/toto_bugelman_aece7be7171/solidity-hooks-in-smart-contracts-2c9e</link>
      <guid>https://dev.to/toto_bugelman_aece7be7171/solidity-hooks-in-smart-contracts-2c9e</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqyiap0snflfhqj1fqxdg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqyiap0snflfhqj1fqxdg.jpg" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Users rarely give much thought to the smart contract logic of &lt;a href="https://www.coinbase.com/ru/learn/crypto-glossary/what-is-the-ethereum-virtual-machine" rel="noopener noreferrer"&gt;EVM&lt;/a&gt; blockchains. Especially for newcomers to cryptocurrency, it may seem that such a variety of systems and applications on them have always been there, but this is not the case. Let's break down what &lt;a href="https://startup-house.com/glossary/hook" rel="noopener noreferrer"&gt;Hooks&lt;/a&gt; are, their development in smart contracts and security aspects.&lt;/p&gt;

&lt;p&gt;The most common programming language for EVMs is the Solidity language. However, Solidity is considered to be a rather complex language due to static typing and little flexibility compared to other languages, such as Rust.&lt;/p&gt;

&lt;p&gt;In fact, the reason is that Solidity was essentially designed for transactions and simple programs - smart contracts in the financial industry.&lt;/p&gt;

&lt;p&gt;Of course, today we have NFTs used in the arts or to represent property rights. Most blockchains now also allow for storing manufacturing and supply chain data thanks to increased block size. But this progression isn’t just about technology — it reflects a deeply human trait: the drive to evolve our inventions beyond their original purpose.&lt;/p&gt;

&lt;p&gt;Just as the wheel once powered carts, then mills as a waterwheel, and eventually steamships as a propeller, blockchain technology is undergoing a similar transformation — expanding its utility in unexpected ways.&lt;/p&gt;

&lt;p&gt;It should be remembered that EVM-system is a distributed and fault-tolerant computer, but its resources are very limited compared to server monsters and that remains a significant constraint on what can be built.&lt;/p&gt;

&lt;h2&gt;
  
  
  By placing hooks
&lt;/h2&gt;

&lt;p&gt;A hook is an event handler or interceptor, when an event occurs, the desired action is performed.&lt;/p&gt;

&lt;p&gt;Hooks were not born in Solidity, they came to it from other programming languages. For example, it is no exaggeration to say that &lt;a href="https://en.wikipedia.org/wiki/JavaScript" rel="noopener noreferrer"&gt;JavaScript&lt;/a&gt; (JS) consists of Hooks for any event occurring with an object.&lt;/p&gt;

&lt;p&gt;To illustrate, let's look at the code of the NFT listing function on the marketplace in &lt;a href="https://en.wikipedia.org/wiki/TypeScript" rel="noopener noreferrer"&gt;TypeScript&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useRouter } from "next/router";
…
const Create = () =&amp;gt; {
  // Next JS Router hook to redirect to other pages
  const router = useRouter();
 …
async function handleCreateListing(e) {
…
// If the transaction succeeds, take the user back to the homepage to view their listing!
      if (transactionResult) {
        router.push(`/`);
      }
} catch (error) {
      console.error(error);
    }
…
}
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The hook used here is &lt;code&gt;useRouter&lt;/code&gt;, a component of the &lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;Next.js&lt;/a&gt; framework, which is an extension of React. After a successful transaction -- creating an “item”, the listing contract will navigate to the root page of the site. Otherwise, an error will be returned.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hooks in Solidity and Security Aspects
&lt;/h2&gt;

&lt;p&gt;The first Ethereum block was mined in July 2015, the first DEX appeared only 3 years later, and trading bots even later, so the main application of smart contracts at this time is &lt;a href="https://en.wikipedia.org/wiki/Initial_coin_offering" rel="noopener noreferrer"&gt;ICO&lt;/a&gt;. The contract's task is to accept ETH and send ERC-20 standard tokens to the investor.&lt;/p&gt;

&lt;p&gt;Solidity out of the box contains a &lt;code&gt;receive()&lt;/code&gt; callback function for native coins; it can be used to handle the event of the recipient contract matching the native coin. However, unlike native coins, ERC-20 tokens &lt;a href="https://medium.com/dex223/known-problems-of-erc20-token-standard-e98887b9532c" rel="noopener noreferrer"&gt;do not know how to process a transfer to ineligible contracts&lt;/a&gt;, Hooks were simply absent in their logic. The consequence was &lt;a href="https://dev.tourl"&gt;multi-million dollar losses&lt;/a&gt; that still &lt;a href="https://blockzhub.io/news/673261f5b7696e7d36efc96c" rel="noopener noreferrer"&gt;occur to this day&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Noticing this significant vulnerability an anonymous developer Dexaran developed a smart token contract using a Hook similar to the basic &lt;code&gt;receive()&lt;/code&gt; function, formalizing it as an &lt;a href="https://dexaran.github.io/erc223/" rel="noopener noreferrer"&gt;ERC-223 standard&lt;/a&gt; in 2017. In ERC-223, the Hook &lt;code&gt;tokenReceived()&lt;/code&gt; is called when sending tokens: if the target smart contract has this Hook in its code, it will receive the tokens and update its state (credit them to its balance), if not, the token transfer will be canceled.&lt;/p&gt;

&lt;p&gt;A similar concept of using Hooks will be further adopted by standards trying to improve and expand the functionality of ERC-20: ERC-677; ERC-721; ERC-777; ERC-1337 and &lt;a href="https://medium.com/dex223/erc-223-and-others-b93e98ee74f8" rel="noopener noreferrer"&gt;others&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;However, the use of callbacks introduces a security vulnerability that allows for a &lt;a href="https://www.cyfrin.io/blog/what-is-a-reentrancy-attack-solidity-smart-contracts" rel="noopener noreferrer"&gt;re-entry attack&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Re-entry attack is one of the most common attacks, such as &lt;a href="https://blog.chain.link/reentrancy-attacks-and-the-dao-hack/" rel="noopener noreferrer"&gt;The DAO hack&lt;/a&gt; that split the Ethereum community. Even in 2025, hacks involving reentry attacks are occurring, which is rather indicative of developer competence. &lt;a href="https://medium.com/@mayankchhipa007/openzeppelin-reentrancy-guard-a-quickstart-guide-7f5e41ee388f" rel="noopener noreferrer"&gt;ReentrancyGuard&lt;/a&gt; or &lt;a href="https://dev.to/syedghufranhassan/solidity-patterns-cei-53bi"&gt;CEI-Pattern&lt;/a&gt; integration is sufficient for prevention.&lt;/p&gt;

&lt;p&gt;Separately, the ERC-777 standard is worth mentioning. ERC-777 promoted the use of ERC-1820, a registry of external Hooks smart contracts and their corresponding target contracts. In theory, ERC-1820 allowed for the extended functionality of contracts that did not have Hooks inside them. The complex chain of three contracts not only increased the cost of gas to execute transactions, but required high competence from the developer, and the user was required to trust the provider of external Hooks. The likelihood of &lt;a href="https://mixbytes.io/blog/one-more-problem-with-erc777" rel="noopener noreferrer"&gt;manipulation&lt;/a&gt; of the Hooks registry was high. It is only logical that after several &lt;a href="https://milkroad.com/news/imbtc-uniswap-hack/" rel="noopener noreferrer"&gt;hacks&lt;/a&gt;, ERC-777 gained notoriety.&lt;/p&gt;

&lt;p&gt;It is ironic that all subsequent token standards after ERC-223 did not gain popularity due to complexity and vulnerabilities. On the contrary, ERC-223 was successfully tested in the Callisto network and the base element of some Defi projects.&lt;/p&gt;

&lt;p&gt;At the moment, blockchain is successfully used as a backend for the logic of financial and even entertainment applications. Blockchain benefits from high fault tolerance and 24/7 operation. Naturally, this has led to the complication of the logic of smart contracts and developers are increasingly resorting to the use of event handlers.&lt;/p&gt;

&lt;p&gt;Uniswap in the Uniswap v4 protocol, introduced a system of external smart contracts Hooks for working with liquidity pools. An external Hook can be connected: to automate trading by bots independent of external oracles, or to use Uniswap liquidity in third-party Defi projects.&lt;/p&gt;

&lt;p&gt;The PureFi protocol has even developed a tool for KYC/AML compliance verification - VerifierHook using Uniswap v4.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fafbqq62qjp4zfh29m8hb.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fafbqq62qjp4zfh29m8hb.webp" alt="Image description" width="800" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PureFi Uniswap v4 Hook: &lt;a href="https://medium.com/purefi" rel="noopener noreferrer"&gt;PureFi&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Other Uniswap hooks can be viewed on the HookRank dashboard.&lt;/p&gt;

&lt;p&gt;The concept of Uniswap v4 Hooks is reminiscent of the failed ERC-777, which means that great care must be taken when developing and using the toolkit. &lt;br&gt;
Uniswap is a trendsetter in DEX construction, it's likely the Uniswap v4 Hooks will be adopted by other developers as a model, just like everything Uniswap has done before. This means that hackers will actively exploit the associated vulnerabilities of this solution. However, there is nothing new in the cat and mouse game between developers and hackers.   &lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In this article the evolution of smart-contracts logic in Solidity language is analyzed by examples, from the developers' desire to solve the security problem (ERC-223) to the most complex logic of trading platform automation (Uniswap v4). But most importantly, one should not forget that in the world of decentralized finance everyone is responsible for their own assets, they themselves are happy with the profit and saddened by the loss. Therefore, it is worth analyzing the software product you intend to use and weighing the risks with a cool head.&lt;/p&gt;

</description>
      <category>solidity</category>
      <category>erc223</category>
      <category>ethereum</category>
      <category>blockchain</category>
    </item>
  </channel>
</rss>
