<?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 Bartu bozkurt on Medium]]></title>
        <description><![CDATA[Stories by Bartu bozkurt on Medium]]></description>
        <link>https://medium.com/@bartubozkurt35?source=rss-62887bb79de3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*XSvir_Oj8NfxTCXxoHBsrQ.jpeg</url>
            <title>Stories by Bartu bozkurt on Medium</title>
            <link>https://medium.com/@bartubozkurt35?source=rss-62887bb79de3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 09:45:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bartubozkurt35/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[Synthetic Data]]></title>
            <link>https://bartubozkurt35.medium.com/synthetic-data-61280530d202?source=rss-62887bb79de3------2</link>
            <guid isPermaLink="false">https://medium.com/p/61280530d202</guid>
            <category><![CDATA[synthetic-data]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Bartu bozkurt]]></dc:creator>
            <pubDate>Sat, 23 Nov 2024 22:59:35 GMT</pubDate>
            <atom:updated>2024-11-23T22:59:35.606Z</atom:updated>
            <content:encoded><![CDATA[<p>Companies use AI to eliminate human errors, but biased data can cause the AI to make the same mistakes repeatedly.</p><p>Synthetic data for AI and ML offers greater flexibility compared to real data. Synthetic data serves as an ideal resource for advancing AI and ML projects. Generated by AI algorithms, it can be customized to create expanded, reduced, more balanced, or enriched versions of the original dataset. This flexibility allows the data to be tailored for specific needs, such as addressing imbalances by upsampling minority groups or mitigating human biases in the original data by incorporating fairness constraints. In essence, synthetic data acts as a versatile tool for data scientists to refine and optimize datasets for better ML performance.</p><h3>What are the challenges of original data?</h3><ul><li>Costs: Gathering, storing, cleaning, formatting, and labeling data is time-consuming and resource-intensive. These costs increase for projects requiring frequent training.</li><li>Scale: Sufficient data volumes or data that accurately reflect real world scenarios are often unavailable or impractical to collect.</li><li>Compliance: Managing sensitive data, such as financial or personal identification information, requires careful handling to ensure compliance with privacy laws and prevent potential security breaches.</li><li>Bias: Achieving a comprehensive, unbiased dataset that aligns with privacy regulations can be difficult with original data sources.</li></ul><h3>What are the use cases of synthetic data?</h3><p>Here are some outlined use cases:</p><p>Synthetic data for AI / ML</p><ul><li>Synthetic data helps overcome challenges posed by limited or low-quality datasets, improving the accuracy of ML results.</li></ul><p>Data Bias Reduction</p><ul><li>Synthetic data can help mitigate bias in AI training models. Publicly available data often carries inherent biases, but synthetic data can be used to balance these out. For example, if training data contains biased opinions or content, synthetic data can be generated to provide a more neutral or balanced perspective, ensuring fairer AI models.</li></ul><p>Training AI for Detecting Fraudulent Transactions</p><ul><li>Blockchain platforms and regulators track transactions to spot signs of illegal activities like fraud and money laundering. To enhance the detection of suspicious transactions and anomalies, synthetic data is utilized to train AI systems, boosting the ability to prevent fraudulent activities and ensure compliance within the blockchain network.</li></ul><p>Fraud Pattern Detection for Banks</p><ul><li>Synthetic data replicates real world fraud patterns, enabling banks to improve their fraud detection systems and reduce false positives. By simulating a range of risk scenarios, synthetic data helps banks refine their risk management strategies, enhancing the accuracy of fraud detection and ensuring better performance in preventing financial crimes.</li></ul><p>Synthetic Data in Financial Markets(Trading, Portfolio Optimization, and Risk Management)</p><ul><li>Synthetic data allows institutions to create large volumes of data on various investment scenarios, enabling them to assess the performance of different portfolios. This process helps identify the most profitable and efficient portfolios, ultimately improving returns for clients.</li></ul><h3>How is synthetic data created?</h3><p>Generative Adversarial Networks (GANs)</p><ul><li>GANs use a two-part neural network system, where one network generates synthetic data and the other evaluates its quality. This method is commonly used to create synthetic time series, images, and text.</li></ul><p>Variational Auto Encoders</p><ul><li>VAEs extend GANs by adding an encoder to the system, generating synthetic data that is highly realistic and structurally similar to real data.</li></ul><p>Gaussian Copula</p><ul><li>This method uses statistical techniques to generate synthetic data with specific properties, such as normal distribution. It is typically used for data with discrete distributions, like event probabilities.</li></ul><p>Transformer-based Models</p><ul><li>Models like OpenAI’s GPT use large datasets to learn complex patterns and generate synthetic data that mirrors the original. These models are widely used in natural language processing and have expanded into areas such as computer vision, speech recognition, image synthesis, music generation, and video sequence generation.</li></ul><p>Agent-Based Models</p><ul><li>Simulate the actions and interactions of individual agents within a system to generate synthetic data. These models are especially valuable in situations where the behavior of each entity influences the overall patterns seen in the data.</li></ul><h3>Challenges with synthetic data</h3><p>Synthetic data offers a promising solution to the challenges of real data, providing benefits such as enhanced privacy and improved AI training. While it can supplement datasets and boost model performance, it still faces significant hurdles, including high costs, accuracy verification challenges, potential misuse. Despite its potential, adoption remains cautious, particularly in industries like defense, healthcare, finance, insurance, and government, which require rigorous standards for data accuracy and security. As the technology matures, its broader acceptance and application are expected to increase.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=61280530d202" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Raydium Protocol Exploit Analysis | $5.5 million Hacked]]></title>
            <link>https://bartubozkurt35.medium.com/raydium-protocol-exploit-analysis-5-5-million-hacked-5e8b916ff1fa?source=rss-62887bb79de3------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e8b916ff1fa</guid>
            <category><![CDATA[smart-contract-security]]></category>
            <category><![CDATA[audit]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Bartu bozkurt]]></dc:creator>
            <pubDate>Tue, 28 Mar 2023 22:18:48 GMT</pubDate>
            <atom:updated>2023-03-28T22:18:48.020Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/295/1*o79f_L7-O99l4eV-6bDt6Q.png" /></figure><p>On 16 December, 2022 Raydium Protocol experienced a private key compromise due to a trojan virus. The attacker’s address on Solana drained multiple liquidity pools on Raydium. In total, approximately $5.5 million worth of customer assets were stolen.</p><p>According to Raydium’s <a href="https://twitter.com/RaydiumProtocol/status/1603860543302950918?s=20&amp;t=SDxedMREtruiCvC5zgVfgQ">statement</a>, a trojan, which is a type of malware , allowed an attacker to compromise the owner’s private key. Access to this private key enabled the attacker to withdraw a mix of assets from the pools. The compromised wallet was able to invoke the withdrawpnl() instruction and drain the Raydium liquidity pools. The attacker then bridged approximately $2 million to Ethereum, including $1.6 million in SOL, and sent it to Tornado Cash.</p><p>Minutes after the attack, Raydium’s native token RAY fell just over 8% to $0.16. The total value locked on the protocol also plummeted over 27% in the same period, to $34.73 million. In response to the exploit the developers upgraded the app’s smart contracts to remove admin control over the parameters that were exploited. Raydium also published a list of affected <a href="https://twitter.com/RaydiumProtocol/status/1603860554552152064">wallets</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e8b916ff1fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[$120 Million Exploit: AllianceBlock Token Price Manipulated in Oracle Hack]]></title>
            <link>https://bartubozkurt35.medium.com/120-million-exploit-allianceblock-token-price-manipulated-in-oracle-hack-18e5ebe15a64?source=rss-62887bb79de3------2</link>
            <guid isPermaLink="false">https://medium.com/p/18e5ebe15a64</guid>
            <category><![CDATA[smart-contract-security]]></category>
            <category><![CDATA[audit]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[smartcontractdevelopment]]></category>
            <category><![CDATA[smartcontract-audit]]></category>
            <dc:creator><![CDATA[Bartu bozkurt]]></dc:creator>
            <pubDate>Tue, 28 Mar 2023 22:02:43 GMT</pubDate>
            <atom:updated>2023-03-28T22:31:13.234Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*5-N1KfQQujbsAGIpDhP1hg.png" /></figure><p>BonqDAO’s oracle was manipulated and used to increase the price of AllianceBlock tokens. The exploiter managed to do so by changing the updatePrice function of the oracle in one of BonqDAO’s smart contracts.</p><p>The project lost around $120 million due to the hack, which included 98.65 million BEUR tokens, worth around $108 million, and 113.8 million wrapped-ALBT (wALBT) tokens, worth around $11 million.</p><p>The BonqDAO is exploited and its price oracle is manipulated to increase the WALBT price. Here is the example hack tx:</p><p><a href="https://polygonscan.com/tx/0x31957ecc43774d19f54d9968e95c69c882468b46860f921668f2c55fadd51b19">Polygon Transaction Hash (Txhash) Details | PolygonScan</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*ex3iWpUavrd3qMWQ-ScBKA.jpeg" /></figure><p>Using the above tx as an example, with the manipulated WALBT price, the malicious actor is able to <strong>mint</strong> &gt;100M BEUR.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*9pmVbxhzERxZLacF4Eec6Q.jpeg" /></figure><p>the actor further manipulates the WALBT price and liquidates a bunch of (33) troves:</p><p><a href="https://polygonscan.com/tx/0xa02d0c3d16d6ee0e0b6a42c3cc91997c2b40c87d777136dedebe8ee0f47f32b1">Polygon Transaction Hash (Txhash) Details | PolygonScan</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*BCVpljolTIqn88TKDQRxJA.jpeg" /></figure><p>The actor then walks away by withdrawing the illicit gains with 113.8M WALBT and 98M BEUR (valued &gt;$10M). Some of these tokens are then dumped, resulting in major drop! WALBT dropped by &gt;50% and BEUR dropped by 34%</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jxi-ovIyjJJrlO64sc5EyA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*ehc-boewthQn1GLsRjWZ0w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*GHHIXRHK8BYnzKSSVa9SdQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18e5ebe15a64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Smart Contract Vulnerabilities 3]]></title>
            <link>https://coinsbench.com/smart-contract-vulnerabilities-3-401a05e94078?source=rss-62887bb79de3------2</link>
            <guid isPermaLink="false">https://medium.com/p/401a05e94078</guid>
            <category><![CDATA[smartcontract-audit]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[audit]]></category>
            <category><![CDATA[smart-contract-security]]></category>
            <dc:creator><![CDATA[Bartu bozkurt]]></dc:creator>
            <pubDate>Mon, 06 Feb 2023 15:19:29 GMT</pubDate>
            <atom:updated>2023-02-10T11:19:25.069Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*9LDHWWAMPo5lb2k6VqFlwg.jpeg" /></figure><h4>1) Uninitialized storage pointers</h4><p>As of compiler version, 0.5.0 and higher this issue has been systematically resolved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cml3mY5E9omWs4kxBTuJ3Q.png" /></figure><h4>2) Long number literals</h4><p>Number literals with many digits should be carefully checked as they are prone to error.</p><p>Use:</p><ul><li><a href="https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#ether-units">Ether suffix</a>,</li><li><a href="https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#time-units">Time suffix</a>, or</li><li><a href="https://solidity.readthedocs.io/en/latest/types.html#rational-and-integer-literals">The scientific notation</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cm6ohAZbxJqArx4TaMZowQ.png" /></figure><h4>3) Out-of-range enum</h4><p><em>Solc &lt; 0.4.5 </em>produced unexpected behavior with out-of-range enums<em>. </em>Check enum conversion or use a newer compiler</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-GSOFH0JlobYQlrF3YW1bA.png" /></figure><h4>4) Uncalled public functions</h4><p>public functions that are never called by the contract should be declared external, and its immutable parameters should be located in calldata to save gas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*MHw0qC0e-FBFpdDY34yFiA.png" /></figure><h4>5) Dead/Unreachable code</h4><p>Dead code may be indicative of programmer error, missing logic, or potential optimization opportunity, which needs to be flagged for removal or addressed appropriately.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fSOxJCBAdvJJM_Fkap4bUA.png" /></figure><h4>6) Unused return values</h4><p>Unused return values of function calls are indicative of programmer errors that may have unexpected behavior.</p><p>Does not store the result in a. As a result, the computation has no effect.</p><p>Ensure that all the return values of the function calls are used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9pf2bbgF9r73xgNNFAzZCg.png" /></figure><h4>7) Unused variables</h4><p>Unused state/local variables may be indicative of programmer error, missing logic or potential optimization opportunity, which needs to be flagged for removal or addressed appropriately</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kTaw63ItE9Wk1_9Qamhd3g.png" /></figure><h4>8) Redundant statements</h4><p>Statements with no effects that do not produce code may be indicative of programmer error or missing logic, which needs to be flagged for removal or addressed appropriately.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wyIE_cEuvnzLWDIV0G0XmQ.png" /></figure><h4>9) Storage array with signed Integers with ABIEncoderV2</h4><p>Assigning an array of signed integers to a storage array of different type can lead to data corruption in that array. This is due to a compiler bug introduced in <em>v0.4.7</em> and fixed in <em>v0.5.10</em></p><p>Use the latest version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3K5r9qponF2dIpLOJ4c3_g.png" /></figure><p><a href="https://blog.soliditylang.org/2019/06/25/solidity-storage-array-bugs/">Solidity Storage Array Bugs</a></p><h4>10) Dynamic constructor arguments clipped with ABIEncoderV2</h4><p>A contract’s constructor which takes structs or arrays that contain dynamically sized arrays reverts or decodes to invalid data when ABIEncoderV2 is used. This is due to a compiler bug introduced in <em>v0.4.16</em> and fixed in <em>v0.5.9</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*vRy6mqt_2Q0yTBcIbsZkuA.png" /></figure><h4>11) Storage array with multiSlot element with ABIEncoderV2</h4><p>Storage arrays containing structs or other statically sized arrays are not read properly when directly encoded in external function calls or in <em>abi.encode()</em>. This is due to a compiler bug introduced in <em>v0.4.16</em> and fixed in <em>v0.5.10</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PrrDY3TH8rKg8P66A3yTtg.png" /></figure><p><a href="https://docs.soliditylang.org/en/v0.8.9/bugs.html">List of Known Bugs - Solidity 0.8.9 documentation</a></p><h4>12) Unprotected initializers in proxy-based upgradeable contracts</h4><p>Proxy-based upgradeable contracts need to use <em>public</em> initializer functions instead of constructors that need to be explicitly called only once.</p><p>Preventing multiple invocations of such initializer functions (e.g. via <em>initializer</em> modifier from OpenZeppelin’s <em>Initializable</em> library) is a must.</p><p><strong>initialize should have the </strong><strong>initializer modifier to prevent someone from initializing the contract multiple times.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KRsx3_50Tk9SG0FESqWk-A.png" /></figure><p><a href="https://docs.openzeppelin.com/contracts/4.x/api/proxy#utils">Proxies - OpenZeppelin Docs</a></p><h4>13) Initializing state-variables in proxy-based upgradeable contracts</h4><p>This should be done in initializer functions and not as part of the state variable declarations in which case they won’t be set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MGAFuQg-yCJu1LaQKgvZDQ.png" /></figure><p><a href="https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#avoid-initial-values-in-field-declarations">Writing Upgradeable Contracts - OpenZeppelin Docs</a></p><h4>14) Import upgradeable contracts in proxy-based upgradeable contracts</h4><p>Contracts imported from proxy-based upgradeable contracts should also be upgradeable where such contracts have been modified to use initializers instead of constructors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jpKhc9xm_TAm3VxmPGwvjw.png" /></figure><p><a href="https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#use-upgradeable-libraries">Writing Upgradeable Contracts - OpenZeppelin Docs</a></p><h4>15) Avoid <em>selfdestruct</em> or <em>delegatecall</em> in proxy-based upgradeable contracts</h4><p>This will cause the logic contract to be destroyed and all contract instances will end up delegating calls to an address without any code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ES3tzdRab9sY62kbRxT-CQ.png" /></figure><p><a href="https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#potentially-unsafe-operations">https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#potentially-unsafe-operations</a></p><p><a href="https://dev.to/nvn/proxy-patterns-for-upgradeability-of-solidity-contracts-transparent-vs-uups-proxies-3ig2">https://dev.to/nvn/proxy-patterns-for-upgradeability-of-solidity-contracts-transparent-vs-uups-proxies-3ig2</a></p><p><a href="https://solidity-by-example.org/hacks/self-destruct/">https://solidity-by-example.org/hacks/self-destruct/</a></p><h4>16) State variables in proxy-based upgradeable contracts</h4><p>The declaration order/layout and type/mutability of state variables in such contracts should be preserved exactly while upgrading to prevent critical storage layout mismatch errors</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*t8EHzPIL5Ve1Jwxn4hFmKQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5spDerSbklTsabFciKHBdA.png" /></figure><ul><li><a href="https://medium.com/coinmonks/ethernaut-lvl-16-preservation-walkthrough-how-to-inject-malicious-contracts-with-delegatecall-81e071f98a12">Ethernaut Lvl 16 Preservation Walkthrough: How to inject malicious contracts with delegatecall</a></li><li><a href="https://docs.openzeppelin.com/upgrades-plugins/1.x/writing-upgradeable#modifying-your-contracts">Writing Upgradeable Contracts - OpenZeppelin Docs</a></li></ul><h4>17) Function ID collision between proxy/implementation in proxy-based upgradeable contracts</h4><p>Malicious proxy contracts may exploit function ID collision to invoke unintended proxy functions instead of delegating to implementation functions. Check for function ID collisions.</p><p>Proxy.tgeo() and Contract.gsf() have the same function id (0x67e43e43). As a result, Proxy.tgeo() will shadow Contract.gsf()`.</p><p>Rename the function. Avoid public functions in the proxy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1jcBqwLmCSiKmXiqIlQKRQ.png" /></figure><p><a href="https://forum.openzeppelin.com/t/beware-of-the-proxy-learn-how-to-exploit-function-clashing/1070">Beware of the proxy: learn how to exploit function clashing</a></p><h4>18) Function shadowing between proxy/contract in proxy-based upgradeable contracts</h4><p>Shadow functions in proxy contract prevent functions in logic contract from being invoked.</p><p>Proxy.get will shadow any call to get(). As a result get() is never executed in the logic contract and cannot be updated.</p><p>BadProxy.get will shadow any call to get(). As a result get() is never executed in the logic contract and cannot be updated.</p><p>Rename the function. Avoid public functions in the proxy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*9LuLwCO6e7OG5X1pXKapmQ.png" /></figure><p><a href="https://www.linkedin.com/in/bartu-bozkurt/">https://www.linkedin.com/in/bartu-bozkurt/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=401a05e94078" width="1" height="1" alt=""><hr><p><a href="https://coinsbench.com/smart-contract-vulnerabilities-3-401a05e94078">Smart Contract Vulnerabilities 3</a> was originally published in <a href="https://coinsbench.com/">CoinsBench</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Smart Contract Vulnerabilities 2]]></title>
            <link>https://bartubozkurt35.medium.com/smart-contract-vulnerabilities-2-de08d0ac73c2?source=rss-62887bb79de3------2</link>
            <guid isPermaLink="false">https://medium.com/p/de08d0ac73c2</guid>
            <category><![CDATA[evm]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[smart-contract-security]]></category>
            <category><![CDATA[audit]]></category>
            <dc:creator><![CDATA[Bartu bozkurt]]></dc:creator>
            <pubDate>Sat, 04 Feb 2023 22:31:18 GMT</pubDate>
            <atom:updated>2023-02-04T22:31:29.864Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*Tg5vs_NM7ZZ1IcU9AuRDYA.png" /></figure><h4>1) Deleting a mapping within a struct</h4><p>Deleting a <em>struct</em> that contains a <em>mapping</em> will not delete the <em>mapping</em> contents which may lead to unintended consequences.</p><p>Use a lock mechanism instead of a deletion to disable a structure containing a mapping.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/579/1*AY_kTXJuZFdP48NbaDrRhg.png" /></figure><h4>2) Tautology or contradiction</h4><p>Tautologies (always true) or contradictions (always false) indicate potential flawed logic or redundant checks. e.g. <em>x &gt;= 0</em> which is always true if <em>x</em> is <em>uint</em>.</p><p>Fix the incorrect comparison by changing the value type or the comparison.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/1*7Hy-sY8npXIpmLz-DTiLQQ.png" /></figure><p>x is a uint256, so x &gt;= 0 will be always true. y is a uint8, so y &lt;512 will be always true.</p><h4>3) Boolean constant</h4><p>The use of Boolean constants (<em>true</em>/<em>false</em>) in code (e.g. conditionals) is indicative of flawed logic</p><p><strong>Verify and simplify the condition.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/496/1*atT6AXjoK323Bc-gKS69RQ.png" /></figure><h4>4) Boolean equality</h4><p>Boolean variables can be checked within conditionals directly without the use of equality operators to <em>true</em>/<em>false</em></p><p><strong>Remove the equality to the boolean constant.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*11qS5hvix4UudewdSmY1Cw.png" /></figure><h4>5) State-modifying functions</h4><p>Functions that modify state (in assembly or otherwise) but are labelled constant/pure/view revert in solc &gt;=0.5.0 (work in prior versions) because of the use of STATICCALL opcode.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/489/1*lH60yl_55bXWX_7FAjXFUQ.png" /></figure><h4>6) Return values of low-level calls</h4><p>Ensure that return values of low-level calls (<em>call</em>/<em>callcode</em>/<em>delegatecall</em>/<em>send</em>/etc.) are checked to avoid unexpected failures.</p><p><strong>e.g) user can deposit funds even if the call function will be failed</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*8Kt4PlcSyznNFJpE48srww.png" /></figure><h4>7) Account existence check for low-level calls</h4><p>Low-level calls call/delegatecall/staticcall return true even if the account called is non-existent (per EVM design). Account existence must be checked prior to calling if needed.</p><p><strong>Avoid low-level calls. Check the call success. If the call is meant for a contract, check for code existence.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*z3zj47Fwntg3vqp69Lr9zg.png" /></figure><h4>8) Dangerous shadowing</h4><p>Local variables, state variables, functions, modifiers, or events with names that shadow (i.e. override) builtin Solidity symbols e.g. now or other declarations from the current scope are misleading and may lead to unexpected usages and behavior.</p><p><strong>Rename the local variables, state variables, functions, modifiers, and events that shadow a builtin symbol.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*yYon75GjOGk68emoHql4Gw.png" /></figure><h4>9) Dangerous state variable shadowing</h4><p>Shadowing state variables in derived contracts may be dangerous for critical variables such as contract owner (for e.g. where modifiers in base contracts check on base variables but shadowed variables are set mistakenly) and contracts incorrectly use base/shadowed variables. Do not shadow state variables</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*C3Q1FBu49LpGR77B9W3zig.png" /></figure><h4>10) Pre-declaration usage of local variables</h4><p>Usage of a variable before its declaration (either declared later or in another scope) leads to unexpected behavior in solc &lt; 0.5.0 but solc &gt;= 0.5.0 implements C99-style scoping rules where variables can only be used after they have been declared and only in the same or nested scopes.</p><p><strong>Move all variable declarations prior to any usage of the variable, and ensure that reaching a variable declaration does not depend on some conditional if it is used unconditionally.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/993/1*eZnS4Y4NVVixyfwF1E2MXg.png" /></figure><h4>11) Costly operations inside a loop</h4><p>Operations such as state variable updates (use SSTOREs) inside a loop cost a lot of gas, are expensive and may lead to out-of-gas errors. Optimizations using local variables are preferred.</p><p><strong>Use a local variable to hold the loop computation result.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*aF36QKXGugo83WB6y4zqDg.png" /></figure><h4><strong>12) Calls inside a loop</strong></h4><p>Calls to external contracts inside a loop are dangerous (especially if the loop index can be user-controlled) because it could lead to DoS if one of the calls reverts or execution runs out of gas. Avoid calls within loops, check that loop index cannot be user-controlled or is bounded</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GOuQnM8IQsVajuJ2ZlSnrw.png" /></figure><h4><strong>13) DoS with block gas limit</strong></h4><p>Programming patterns such as looping over arrays of unknown size may lead to DoS when the gas cost of execution exceeds the block gas limit.</p><p><strong>If you absolutely must loop over an array of unknown size, then you should plan for it to potentially take multiple blocks, and therefore require multiple transactions.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*SJAr0v2YTmMtu9n9XwIlkw.png" /></figure><h4>14) Missing events</h4><p>Events for critical state changes (e.g. owner and other critical parameters) should be emitted for tracking this off-chain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*6UM1yMNvu1PEdX3g5N_FHQ.png" /></figure><p>badupdateOwner() has no event, so it is difficult to track off-chain owner changes.</p><p>Emit an event for critical parameter changes.</p><h4>15) Unindexed event parameters</h4><p>Parameters of certain events are expected to be indexed (e.g. ERC20 Transfer/Approval events) so that they’re included in the block’s bloom filter for faster access. Failure to do so might confuse off-chain tooling looking for such indexed events.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*JiUZQdzBPzDbnwmgdjPgGQ.png" /></figure><h4>16) Incorrect event signature in libraries</h4><p>Contract types used in events in libraries cause an incorrect event signature hash. Instead of using the type `address` in the hashed signature, the actual contract name was used, leading to a wrong hash in the logs. This is due to a compiler bug introduced in <em>v0.5.0</em> and fixed in <em>v0.5.8</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*ooGc1Lskr-m5d55qv45zVA.png" /></figure><p>Loggy has a topic[0] of: keccak256(&quot;Loggy(uint256,LibName.StructName)&quot;)<br>but it should be: keccak256(&quot;Loggy(uint256,(bytes32,address))&quot;)</p><p>Clearly, changing the name of the library or struct should not change the event signature (if the types within the struct have not changed)</p><h4>17) Dangerous unary expressions</h4><p>Unary expressions such as x =+ 1 are likely errors where the programmer really meant to use x += 1. Unary + operator was deprecated in solc v0.5.0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*YtDgRBCFUOrGxd7Q44QELg.png" /></figure><h4>18) Missing zero address validation</h4><p>Setters of address type parameters should include a zero-address check otherwise contract functionality may become inaccessible or tokens burnt forever.</p><p><strong>Check that the address is not zero.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*SP63WolXC7lQIzB3txbxWQ.png" /></figure><h4>19) Critical address change</h4><p>Changing critical addresses in contracts should be a two-step process where the first transaction (from the old/current address) registers the new address (i.e. grants ownership) and the second transaction (from the new address) replaces the old address with the new one (i.e. claims ownership). This gives an opportunity to recover from incorrect addresses mistakenly used in the first step. If not, contract functionality might become inaccessible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*5RHPqqxQXPCsJYacdzYdKA.png" /></figure><h4>20) assert()/require() state change</h4><p>Invariants in assert() and require() statements should not modify the state per best practices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/1*YdlHO73V7l6w9ZQ9ftd3PA.png" /></figure><ul><li>require() should be used for checking error conditions on inputs and return values</li><li>assert() should be used for invariant checking.</li></ul><h4>21) Deprecated keywords</h4><p>Use of deprecated functions/operators such as block.blockhash() for blockhash(), msg.gas for gasleft(), throw for revert(), sha3() for keccak256(), callcode() for delegatecall(), suicide() for selfdestruct(), constant for view or var for actual type name should be avoided to prevent unintended errors with newer compiler versions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/513/1*PIH72YZ53q3DUxZruXsXew.png" /></figure><h4>22) Function default visibility</h4><p>Functions without a visibility type specifier are <em>public</em> by default in <em>solc &lt; 0.5.0</em>. This can lead to a vulnerability where a malicious user may make unauthorized state changes. <em>solc &gt;= 0.5.0</em> requires explicit function, visibility specifiers.</p><p>Functions can be specified as being external, public, internal or private. It is recommended to make a conscious decision on which visibility type is appropriate for a function. This can dramatically reduce the attack surface of a contract system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*6hBb6mEjKWi5PWwHUHqXtg.png" /></figure><h4>23) Incorrect inheritance order</h4><p>You have to list the direct <strong>base contracts</strong> in the order from “most base-like” to “most derived”.</p><p>Contracts inheriting from multiple contracts with identical functions should specify the correct inheritance order i.e. more general to more specific to avoid inheriting the incorrect function implementation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/391/1*tVp86ESaiIqVgVWbSsMKbA.png" /></figure><h4>24) Missing inheritance</h4><p>A contract might appear (based on name or functions implemented) to inherit from another interface or abstract contract without actually doing so</p><p><strong>Inherit from the missing interface or contract.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/459/1*plt7YWbEA6S_96hGCc5bMw.png" /></figure><h4>25) Insufficient gas griefing</h4><p>Transaction relayers need to be trusted to provide enough gas for the transaction to succeed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1023/1*Pvap2j_VuzGIdSREJKStVQ.png" /></figure><h4>26) Modifying reference type parameters</h4><p>Structs/Arrays/Mappings passed as arguments to a function may be by value (memory) or reference (storage) as specified by the data location (optional before <em>solc 0.5.0</em>). Ensure correct usage of memory and storage in function parameters and make all data locations explicit.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*FAmPY-kTFuLFLnuFQyqXzw.png" /></figure><h4>27) Hash collisions with multiple variable length arguments</h4><p>Using <em>abi.encodePacked()</em> with multiple variable length arguments can, in certain situations, lead to a hash collision. Do not allow users access to parameters used in <em>abi.encodePacked()</em>, use fixed length arrays or use <em>abi.encode()</em>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*HW3jCcZpTIxPxejvd23ivg.png" /></figure><h4>28) Incorrect shift in assembly</h4><p>Shift operators (<em>shl(x, y)</em>, <em>shr(x, y)</em>, <em>sar(x, y)</em>) in Solidity assembly apply the shift operation of <em>x</em> bits on <em>y</em> and not the other way around, which may be confusing.</p><p>Check if the values in a shift operation are reversed.</p><p>Swap the order of parameters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*1SoXtIiI45i7tuhxh4xXTg.png" /></figure><h4>29) Constant state variables</h4><p>Constant state variables should be declared constant to save gas</p><p><strong>Add the </strong><strong>constant attribute to state variables that never change.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/667/1*12at3GISG4L-MQjG97KGkA.png" /></figure><h4>30) Uninitialized state/local variables</h4><p>Uninitialized state/local variables are assigned zero values by the compiler and may cause unintended results e.g. transferring tokens to zero address. Explicitly initialize all state/local variables.</p><p><strong>e.g Bob calls </strong><strong>transfer. As a result, all Ether is sent to the address </strong><strong>0x0 and is lost.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*B66wR9zVMeHsQn5cK7zCUg.png" /></figure><p><strong>e.g Bob calls </strong><strong>transfer. As a result, the Ether are sent to the address </strong><strong>0x0 and are lost.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XTl-qASJFE8HphSg4dH2XA.png" /></figure><p><a href="https://www.linkedin.com/in/bartu-bozkurt/">https://www.linkedin.com/in/bartu-bozkurt/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de08d0ac73c2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BonqDAO protocol suffers $120M loss after oracle hack]]></title>
            <link>https://bartubozkurt35.medium.com/bonqdao-protocol-suffers-120m-loss-after-oracle-hack-32e4c30975e1?source=rss-62887bb79de3------2</link>
            <guid isPermaLink="false">https://medium.com/p/32e4c30975e1</guid>
            <category><![CDATA[data]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[audit]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Bartu bozkurt]]></dc:creator>
            <pubDate>Fri, 03 Feb 2023 14:38:36 GMT</pubDate>
            <atom:updated>2023-02-03T14:41:51.151Z</atom:updated>
            <content:encoded><![CDATA[<p>The @BonqDAO is exploited and its price oracle is manipulated to increase the #WALBT price. Here is the example hack tx:</p><p><a href="https://polygonscan.com/tx/0x31957ecc43774d19f54d9968e95c69c882468b46860f921668f2c55fadd51b19">Polygon Transaction Hash (Txhash) Details | PolygonScan</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f8FPPoUJZqtGx5DSGs7DMw.jpeg" /></figure><p>Using the above tx as an example, with the manipulated #WALBT price, the malicious actor is able to mint &gt;100M #BEUR.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*JjuYnN3miIh4Y_F0RDwLqw.jpeg" /></figure><p>In a follow-up tx, the actor further manipulates the #WALBT price and liquidates a bunch of (33) troves:</p><p><a href="https://polygonscan.com/tx/0xa02d0c3d16d6ee0e0b6a42c3cc91997c2b40c87d777136dedebe8ee0f47f32b1">Polygon Transaction Hash (Txhash) Details | PolygonScan</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/680/1*BCVpljolTIqn88TKDQRxJA.jpeg" /></figure><p>The actor then walks away by withdrawing the illicit gains with 113.8M #WALBT and 98M #BEUR (valued &gt;$10M). Some of these tokens are then dumped, resulting in major drop! #WALBT dropped by &gt;50% and #BEUR dropped by 34%</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dq4mEWgxyJuKaJ0SDJlXUg.jpeg" /></figure><p><a href="https://peckshield.com/">PeckShield - Industry Leading Blockchain Security Company</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=32e4c30975e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Smart Contract Vulnerabilities]]></title>
            <link>https://bartubozkurt35.medium.com/smart-contract-vulnerabilities-310cc591d05d?source=rss-62887bb79de3------2</link>
            <guid isPermaLink="false">https://medium.com/p/310cc591d05d</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[audit]]></category>
            <category><![CDATA[solidity]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <dc:creator><![CDATA[Bartu bozkurt]]></dc:creator>
            <pubDate>Thu, 02 Feb 2023 12:01:33 GMT</pubDate>
            <atom:updated>2023-02-04T20:23:45.560Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hxAQeFD6RlfnlMlFvuX0Qg.jpeg" /></figure><p>Smart contracts have revolutionized the way transactions are executed and agreements are enforced on blockchain networks. However, with the increasing popularity of decentralized applications and the growing number of assets being managed on the blockchain, the security of smart contracts has become a critical concern. In this series of articles, I will explore common security vulnerabilities in smart contracts and best practices for identifying and mitigating these risks. From addressing the consequences of poor coding practices to the importance of secure contract design, I will provide in-depth insights and practical solutions for securing smart contracts.</p><h4><strong>1) Solidity versions</strong></h4><p>Using very old versions of Solidity prevent benefits of bug fixes and newer security checks. Using the latest versions might make contracts susceptible to undiscovered compiler bugs.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/63d52a5babf2a157e9bdb54c74ee5769/href">https://medium.com/media/63d52a5babf2a157e9bdb54c74ee5769/href</a></iframe><h4>2) Unlocked pragma</h4><p>Contracts should be deployed with the same compiler version and flags that they have been tested with thoroughly. Locking the pragma helps to ensure that contracts do not accidentally get deployed using, for example, an outdated compiler version that might introduce bugs that affect the contract system negatively.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/26209a5249872f33d4f13f49ba616644/href">https://medium.com/media/26209a5249872f33d4f13f49ba616644/href</a></iframe><h4>3) Multiple Solidity pragma</h4><p>It is better to use one Solidity compiler version across all contracts instead of different versions with different bugs and security checks.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e07944e9042ebfaa6f5bc5f47c6e5ae0/href">https://medium.com/media/e07944e9042ebfaa6f5bc5f47c6e5ae0/href</a></iframe><p><strong>4) Incorrect access control</strong></p><p>Contract functions executing critical logic should have appropriate access control enforced via address checks (e.g. owner, controller etc.) typically in modifiers. Missing checks allow attackers to control critical logic.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14f50c78b887a871707567660787a457/href">https://medium.com/media/14f50c78b887a871707567660787a457/href</a></iframe><h4>5) Unprotected withdraw function</h4><p>Unprotected (<em>external</em>/<em>public</em>) function calls sending Ether/tokens to user-controlled address may allow users to withdraw unauthorized funds</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/14fdee3b67907167d9aa52af887d7eeb/href">https://medium.com/media/14fdee3b67907167d9aa52af887d7eeb/href</a></iframe><h4>6) Unprotected call to selfdestruct</h4><p>A user/attacker can mistakenly/intentionally kill the contract. Protect access to such functions.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/545638100c160b0f34d897b21dfdb8ab/href">https://medium.com/media/545638100c160b0f34d897b21dfdb8ab/href</a></iframe><h4>7) Modifier side-effects</h4><p>Modifiers should only implement checks and not make state changes and external calls which violates the <a href="https://solidity.readthedocs.io/en/develop/security-considerations.html#use-the-checks-effects-interactions-pattern">checks-effects-interactions</a> pattern. These side-effects may go unnoticed by developers/auditors because the modifier code is typically far from the function implementation.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8da80f209eaaed33a1246f5311c6d60d/href">https://medium.com/media/8da80f209eaaed33a1246f5311c6d60d/href</a></iframe><h4><strong>8) Incorrect modifier</strong></h4><p>If a modifier does not execute<em> _ </em>or <em>revert</em>, the function using that modifier will return the default value causing unexpected behavior.</p><p>e.g) If the condition in <strong>badModif</strong> is <strong>false</strong>, the execution of <strong>get()</strong> will return <strong>0x0000000000000000000000000000000000000000 (address(0))</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/97c13e81c9cea70ecae917eca82d6d43/href">https://medium.com/media/97c13e81c9cea70ecae917eca82d6d43/href</a></iframe><h4>9) Constructor names</h4><p>Before <em>solc 0.4.22</em>, constructor names had to be the same name as the contract class containing it. Misnaming it wouldn’t make it a constructor which has security implications. <em>Solc 0.4.22</em> introduced the <em>constructor</em> keyword. Until <em>solc 0.5.0</em>, contracts could have both old-style and new-style constructor names with the first defined one taking precedence over the second if both existed, which also led to security issues. <em>Solc 0.5.0</em> forced the use of <em>constructor</em> keyword.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4054efbfba976729f457e4be2ee36c1c/href">https://medium.com/media/4054efbfba976729f457e4be2ee36c1c/href</a></iframe><h4>10) Void constructor</h4><p>Calls to base contract constructors that are unimplemented leads to misplaced assumptions. Check if constructor is implemented or remove call if not</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/adda88c1c683c2bcc9250cb172aacae6/href">https://medium.com/media/adda88c1c683c2bcc9250cb172aacae6/href</a></iframe><h4>11) Controlled delegatecall</h4><p><em>delegatecall()</em> or <em>callcode()</em> to an address controlled by the user allows execution of malicious contracts in the context of the caller’s state. Ensure trusted destination addresses for such calls.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5cabd9c0370d7e748ab47e695550315c/href">https://medium.com/media/5cabd9c0370d7e748ab47e695550315c/href</a></iframe><h4>12) Reentrancy vulnerabilities</h4><p>Untrusted external contract calls could callback leading to unexpected results such as multiple withdrawals or out-of-order events. Use <strong>check-effects-interactions pattern</strong> or <strong>reentrancy guards.</strong></p><p>■ <strong>Check-effects-interactions(𝘔𝘰𝘴𝘵 𝘪𝘮𝘱𝘰𝘳𝘵𝘢𝘯𝘵𝘭𝘺, 𝘐𝘯 𝘵𝘩𝘦 𝘦𝘹𝘢𝘤𝘵 𝘰𝘳𝘥𝘦𝘳)</strong></p><ol><li>𝗖𝗛𝗘𝗖𝗞 The first part is to implement a 𝘾𝙃𝙀𝘾𝙆 or input validations(𝘸𝘪𝘵𝘩 𝘳𝘦𝘲𝘶𝘪𝘳𝘦 𝘰𝘳 𝘢𝘴𝘴𝘦𝘳𝘵 𝘴𝘵𝘢𝘵𝘦𝘮𝘦𝘯𝘵𝘴) to ensure that arguments passed are valid and the function is ready to be executed.</li><li>𝗘𝗙𝗙𝗘𝗖𝗧𝗦 Resolve all the 𝙀𝙁𝙁𝙀𝘾𝙏𝙎 to the State of the Contract. This part involves optimistically modifying the State Variables to a valid state in the protocol.</li><li>𝗜𝗡𝗧𝗘𝗥𝗔𝗖𝗧𝗜𝗢𝗡 The final step should include any 𝙄𝙉𝙏𝙀𝙍𝘼𝘾𝙏𝙄𝙊𝙉 with other external contracts. This is the step that should include any external call that is being made from the function, at the very end of the function.</li></ol><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9eab320fafbb039ab6528c879b61d51c/href">https://medium.com/media/9eab320fafbb039ab6528c879b61d51c/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8ac6dca414762eb163dc9cb61ab12c82/href">https://medium.com/media/8ac6dca414762eb163dc9cb61ab12c82/href</a></iframe><h4>13) ERC777 callbacks and reentrancy</h4><p>ERC777 tokens allow arbitrary callbacks via hooks that are called during token transfers. Malicious contract addresses may cause reentrancy on such callbacks <strong>if reentrancy guards are not used.</strong></p><p><strong>DAO Hack</strong></p><ul><li>Token: ETH</li><li>Trigger: Using the fallback function</li><li>this is executed when receiving ETH by contract</li></ul><p><strong>ERC777 Hack</strong></p><ul><li>Token: ERC777 Token</li><li>Trigger: tokensReceived()</li><li>this is executed when receiving the ERC777 token by contract</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe470ede11ec133dbdeb3e4882465cec/href">https://medium.com/media/fe470ede11ec133dbdeb3e4882465cec/href</a></iframe><h4>14) Avoid transfer() / send() as reentrancy mitigations</h4><p>It is said that <em>transfer()</em> and <em>send()</em> is best practice to prevent reentrancy attacks because they only forward 2300 gas(in fallback function, 2300 gas is higher than the limit) but, the gas repricing of opcodes may break deployed contracts.</p><p>Now, recommend using <em>call()</em> instead, without hardcoded gas limits along with checks-effects-interactions pattern or reentrancy guards for reentrancy protection</p><p>send and transfer do not protect from reentrancies in case of gas price changes.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5e1e2b7e674a8887e033b6230471c6b9/href">https://medium.com/media/5e1e2b7e674a8887e033b6230471c6b9/href</a></iframe><h4>15) Private on-chain data</h4><p>Marking variables <em>private</em> does not mean that they cannot be read on-chain. Private data should not be stored unencrypted in contract code or state but instead stored encrypted or off-chain.</p><p>It is a common misconception that private type variables cannot be read. Even if your contract is not published, attackers can look at contract transactions to determine values stored in the state of the contract. For this reason, it&#39;s important that unencrypted private data is not stored in the contract code or state.</p><p>Any private data should either be stored off-chain, or carefully encrypted.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d083355da0dc0e79e5bd2d6ccf00622d/href">https://medium.com/media/d083355da0dc0e79e5bd2d6ccf00622d/href</a></iframe><h4>16) Weak PRNG</h4><p>Ability to generate random numbers is very helpful in all kinds of applications. One obvious example is gambling DApps, where pseudo-random number generator is used to pick the winner. However, creating a strong enough source of randomness in Ethereum is very challenging. For example, use of block.timestamp is insecure, as a miner can choose to provide any timestamp within a few seconds and still get his block accepted by others. Use of blockhash, block.difficulty and other fields is also insecure, as they&#39;re controlled by the miner. If the stakes are high, the miner can mine lots of blocks in a short time by renting hardware, pick the block that has required block hash for him to win, and drop all others.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2593d486b3cb6966c799cadee3b175dd/href">https://medium.com/media/2593d486b3cb6966c799cadee3b175dd/href</a></iframe><ul><li><a href="https://soliditydeveloper.com/2019-06-23-randomness-blockchain">Randomness and the Blockchain</a></li><li><a href="https://docs.soliditylang.org/en/v0.8.13/cheatsheet.html?highlight=blockhash#global-variables">Cheatsheet - Solidity 0.8.13 documentation</a></li></ul><h4>17) Block values as time proxies</h4><p><em>block.timestamp</em> and <em>block.number </em>are not good proxies (i.e. representations, not to be confused with smart contract proxy/implementation pattern) for time because of issues with synchronization, miner manipulation and changing block times. Contracts often need access to time values to perform certain types of functionality. Values such as block.timestamp, and block.number can give you a sense of the current time or a time delta, however, they are not safe to use for most purposes.</p><p>In the case of block.timestamp, developers often attempt to use it to trigger time-dependent events. As Ethereum is decentralized, nodes can synchronize time only to some degree. Moreover, malicious miners can alter the timestamp of their blocks, especially if they can gain advantages by doing so. However, miners can&#39;t set a timestamp smaller than the previous one (otherwise the block will be rejected), nor can they set the timestamp too far ahead in the future. Taking all of the above into consideration, developers can&#39;t rely on the preciseness of the provided timestamp.</p><p>As for block.number, considering the block time on Ethereum is generally about 14 seconds, it&#39;s possible to predict the time delta between blocks. However, block times are not constant and are subject to change for a variety of reasons, e.g. fork reorganisations and the difficulty bomb. Due to variable block times, block.number should also not be relied on for precise calculations of time.</p><p>Developers should write smart contracts with the notion that block values are not precise, and the use of them can lead to unexpected effects. Alternatively, they may make use oracles.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c98fdf3e873e15459f5a7cd1056f027a/href">https://medium.com/media/c98fdf3e873e15459f5a7cd1056f027a/href</a></iframe><h4>18) Integer overflow/underflow</h4><p>An overflow/underflow happens when an arithmetic operation reaches the maximum or minimum size of a type. For instance if a number is stored in the uint8 type, it means that the number is stored in a 8 bits unsigned number ranging from 0 to 2⁸-1. In computer programming, an integer overflow occurs when an arithmetic operation attempts to create a numeric value that is outside of the range that can be represented with a given number of bits — either larger than the maximum or lower than the minimum representable value.</p><p><em>Solc v0.8.0</em> introduced default overflow/underflow checks for all arithmetic operations.</p><p>e.g) underflow: uint256(0) — 1 = 2²⁵⁶-1,</p><p>overflow: type(uint256).max + 1 = 1,</p><p>It is recommended to use vetted safe math libraries for arithmetic operations consistently throughout the smart contract system.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/41c6fa3808da48db5a40817afdbb1b74/href">https://medium.com/media/41c6fa3808da48db5a40817afdbb1b74/href</a></iframe><h4>19) Divide before multiply</h4><p>Solidity’s integer division truncates. Thus, performing division before multiplication can lead to precision loss.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/25c21608fddd07b2699171c8daa3a4c7/href">https://medium.com/media/25c21608fddd07b2699171c8daa3a4c7/href</a></iframe><h4>20) Transaction order dependence</h4><p>Race conditions can be forced on specific Ethereum transactions by monitoring the mempool. For example, the classic ERC20 <em>approve()</em> change can be front-run using this method. Do not make assumptions about transaction order dependence.</p><p><strong>The best fix for the ERC20 race condition is to add a field to the inputs of approve which is the expected current value and to have approve revert if Eve’s current allowance is not what Alice indicated she was expecting.</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/24fd85ee03f724bcfdb2bff23a136436/href">https://medium.com/media/24fd85ee03f724bcfdb2bff23a136436/href</a></iframe><h4>21) ERC20 <em>approve()</em> race condition</h4><p>Use <em>safeIncreaseAllowance()</em> and <em>safeDecreaseAllowance()</em> from OpenZeppelin’s <em>SafeERC20</em> implementation to prevent race conditions from manipulating the allowance amounts.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b51fa4c8be7bbd19eb856dfc80ac7ad1/href">https://medium.com/media/b51fa4c8be7bbd19eb856dfc80ac7ad1/href</a></iframe><h4>22) Signature malleability</h4><p>The <em>ecrecover</em> function is susceptible to signature malleability which could lead to replay attacks. Consider using OpenZeppelin’s<a href="https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/cryptography/ECDSA.sol"> ECDSA library</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9fa54d6f38e21eeaa54fe8e89a3e8eae/href">https://medium.com/media/9fa54d6f38e21eeaa54fe8e89a3e8eae/href</a></iframe><h4>23) ERC20 transfer() does not return boolean</h4><p>Incorrect return values for ERC20 functions. A contract compiled with Solidity &gt; 0.4.22 interacting with these functions will fail to execute them, as the return value is missing.</p><p>Use OpenZeppelin’s SafeERC20 wrappers.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f6f9cbed5fcf777d677376ea3952445e/href">https://medium.com/media/f6f9cbed5fcf777d677376ea3952445e/href</a></iframe><h4>24) Incorrect return values for ERC721 <em>ownerOf</em></h4><p>Contracts compiled with <em>solc &gt;= 0.4.22</em> interacting with ERC721 <em>ownerOf()</em> that returns a <em>bool</em> instead of <em>address</em> type will revert.</p><p>Use OpenZeppelin’s ERC721 contracts.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aec676314cc1321fd2e40c76b906b565/href">https://medium.com/media/aec676314cc1321fd2e40c76b906b565/href</a></iframe><h4>25) Unexpected Ether and this.balance</h4><p>A contract can receive Ether by 3 methods.</p><ul><li>via payable functions</li><li>selfdestruct()</li><li>coinbase transaction or pre-sent before creation.</li></ul><p>Contract logic depending on this.balance can therefore be manipulated</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/51da243a6543c6caea8308a21bb6a5f3/href">https://medium.com/media/51da243a6543c6caea8308a21bb6a5f3/href</a></iframe><h4>26) <em>fallback</em> vs <em>receive()</em></h4><p>Check that all precautions and subtleties of <em>fallback</em>/<em>receive</em> functions related to visibility, state mutability and Ether transfers have been considered.</p><ul><li>receive() external payable — for empty calldata (and any value)</li><li>fallback() external payable — when no other function matches (not even the receive function). Optionally payable.</li></ul><p><a href="https://docs.soliditylang.org/en/latest/contracts.html#fallback-function">https://docs.soliditylang.org/en/latest/contracts.html#fallback-function</a></p><p><a href="https://docs.soliditylang.org/en/latest/contracts.html#fallback-function">https://docs.soliditylang.org/en/latest/contracts.html#fallback-function</a></p><p><a href="https://blog.soliditylang.org/2020/03/26/fallback-receive-split/">https://blog.soliditylang.org/2020/03/26/fallback-receive-split/</a></p><h4>27) Dangerous strict equalities</h4><p>Use of strict equalities with <strong>tokens/Ether</strong> can accidentally/maliciously cause unexpected behavior.</p><p>Consider using <em>&gt;=</em> or <em>&lt;=</em> instead of <em>==</em> for such variables depending on the contract logic</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d2397f2a80c5509df7c04968bcc960cd/href">https://medium.com/media/d2397f2a80c5509df7c04968bcc960cd/href</a></iframe><p>fund_reached to know when to stop the sale of tokens. Bad reaches 100 Ether. Bob sends 0.1 Ether. As a result, fund_reached is always false and the Bad never ends.</p><h4>28) Locked Ether</h4><p>Ether’i ödenebilir işlevler aracılığıyla kabul eden ancak para çekme mekanizmaları olmayan sözleşmeler bu Ether’i kilitleyecektir. Ödenebilir özelliğini kaldırın veya geri çekme işlevi ekleyin.Ether&#39;i ödenebilir işlevler aracılığıyla kabul eden ancak para çekme mekanizmaları olmayan sözleşmeler bu Ether&#39;i kilitleyecektir. Ödenebilir özelliğini kaldırın veya geri çekme işlevi ekleyin.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b23442ff279336a8eee5e8768afb1265/href">https://medium.com/media/b23442ff279336a8eee5e8768afb1265/href</a></iframe><h4>29) Dangerous usage of <em>tx.origin</em></h4><p>tx.origin-based protection can be abused by a malicious contract if a legitimate user interacts with the malicious contract.</p><p>Use <em>msg.sender</em> instead.</p><pre>contract TxOrigin {<br>    address owner = msg.sender;<br><br>    function bug() {<br>        require(tx.origin == owner);<br>    }<br><br>****************<br>Bob is the owner of TxOrigin.<br>Bob calls Eve&#39;s contract. <br>Eve&#39;s contract calls TxOrigin and bypasses the tx.origin protection.</pre><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/da1c77bf116ce519c3fe3a71f7aaf687/href">https://medium.com/media/da1c77bf116ce519c3fe3a71f7aaf687/href</a></iframe><h4>30) Contract check</h4><p>Checking if a call was made from an Externally Owned Account (EOA) or a contract account is typically done using <strong><em>extcodesize</em></strong> check which may be circumvented by a contract <strong>during construction</strong> when it does not have a source code available.</p><p>Checking if <em>tx.origin == msg.sender</em> is another option. Both have implications that need to be considered.(the address of tx.origin can be only EOA)</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e58effb72d65b408507f1404332d3eb7/href">https://medium.com/media/e58effb72d65b408507f1404332d3eb7/href</a></iframe><h3>Coming Soon Stay Tuned !</h3><p><a href="https://www.linkedin.com/in/bartu-bozkurt/">https://www.linkedin.com/in/bartu-bozkurt/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=310cc591d05d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is Front Running?]]></title>
            <link>https://coinsbench.com/what-is-front-running-d76345bbe31a?source=rss-62887bb79de3------2</link>
            <guid isPermaLink="false">https://medium.com/p/d76345bbe31a</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[frontrunner]]></category>
            <dc:creator><![CDATA[Bartu bozkurt]]></dc:creator>
            <pubDate>Sat, 22 Oct 2022 19:18:53 GMT</pubDate>
            <atom:updated>2022-11-07T11:21:22.206Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*DnpA2wSXQ8T-5K1_qj3PAA.jpeg" /></figure><p>Front running is placing a buy order before a high-volume buy order that is known to be made. Remind you that an important part of the job of blockchain miners is to confirm transactions..</p><p>They can see transactions and they have privileges. Let&#39;s say one pair for example; BTC/USD . If they see a pending high-volume buy order. he can define a trade on the same pair from his own account before confirming this transaction.</p><p>High Volume buy orders are completed and Front runner sell order happens quickly. In other words sandwich attacks… made a huge profit.</p><h4><strong>Who else can do this other than miners?</strong></h4><p>Of course full node operators… because they have the right to see a list of transactions and control the process So they have access.</p><p>In fact, CEX like Binance and other CEX can do this too. But they don&#39;t want to do cause cheating their customer and by doing will damage their reputation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*EBCKeIx1Npbhqx5VTDSSjg.png" /><figcaption>like broker and client logic</figcaption></figure><h4><strong>Basically, Front Run Bot system</strong></h4><p>Blockchain, , keeps every transaction entered in a memory pool. Transactions in this pool await approval.</p><p>Front Run Bots constantly scans the queued processes in this pool, suitable for front running.This is impossible to do by the person. Front Run Bots do these operations in milliseconds. Thus, the targeted order can be sandwiched in the same second.</p><h4>How can we be protected?</h4><ul><li>Stay away from low liquidity pools.</li><li>Trade low volumes</li><li>Pay higher gas fee</li><li>Set low slippage</li></ul><h4>ETH 2.0 Front Running ?</h4><p>Ultimately, it will continue to be nodes and validators for the blockchain to work. Therefore, switching from Proof-of-Work to Proof-of-Stake will not change anything in this sense.</p><p><a href="https://www.linkedin.com/in/bartu-bozkurt/">https://www.linkedin.com/in/bartu-bozkurt/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d76345bbe31a" width="1" height="1" alt=""><hr><p><a href="https://coinsbench.com/what-is-front-running-d76345bbe31a">What is Front Running?</a> was originally published in <a href="https://coinsbench.com/">CoinsBench</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Billions of Luna minted as supply grows 20-fold in four days]]></title>
            <link>https://medium.com/coinmonks/billions-of-luna-minted-as-supply-grows-20-fold-in-four-days-aca65b195dc0?source=rss-62887bb79de3------2</link>
            <guid isPermaLink="false">https://medium.com/p/aca65b195dc0</guid>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[luna]]></category>
            <category><![CDATA[ust]]></category>
            <dc:creator><![CDATA[Bartu bozkurt]]></dc:creator>
            <pubDate>Fri, 13 May 2022 14:25:23 GMT</pubDate>
            <atom:updated>2022-05-16T17:49:41.124Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jroNdYW2gG3-mYg4DurhSw.jpeg" /><figcaption><strong>Luna</strong></figcaption></figure><p><strong>The supply of Luna has increased from 346 million to 7.1 billion in just four days.</strong></p><p><strong>This has decimated the value of the token, which has fallen from $63 to less than $0.10.</strong></p><p>This massive supply increase has accelerated the fall in Luna’s price, which is down 99% in the last two days. And if the price of Luna continues to fall, its supply will also continue to increase.</p><h4>Why this happening?</h4><p>To understand what is going on, we need to know the relationship between Luna and UST.</p><p>Luna is the token used to help UST meets its peg with dollar. If the price of UST goes above a dollar, $1 of Luna can be burned and redeemed for 1 UST, a factor that helped push Lunas’s price up during its epic rally earlier this year. Yet there’s a counterweight: if the price of UST falls the peg, traders can swap 1 UST for $1 worth of Luna.</p><p>At present, the value of UST is way below its peg, trading at just $0.57 as of 8:05a.m ET</p><p>on Thursday. AS a result, rather than sell on the market, UST holders are trying to cash out through Luna, using the mechanism designed to keep the peg in place.When this happens, more Luna is minted in response to the amount of UST being burned.</p><p>When Luna’s price was much higher, say $100, if you redeemed 1 UST for $1 worth of Luna you would only get 0.01 LUNA. As a result, such swaps wouldn’t have increased Luna’s supply by very much.</p><p>Yet now Luna’s price is much lower and large holders are cashing out, it’s causing a big increase in Luna’s supply. At Luna’s current price of $0.10, swapping 1 UST gets you 10 LUNA. <strong>So if someone wants to swap a large amount, say 100.000 UST, that would lead to the minting 1 million LUNA.</strong></p><p>This has led to a downward spiral. As holders redeem UST for Luna, they increase the supply of Luna and likely sell these tokens on the market. This puts the price of Luna down even further, meaning the next person to redem their UST creates even more Luna.</p><p>It has also led to an exponential increase in the supply of Luna. On Wednesday the supply of Luna increased from 386 million to 1.5 billion — up by 1.2 billion. So far today, the supply has already increased to 7.1 billion — up a further 5.5 billion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZCfRNWO-87VY1HH0.png" /></figure><p>At the same time as this huge supply increase, the price keeps driving lower.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hTdJzJn6g_Ru1-uq.png" /></figure><p><a href="https://www.linkedin.com/in/bartu-bozkurt/">Bartu Bozkurt - Blockchain Developer - Private IT Company | LinkedIn</a></p><blockquote>Join Coinmonks<a href="https://t.me/coincodecap"> Telegram Channel</a> and<a href="https://www.youtube.com/c/coinmonks/videos"> Youtube Channel</a> learn about crypto trading and investing</blockquote><h3>Also, Read</h3><ul><li><a href="https://coincodecap.com/bookmap-review-2021-best-trading-software">Bookmap Review</a> |<a href="https://coincodecap.com/crypto-exchange-usa"> 5 Best Crypto Exchanges in the USA</a></li><li>The Best Crypto<a href="https://medium.com/coinmonks/hardware-wallets-dfa1211730c6"> Hardware wallet</a> |<a href="https://medium.com/coinmonks/bitbns-review-38256a07e161"> Bitbns Review</a></li><li><a href="https://coincodecap.com/crypto-exchange-in-singapore">10 Best Crypto Exchange in Singapore</a> |<a href="https://coincodecap.com/buy-axs-token"> Buy AXS</a></li><li><a href="https://coincodecap.com/red-dog-casino-review">Red Dog Casino Review</a> |<a href="https://coincodecap.com/swyftx-review"> Swyftx Review</a> |<a href="https://coincodecap.com/coingate-review"> CoinGate Review</a></li><li><a href="https://coincodecap.com/best-crypto-to-invest-in-india-in-2021">Best Crypto to Invest in India</a> |<a href="https://coincodecap.com/wazirx-p2p"> WazirX P2P</a> |<a href="https://coincodecap.com/hi-dollar-review"> Hi Dollar Review</a></li><li><a href="https://coincodecap.com/5-best-crypto-trading-bots-in-canada">Best Crypto Trading bots in Canada</a> |<a href="https://coincodecap.com/kucoin-review"> KuCoin Review</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aca65b195dc0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coinmonks/billions-of-luna-minted-as-supply-grows-20-fold-in-four-days-aca65b195dc0">Billions of Luna minted as supply grows 20-fold in four days</a> was originally published in <a href="https://medium.com/coinmonks">Coinmonks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is POS?]]></title>
            <link>https://medium.com/coinmonks/what-is-pos-1be14eff98ee?source=rss-62887bb79de3------2</link>
            <guid isPermaLink="false">https://medium.com/p/1be14eff98ee</guid>
            <category><![CDATA[pos]]></category>
            <category><![CDATA[ethereum]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[smart-contracts]]></category>
            <category><![CDATA[solidity]]></category>
            <dc:creator><![CDATA[Bartu bozkurt]]></dc:creator>
            <pubDate>Sat, 23 Apr 2022 10:56:27 GMT</pubDate>
            <atom:updated>2022-04-26T08:55:50.470Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*d8u4WevQ3WZDOc59gzB-WA.jpeg" /></figure><h3>WHAT IS PROOF-OF-STAKE (POS)?</h3><p>Proof-of-stake is a type of <a href="https://ethereum.org/en/developers/docs/consensus-mechanisms/">consensus mechanism</a> used by blockchain networks to achieve distributed consensus.</p><p>It requires users to stake their ETH to become a validator in the network. Validators are responsible for the same thing as miners in <a href="https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/">proof-of-work</a>: ordering transactions and creating new blocks so that all nodes can agree on the state of the network.</p><h3>PROOF-OF-STAKE, STAKING, AND VALIDATORS</h3><p>Proof-of-stake is the underlying mechanism that activates validators upon receipt of enough stake. For Ethereum, users will need to stake 32 ETH to become a validator. Validators are chosen at random to create blocks and are responsible for checking and confirming blocks they don’t create.</p><h3>HOW DOES ETHEREUM’S PROOF-OF-STAKE WORK?</h3><p>Unlike proof-of-work, validators don’t need to use significant amounts of computational power because they’re selected at random and aren’t competing. They don’t need to mine blocks; they just need to create blocks when chosen and validate proposed blocks when they’re not. This validation is known as attesting. You can think of attesting as saying “this block looks good to me.” Validators get rewards for proposing new blocks and for attesting to ones they’ve seen.</p><p><a href="https://www.linkedin.com/in/bartu-bozkurt/">Bartu Bozkurt - Blockchain Developer - Private IT Company | LinkedIn</a></p><blockquote>Join Coinmonks<a href="https://t.me/coincodecap"> Telegram Channel</a> and<a href="https://www.youtube.com/c/coinmonks/videos"> Youtube Channel</a> learn about crypto trading and investing</blockquote><h3>Also, Read</h3><ul><li><a href="https://coincodecap.com/trading-signal">What are the Trading Signals?</a> |<a href="https://coincodecap.com/bitstamp-coinbase"> Bitstamp vs Coinbase</a></li><li><a href="https://coincodecap.com/best-crypto-books">10 Best Books on Crypto</a> |<a href="https://coincodecap.com/uk-trading-bots"> 5 Best Crypto Bots in the UK</a></li><li><a href="https://coincodecap.com/koinly-review">Koinly Review</a> |<a href="https://coincodecap.com/binaryx-review"> Binaryx Review</a> |<a href="https://coincodecap.com/hodlnaut-vs-cakedefi-vs-celsius"> Hodlnaut vs CakeDefi</a></li><li><a href="https://coincodecap.com/best-telegram-channels">40 Best Telegram Channels</a> |<a href="https://coincodecap.com/1xbit-review"> 1xBit Review</a> |<a href="https://coincodecap.com/keevo-wallet-review"> Keevo Wallet Review</a></li><li><a href="https://coincodecap.com/buy-ethereum-in-india">How to buy Ethereum in India?</a> |<a href="https://coincodecap.com/buy-bitcoin-binance"> How to buy Bitcoin on Binance</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1be14eff98ee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/coinmonks/what-is-pos-1be14eff98ee">What is POS?</a> was originally published in <a href="https://medium.com/coinmonks">Coinmonks</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>