<?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"><channel><title><![CDATA[Rugtective]]></title><description><![CDATA[Rugtective]]></description><link>https://rugtective.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 29 Nov 2026 20:28:58 GMT</lastBuildDate><atom:link href="https://rugtective.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Hidden Token Taxes: How to Check Buy and Sell Fees Before You Trade]]></title><description><![CDATA[A 99% sell tax can do the same damage as a honeypot. Here's how to find it in the contract yourself.]]></description><link>https://rugtective.hashnode.dev/hidden-token-taxes-how-to-check-buy-and-sell-fees-before-you-trade</link><guid isPermaLink="true">https://rugtective.hashnode.dev/hidden-token-taxes-how-to-check-buy-and-sell-fees-before-you-trade</guid><category><![CDATA[Blockchain]]></category><category><![CDATA[Web3]]></category><category><![CDATA[Ethereum]]></category><category><![CDATA[Security]]></category><category><![CDATA[Cryptocurrency]]></category><dc:creator><![CDATA[Rugtective]]></dc:creator><pubDate>Mon, 16 Nov 2026 18:38:29 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6afb4766de0b29114e2e6157/1a19af5e-cb11-45d7-a7a9-0debbb789ee6.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most traders know to worry about honeypots, tokens you can buy but never sell. Fewer check for the quieter version: a token you <em>can</em> sell, but where the contract takes most of what you get. If a token charges a 95% sell tax, the sell button still works. You just walk away with almost nothing.</p>
<p>Token taxes aren't always malicious. Plenty of projects take a small fee on each trade for a treasury or for liquidity. The trouble starts when the fee is hidden, much higher than advertised, or can be changed by the owner at any time. This guide covers how token taxes work and how to check them before you buy.</p>
<h2>How a token tax works</h2>
<p>On EVM chains like Ethereum, Base and BNB Chain, a standard ERC-20 token moves balances in its <code>transfer</code> and <code>transferFrom</code> functions. A taxed token adds logic to those functions. When tokens move to or from the liquidity pool, which means someone is buying or selling, the contract takes a percentage and sends it somewhere else: a marketing wallet, the contract itself, or a burn address.</p>
<p>A simplified version looks like this:</p>
<pre><code class="language-solidity">function _transfer(address from, address to, uint256 amount) internal {
    uint256 fee = 0;
    if (to == pair) {          // selling into the pool
        fee = amount * sellFee / 100;
    } else if (from == pair) { // buying from the pool
        fee = amount * buyFee / 100;
    }
    _balances[from] -= amount;
    _balances[to] += amount - fee;
    _balances[feeWallet] += fee;
}
</code></pre>
<p>Nothing here is unusual on its own. What matters is the value of <code>sellFee</code> and <code>buyFee</code>, and who can change them.</p>
<h2>Red flag 1: the owner can change the fee at any time</h2>
<p>Look for functions with names like <code>setFees</code>, <code>setTaxes</code>, <code>updateSellFee</code> or <code>setSwapFees</code>, restricted with <code>onlyOwner</code>. If one exists, the tax you see today isn't the tax you'll pay tomorrow.</p>
<p>A common pattern: launch with a 0% or 3% tax, let buyers pile in, then raise the sell tax to 99% in a single transaction. Holders can still sell, so the token doesn't look like a honeypot, but every sell now pays out almost nothing to the seller.</p>
<p>Things to check in the setter:</p>
<ul>
<li><strong>Is there a cap?</strong> A line like <code>require(newFee &lt;= 10)</code> limits the damage. No cap means the owner can set any value up to 100%.</li>
<li><strong>Is ownership renounced?</strong> If <code>owner()</code> returns the zero address, <code>onlyOwner</code> functions can't be called anymore. Make sure there isn't a second admin role, such as an "operator" or "manager" address, that can still change fees.</li>
<li><strong>Is there a timelock?</strong> A timelock gives holders warning before a change takes effect.</li>
</ul>
<h2>Red flag 2: different fees for different wallets</h2>
<p>Some contracts keep an exclusion list, often called <code>isExcludedFromFee</code>, so the team's wallets trade for free. That's common and not necessarily a scam. The opposite is the problem: a list that charges <em>specific</em> wallets a higher fee, or a function that lets the owner tag any address. Look for mappings like <code>isBot</code>, <code>blacklisted</code> or <code>customFee</code> paired with an owner-only setter. Those can be used to target ordinary buyers after they've bought.</p>
<h2>Red flag 3: the fee is hidden in an unverified contract</h2>
<p>If the contract source isn't verified on the block explorer (Etherscan, Basescan or BscScan), you can't read any of this. You're trusting bytecode you can't inspect. Treat an unverified contract as high risk no matter what the project's website says about its tax.</p>
<p>Proxy contracts deserve a closer look too. If the token sits behind an upgradeable proxy, whoever controls the upgrade can swap in new logic, including a new fee, later on.</p>
<h2>How to check the tax yourself</h2>
<ol>
<li><strong>Open the contract on the block explorer</strong> and confirm the source is verified.</li>
<li><strong>Read the current fees.</strong> Under "Read Contract," look for values like <code>buyFee</code>, <code>sellFee</code>, <code>_taxFee</code> or <code>totalFees</code>. Watch for decimals: some contracts store 5% as <code>5</code>, others as <code>500</code> (basis points).</li>
<li><strong>Search the code for fee setters.</strong> Use Ctrl+F for <code>fee</code>, <code>tax</code> and <code>onlyOwner</code>. Note any setter without a sensible cap.</li>
<li><strong>Check who the owner is.</strong> Read <code>owner()</code>. If it's a regular wallet rather than the zero address or a timelock, the owner keeps full control.</li>
<li><strong>Look at real sells.</strong> In the token's transaction history, compare the tokens sent to the pool with what the seller received in the base asset. If sellers consistently get far less than the quoted price minus the stated fee, something is taking a cut.</li>
<li><strong>Watch for recent fee changes.</strong> In the contract's transaction list, look for recent calls to fee-setting functions, especially right after a burst of buying.</li>
</ol>
<h2>A quick rule of thumb</h2>
<p>A small, fixed, capped fee with renounced ownership is usually fine. A fee the owner can change without limits is a loaded gun, even if it's 0% today. And a sell tax well above the buy tax, with no clear reason, is a strong sign the token was built to trap sellers.</p>
<h2>Scan first, ape second</h2>
<p>Checking all of this by hand takes time, and new tokens move fast. That's why we're building Rugtective, an on-chain rug pull scanner for crypto traders. Paste a token's contract address and get one verdict, AVOID, CAUTION or CLEAR, in seconds, with the on-chain evidence behind every call, including whether you can actually sell and whether hidden buy and sell taxes are in play.</p>
<p>Rugtective is coming in the first half of 2027 on Solana, Ethereum, Base, BNB Chain and Robinhood Chain, on the web, iPhone, Android and as a Chrome extension. Join the early access waitlist at <a href="https://rugtective.com">https://rugtective.com</a> and follow @Rugtective on X.</p>
]]></content:encoded></item></channel></rss>