<?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: MBENT Community</title>
    <description>The latest articles on DEV Community by MBENT Community (@mbentcommunity).</description>
    <link>https://dev.to/mbentcommunity</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4266922%2F427ca38a-19b0-4b59-b241-0c511670f5a7.png</url>
      <title>DEV Community: MBENT Community</title>
      <link>https://dev.to/mbentcommunity</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mbentcommunity"/>
    <language>en</language>
    <item>
      <title>Simulating a Swap Before You Buy: Auditing a Single-Pair BEP-20 Pool With Read-Only Calls</title>
      <dc:creator>MBENT Community</dc:creator>
      <pubDate>Thu, 26 Nov 2026 13:38:59 +0000</pubDate>
      <link>https://dev.to/mbentcommunity/simulating-a-swap-before-you-buy-auditing-a-single-pair-bep-20-pool-with-read-only-calls-4gc0</link>
      <guid>https://dev.to/mbentcommunity/simulating-a-swap-before-you-buy-auditing-a-single-pair-bep-20-pool-with-read-only-calls-4gc0</guid>
      <description>&lt;p&gt;A token chart tells you the last price someone paid. It does not tell you what your own trade would return, and on a single-pair market those are often different numbers. The gap is worth measuring before you sign anything, and it takes four read-only calls and about twenty lines of Python.&lt;/p&gt;

&lt;p&gt;This walkthrough uses a live BEP-20 token on BNB Smart Chain, MBENT, because it is a clean worst case: one PancakeSwap V2 pair against WBNB, fixed supply, no admin functions left. The project page is &lt;a href="https://mbent.hicplus.com" rel="noopener noreferrer"&gt;https://mbent.hicplus.com&lt;/a&gt;, the holder claim is &lt;a href="https://vip.mbent.co.kr/hold" rel="noopener noreferrer"&gt;https://vip.mbent.co.kr/hold&lt;/a&gt;, and the pass is &lt;a href="https://vip.mbent.co.kr" rel="noopener noreferrer"&gt;https://vip.mbent.co.kr&lt;/a&gt;. Nothing below signs a transaction or needs a private key; every call is &lt;code&gt;eth_call&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The four calls
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;urllib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;

&lt;span class="no"&gt;RPC&lt;/span&gt;    &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://bsc-dataseed.binance.org"&lt;/span&gt;
&lt;span class="no"&gt;TOKEN&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"0x006134f220F03d9644B40d6BaDF5D482EbB3231F"&lt;/span&gt;
&lt;span class="no"&gt;PAIR&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"0x6605ec468e57922e3bd2512850d6b910f11ba28b"&lt;/span&gt;
&lt;span class="no"&gt;ROUTER&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"0x10ED43C718714eb63d5aA57B78B54704E256024E"&lt;/span&gt;   &lt;span class="c1"&gt;# PancakeSwap V2&lt;/span&gt;
&lt;span class="no"&gt;WBNB&lt;/span&gt;   &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"jsonrpc"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"2.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"method"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"eth_call"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                       &lt;span class="s2"&gt;"params"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"to"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="s2"&gt;"latest"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;req&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;urllib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;RPC&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"Content-Type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"application/json"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;urllib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;urlopen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"result"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;word&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"064x"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;total_supply&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;TOKEN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"0x18160ddd"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;1e18&lt;/span&gt;       &lt;span class="c1"&gt;# totalSupply()&lt;/span&gt;
&lt;span class="n"&gt;raw_reserves&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;PAIR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"0x0902f1ac"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;                          &lt;span class="c1"&gt;# getReserves()&lt;/span&gt;
&lt;span class="n"&gt;reserve_token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw_reserves&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;66&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;1e18&lt;/span&gt;
&lt;span class="n"&gt;reserve_wbnb&lt;/span&gt;  &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw_reserves&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;66&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;130&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;1e18&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_amounts_out&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount_in_wei&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;                         &lt;span class="c1"&gt;# Router quote&lt;/span&gt;
    &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"0xd06ca61f"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;word&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount_in_wei&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;word&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;word&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;rjust&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"0"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;raw&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;ROUTER&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;128&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;128&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;192&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;1e18&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;get_amounts_out&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="no"&gt;WBNB&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;TOKEN&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# what 1 WBNB buys&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run against the pool on 2026-11-26 21:53 (block timestamp), the values were:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;totalSupply()&lt;/code&gt; → 1,000,000,000,000 MBENT&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;getReserves()&lt;/code&gt; → 168,216,525,403.04694 MBENT against 2.8705880384378823 WBNB&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;owner()&lt;/code&gt; → a revert, not an address&lt;/li&gt;
&lt;li&gt;1 WBNB quoted → 43,379,566,964.90 MBENT; 0.01 WBNB quoted → 582,511,064.16 MBENT&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What each number actually answers
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Supply.&lt;/strong&gt; A fixed supply means the thing you are buying cannot be diluted later by a mint function. Read it once and it stays true; if it changes tomorrow, the contract had a mint path all along.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Owner.&lt;/strong&gt; An &lt;code&gt;owner()&lt;/code&gt; that reverts is different from an owner set to the zero address, and both are different from an owner that is a live wallet. A live wallet can pause, tax, or blacklist you depending on the source. Check the source for the functions that matter: mint, blacklist or exclusion list, pause, and a proxy or upgrade hook. In this contract none of the four is present, which is why the empty owner field is not just cosmetic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reserves.&lt;/strong&gt; Reserves are the only liquidity number that cannot be edited by a marketing decision. Two values, one ratio: about 168.2 billion MBENT against 2.8706 WBNB.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Quote.&lt;/strong&gt; &lt;code&gt;getAmountsOut&lt;/code&gt; runs the constant-product formula over the real reserves and returns what a swap would actually yield, fees included. This is the number to compare with the chart. On a single-pair market they usually agree closely, and when they do not, the chart is stale.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turning a quote into price impact
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;amount_out&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount_in_wbnb&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r_in&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;r_out&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;amount_in_with_fee&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;amount_in_wbnb&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;997&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;amount_in_with_fee&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;r_out&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r_in&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;amount_in_with_fee&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;small&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;amount_out&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.01&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reserve_wbnb&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reserve_token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;large&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;amount_out&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1.00&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reserve_wbnb&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reserve_token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;small&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;0.01&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;large&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mf"&gt;1.00&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;      &lt;span class="c1"&gt;# token per WBNB at two trade sizes&lt;/span&gt;
&lt;span class="c1"&gt;# 58,251,106,415.83  vs  43,379,566,964.89&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first output is what a small buyer gets per unit; the second is what someone buying a hundred times more gets from the same pool. The difference is the impact, and on a pool of this depth it is not subtle: the larger trader moves the price against themselves with their own order. Any page quoting "the price" without that curve is quoting the first number and hiding the second.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three things a simulation will not tell you
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Whether anyone will buy after you.&lt;/strong&gt; Depth measures how much the market can absorb, not whether demand exists. A thin pool with no interest and a thin pool that is about to be discovered look identical to this code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Whether the claim next to the chart is honored in practice.&lt;/strong&gt; A page can say holders of 100,000,000 MBENT receive a pass at no cost, and the reverse route can hand the same wallet 100,000,000 MBENT, but only an actual claim transaction shows whether the reserve behind it is funded and behaves. Simulate, then verify one claim with its hash.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Honeypot behavior on the sell side.&lt;/strong&gt; A buy quote proves the pair will sell you tokens; it does not prove the token's own transfer logic will let you sell. That needs a quote in the opposite direction and, ideally, a small live round trip.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  A checklist that fits on a card
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Fixed supply, readable in one call&lt;/li&gt;
&lt;li&gt;No owner, no mint, no pause, no proxy&lt;/li&gt;
&lt;li&gt;One pair, reserves read from the pair and not a website&lt;/li&gt;
&lt;li&gt;A quote at your actual trade size, not at one unit&lt;/li&gt;
&lt;li&gt;The claim page's numbers matching the chain&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything above is read-only, needs no wallet, and stays true after the page you read it on goes offline. That is the difference between research and a screenshot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Elsewhere in the same house
&lt;/h2&gt;

&lt;p&gt;The company behind this token also publishes ATELIER (&lt;a href="https://ateliermbent.com" rel="noopener noreferrer"&gt;https://ateliermbent.com&lt;/a&gt;), a free eight-language luxury journal covering supercars, watches, yachts and fashion. It has no token content and no wallet prompts; it is simply the other half of the brand, and it is worth a look if the editorial side interests you more than the pool.&lt;/p&gt;

</description>
      <category>web3</category>
      <category>blockchain</category>
      <category>cryptocurrency</category>
      <category>python</category>
    </item>
    <item>
      <title>Four RPC Calls That Check a Token's Promises (and What They Miss)</title>
      <dc:creator>MBENT Community</dc:creator>
      <pubDate>Thu, 26 Nov 2026 12:48:51 +0000</pubDate>
      <link>https://dev.to/mbentcommunity/four-rpc-calls-that-check-a-tokens-promises-and-what-they-miss-49eg</link>
      <guid>https://dev.to/mbentcommunity/four-rpc-calls-that-check-a-tokens-promises-and-what-they-miss-49eg</guid>
      <description>&lt;p&gt;Every token page says something about what its reward program does. Almost none of it needs a dapp to check: four JSON-RPC calls, a verified source page, and about five minutes of arithmetic will tell you whether the contract can do what the page says, and whether it can do it differently later.&lt;/p&gt;

&lt;p&gt;I ran these calls against MBENT, a BEP-20 token on BNB Smart Chain with a deliberately small reward loop, because working through a live example is more useful than a generic checklist. The project page is &lt;a href="https://mbent.hicplus.com" rel="noopener noreferrer"&gt;https://mbent.hicplus.com&lt;/a&gt;, the holder claim is &lt;a href="https://vip.mbent.co.kr/hold" rel="noopener noreferrer"&gt;https://vip.mbent.co.kr/hold&lt;/a&gt;, and the pass is &lt;a href="https://vip.mbent.co.kr" rel="noopener noreferrer"&gt;https://vip.mbent.co.kr&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the loop claims
&lt;/h2&gt;

&lt;p&gt;Hold 100,000,000 MBENT and a holder pass can be claimed at no cost. Buy the $5 pass and the same wallet receives 100,000,000 MBENT. Both directions are on-chain transfers, so both can be watched. The rest of this post is checking whether the contract has anything else it could do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Call 1: totalSupply
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s -X POST https://bsc-dataseed.binance.org -H &lt;span class="s1"&gt;'Content-Type: application/json'&lt;/span&gt; \
  -d &lt;span class="s1"&gt;'{"jsonrpc":"2.0","id":1,"method":"eth_call","params":[{"to":"0x006134f220F03d9644B40d6BaDF5D482EbB3231F","data":"0x18160ddd"},"latest"]}'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Live result: &lt;code&gt;0x…c9f2c9cd04674edea40000000&lt;/code&gt;, which is 1,000,000,000,000 with 18 decimals. A fixed supply is one half of the claim; the other half is that nothing can add to it, which the next check covers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Call 2: owner()
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="s2"&gt;":"&lt;/span&gt;&lt;span class="mh"&gt;0x8da5cb5b&lt;/span&gt;&lt;span class="s2"&gt;"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This one answers with &lt;code&gt;execution reverted&lt;/code&gt;. That is the interesting result. A renounced &lt;code&gt;Ownable&lt;/code&gt; contract usually returns the zero address; a contract with no ownership surface at all reverts because the selector does not exist. Either way there is no address left that can call an administrative function, and no admin function to call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Call 3: the function list
&lt;/h2&gt;

&lt;p&gt;Read the verified source, not the documentation. You are looking for four names, and you want not to find them: &lt;code&gt;mint&lt;/code&gt;, &lt;code&gt;blacklist&lt;/code&gt; (or any editable exclusion list), &lt;code&gt;pause&lt;/code&gt; or &lt;code&gt;freeze&lt;/code&gt;, and a proxy or upgrade hook. In this contract none of the four exists.&lt;/p&gt;

&lt;p&gt;Absence is a stronger statement than an audit badge, because an audit describes a review that happened once and absence describes every future block. It is also cheap to confirm: the function list is on the same page as the source, and a token that hides it behind a proxy is telling you something by doing so.&lt;/p&gt;

&lt;h2&gt;
  
  
  Call 4: getReserves
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data":"0x0902f1ac"   // on the pair, not the token
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Read the pair address from the token page, then call &lt;code&gt;token0()&lt;/code&gt; to learn the ordering. For this pair &lt;code&gt;token0&lt;/code&gt; is the token itself, so reserve0 is MBENT and reserve1 is WBNB.&lt;/p&gt;

&lt;p&gt;Snapshot at the time of writing (2026-11-26 12:44 UTC): 166,195,175,614.92 MBENT against 2.9054 WBNB. Divide one by the other and the price is about 1.748e-11 WBNB per token. That is arithmetic from the pool, not a market cap multiplied out of a supply that may never trade. It is also the number a seller actually meets.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the four calls cannot tell you
&lt;/h2&gt;

&lt;p&gt;They do not tell you the token is worth holding. Demand, distribution, who is on the other side of the trade, and whether anyone wants what the pass unlocks all sit outside the contract. A thin, renounced contract removes one category of risk; it does not remove the market.&lt;/p&gt;

&lt;p&gt;They also do not tell you the reward program is generous. A 100,000,000-token threshold is only meaningful next to the supply and the price you just read, and both of those numbers move.&lt;/p&gt;

&lt;p&gt;One more limitation is worth naming because the calls make it visible: liquidity sits in a single PancakeSwap V2 pair. One pool is one number, with no second venue to compare against, so depth and price are the same question.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this pattern is showing up more
&lt;/h2&gt;

&lt;p&gt;Reward loops are slowly losing their backends. Every layer removed is a layer that cannot fail, cannot be bribed, and cannot decide one morning that the terms are different. What is lost is responsiveness: an operator can adjust a live program to a problem, and a contract without admin keys cannot adjust to anything.&lt;/p&gt;

&lt;p&gt;That trade is the actual design decision. A program with admin keys is a promise about people; a program without them is a claim about code, and code can be read by anyone with curl and an afternoon.&lt;/p&gt;

&lt;p&gt;Utility that can be checked without asking permission is a different product from utility that has to be explained. The first one survives its team.&lt;/p&gt;

</description>
      <category>web3</category>
      <category>blockchain</category>
      <category>cryptocurrency</category>
    </item>
  </channel>
</rss>
