YESswap
English简体中文繁體中文日本語한국어РусскийالعربيةEspañolPortuguêsFrançaisDeutschTiếng ViệtBahasa IndonesiaTürkçe

YES Token Contract Address: Nonce and gas mechanics that decide whether your BSC bot

Updated 2026-12-02 · YESswap

Short answer. A high-frequency sender fails at the signer, not at the strategy. Every claim below can be re-checked on BscScan against the YES token contract at 0xc22955b28e092060bc5d1e1f3b9d4dcd81091111.
Best match for this articleAI quantAutomated strategies and a market-control console for your token.

One wedged nonce halts the whole signer, not one transaction

Knowing how YES token contract address works is what separates a clean trade from a costly one. Underpricing is the usual cause of a wedge. A transaction whose gasPrice or maxFeePerGas sits below what validators will accept stays in the mempool. Every later send from the same wallet queues behind it no matter how much gas it bids. The wallet's next nonce does not advance, so a bot firing fresh nonces is building a chain with a hole at the front.

Measure the hole instead of inferring it. Call eth_getTransactionCount for the signer at the 'pending' block tag and again at 'latest'. The difference is the number of unconfirmed transactions sitting in the queue. Then open the signer on BscScan and confirm that the lowest pending nonce has no matching transaction hash. A missing hash at the front of the queue is the freeze, visible directly.

Two RPC endpoints will disagree on that difference, and the disagreement is itself the signal. A node that has evicted the stuck transaction from its mempool returns a 'pending' count equal to 'latest', while a node that still holds it returns a gap of one or more. If your primary endpoint reports zero queued and your secondary reports a gap, trust the secondary and re-price before the next send. When both agree the queue is empty but a send is still rejected, the fault is local nonce state, not the network.

Replacement or gap-fill: pick by payload validity, not by price

Gap-filling sends a fresh minimal or zero-value transfer at the missing nonce. It consumes a nonce and pays gas for no state change, so it only earns its cost when the original payload has gone stale, for example a swap quote that has drifted past its slippage bound. Decide on payload validity first. Price comes second.

Thin liquidity changes the validity test, not the price test. A swap into a shallow pool can execute at a price far from the quote even when the payload is technically fresh, so a replacement that preserves the payload may land into worse slippage than the gap-fill would have cost. If the pool depth at the quoted price is smaller than your order, treat the payload as stale and gap-fill. If depth exceeds the order, replace.

Timing is bounded by block production, not by your poll interval. A replacement priced above the threshold typically lands within a small number of blocks; a replacement priced at the threshold may sit indefinitely. Poll eth_getTransactionByHash on a fixed interval, count the blocks elapsed since submission, and escalate the bump once that count exceeds your tolerance. Each escalation is a new transaction at the same nonce, so budget gas for the worst case, not the first attempt.

Size gasLimit from receipts, because reserved gas is subtracted at submission

That stacking produces a specific failure. A bot that over-reserves on every send can hit insufficient-funds errors while holding plenty of BNB, because spendable balance is reduced by every outstanding reservation. The fix is a loop, not a constant: read gasUsed from a confirmed transaction of the same shape, then set the limit with a modest margin above it.

Read the numbers off any confirmed receipt. Multiply gasUsed by effectiveGasPrice for the real cost, then compare against gasLimit in the transaction object to see the over-reservation. A BEP-20 transfer of the YES token has a fixed standard cost that is visible in the receipt of any prior transfer of that token, so the margin can be tight.

A missing receipt is not a missing transaction. eth_getTransactionReceipt returns null for a hash the node has seen but not yet indexed, and it returns null forever for a hash that was replaced and dropped. Distinguish the two by calling eth_getTransactionByHash: a non-null transaction with a null receipt is pending, a null transaction with a null receipt is gone. Only the second case justifies resubmitting, and only after confirming the signer's nonce at 'latest' has not already consumed that slot.

Decision rule: if a receipt is still null after the block count you tolerate, re-query the transaction object before acting. If the object is null, the transaction was dropped and the nonce is free. If the object is present, the transaction is queued and the correct action is a replacement, not a resend.

Verify the YES token contract before the first signed transfer

A transfer to an unverified address cannot be reversed. The YES token is a BEP-20 with 18 decimals at 0xc22955b28e092060bc5d1e1f3b9d4dcd81091111, and the fee router is a separate contract at 0x0c9a2351e6e982b16559a68767003e7f4d02fb0d. Hard-code both and refuse to sign a transfer whose to field does not match.

Decimals are a sizing input, not a detail. A strategy that assumes the wrong exponent sends an order off by orders of magnitude. Call decimals(), symbol() and totalSupply() on the token contract through eth_call and compare the returned values against the published specification before any size is routed.

Reconcile after the fact as well. Every transfer emits a Transfer event carrying from, to and value. Match those three fields against the bot's own ledger on BscScan. A one-character drift in a config file or environment variable is the failure this step catches, and it is the failure that costs the most.

The verification is cheap and the failure is not. Three eth_call requests against a public endpoint cost nothing and return before any signing happens, while a transfer to a lookalike address at the same nonce consumes real gas and cannot be recalled. Run the check on every process start, not once at deployment, because environment variables are exactly what drifts between restarts.

Decision rule: if decimals() does not return 18, or symbol() does not match the published ticker, halt the signer and do not route size. If the to field on a prepared transfer does not equal the hard-coded token or router address, drop the transaction before it reaches the signer.

Gate the next send on the receipt, never on the hash

A returned transaction hash proves submission and nothing else. The status field on the receipt is the only authoritative success signal. A transaction can be mined, consume its full gasLimit, and still carry status zero because execution reverted. Bots that advance state on submission burn their nonce budget twice.

Decode the logs against the ABI of the contract you called. For a swap routed through the fee router, confirm the expected event fired rather than a fallback path. A restart is the other place state goes wrong: reloading the nonce from a database instead of calling eth_getTransactionCount at 'pending' resubmits a mined nonce, and every send is rejected as a replacement underpriced until the operator resyncs manually.

Cost accounting closes the loop. A reverted transaction still pays gasUsed at effectiveGasPrice, so a bot that retries on status zero without reading gasUsed is paying twice for the same failed call. Log gasUsed and effectiveGasPrice per attempt, sum them per strategy window, and compare against realized output. A strategy whose reverted-gas total approaches its edge is not viable regardless of hit rate.

Decision rule: if status is zero, do not resend the identical payload at the next nonce. Read the revert reason from the trace, adjust the payload, and only then advance. If status is one but the expected event is absent from logs, treat the call as failed and reconcile against the receipt before the next send. Every claim above is checkable on BscScan for 0xc22955b28e092060bc5d1e1f3b9d4dcd81091111 on BNB Smart Chain (chain id 56); treat https://yesswap.vip and @web3yesswap as the only official channels.

Open YESswap

Frequently asked questions

Why does my BSC transaction stay pending while later ones from the same wallet never appear?

BSC executes per signer in strict nonce order, so a transaction with nonce n cannot be mined before n-1. If n-1 sits underpriced in the mempool, every later send queues behind it regardless of its gas price. Confirm by comparing eth_getTransactionCount at 'pending' and 'latest'.

How much higher must a replacement transaction's gas price be to overwrite the original?

Most BSC nodes enforce a percentage bump over the original bid as the replacement threshold, and the exact figure is node policy rather than protocol. Poll eth_getTransactionByHash on the original until it returns null, then read effectiveGasPrice on the replacement receipt to see what was actually charged.

Can I cancel a stuck transaction without spending the full gas limit?

Submit a replacement at the same nonce with a minimal payload, such as a zero-value transfer to your own address, priced above the replacement threshold. You pay only the gas that minimal execution consumes, and the nonce is consumed so the queue advances.

What is the difference between gasLimit and gasUsed, and which do I budget for?

gasLimit is the declared ceiling and is reserved against your balance at submission. gasUsed is what execution consumed and the remainder is refunded after inclusion. Budget against gasLimit for spendable-balance purposes, and size it from gasUsed on a confirmed transaction of the same shape.

Which RPC method tells me how many unconfirmed transactions are queued behind my next nonce?

eth_getTransactionCount with the 'pending' block tag returns the next nonce including queued sends. Subtract the value returned at 'latest' and the difference is the size of your unconfirmed queue. When two endpoints disagree, trust the one reporting the larger gap and re-price before the next send.

Keep reading

Where do you want to go?

Every card below opens the live product with your own wallet — no signup, no custody.

Go straight to the tool

Everything above is one page away: swap tokens on bsc.

AI quantStake and mineYour wallet signs every step. Nothing is custodied.