BEP-20: The Token Standard Powering BSC Presales
If you've ever bought a token on PancakeSwap, received presale tokens in your MetaMask BNB Chain wallet, or checked a token contract on BscScan, you've interacted with BEP-20. Understanding how this standard works — and what its contract functions reveal about a token's safety — is fundamental knowledge for any BSC presale investor.
BEP-20 vs ERC-20: How Similar Are They?
| Aspect | BEP-20 (BNB Smart Chain) | ERC-20 (Ethereum) |
|---|---|---|
| Function signatures | Identical | Identical |
| Solidity compatibility | Yes — same code compiles | Yes |
| Network | BNB Smart Chain (Chain ID: 56) | Ethereum Mainnet (Chain ID: 1) |
| Gas currency | BNB | ETH |
| Average gas per transfer | $0.05–$0.30 | $2–$30+ |
| Primary DEX | PancakeSwap | Uniswap |
| Block explorer | BscScan.com | Etherscan.io |
| Wallet support | MetaMask, Trust Wallet, etc. | MetaMask, Coinbase Wallet, etc. |
The Core BEP-20 Standard Functions
Mandatory Functions (All BEP-20 Tokens Must Implement)
| Function | What It Does | Why It Matters |
|---|---|---|
| totalSupply() | Returns current total tokens in existence | Track supply; should match whitepaper claims |
| balanceOf(address) | Returns token balance for any address | Verify your wallet received presale tokens |
| transfer(to, amount) | Send tokens from your wallet to another | Basic transfer — where tax logic is often implemented |
| approve(spender, amount) | Grant contract permission to spend your tokens | Required before DEX swaps or DeFi interactions |
| transferFrom(from, to, amount) | Transfer tokens on behalf of approved wallet | Used by DEXs and DeFi protocols |
| allowance(owner, spender) | Shows remaining approved spending limit | Monitor and revoke unnecessary approvals |
Standard Optional Functions
name(): Returns token name (e.g., "Wrapped BNB")symbol(): Returns ticker (e.g., "WBNB")decimals(): Returns decimal precision (standard: 18)
Reading Transfer Tax in BEP-20 Contracts
Transfer taxes are implemented inside the _transfer() internal function. A token with 5% buy and 5% sell tax will show code like:
if (isSell) {
fee = amount * sellFee / 100; // 5% deducted on sells
} else if (isBuy) {
fee = amount * buyFee / 100; // 5% deducted on buys
}
uint256 transferAmount = amount - fee;
The deducted fee is sent to designated wallets (liquidity, marketing, burn). Always locate and read the _transfer function in any BSC token before investing. For a complete guide on interacting with these tokens, see our BSC IDO launchpads guide.
BEP-20 Safety Evaluation Checklist
| Check | How To Verify | Red Flag Outcome |
|---|---|---|
| Source code verified | BscScan Contract tab: green checkmark | Bytecode only, no source |
| Owner address | Read Contract → owner() | Single EOA, not renounced or multisig |
| Mint function | Search source for "mint" | Unrestricted mint without supply cap |
| Pause function | Search source for "pause" | Owner-only pause with no timelock |
| Blacklist function | Search source for "blacklist" | Owner can blacklist any address |
| Tax rates | Read Contract → buyFee, sellFee | Combined tax above 15% |
| Max supply | Read Contract → totalSupply, _maxSupply | No supply cap |
| Liquidity lock | DxLock or Unicrypt search | No LP lock or under 30 days |
Setting Up MetaMask for BEP-20 Tokens
- Open MetaMask → click network selector → "Add Network"
- Add BNB Smart Chain: RPC
https://bsc-dataseed.binance.org, Chain ID56, SymbolBNB - To add a BEP-20 token: "Import Tokens" → paste contract address → auto-fill verifies symbol
- Transfer BNB to your MetaMask BNB Chain address (withdraw from exchange as BEP-20)
For a complete setup walkthrough, see our MetaMask setup guide.
Glossary
- BEP-20
- The fungible token standard on BNB Smart Chain, functionally equivalent to ERC-20 on Ethereum.
- EVM (Ethereum Virtual Machine)
- The computing environment that executes smart contract code — BNB Chain is EVM-compatible, enabling the same Solidity code to run on both networks.
- Decimals
- The number of decimal places a token supports — standard is 18, meaning 1 token = 10^18 smallest units.
- Transfer Tax
- A percentage fee deducted from every token transfer, implemented in the _transfer() function.
- Allowance
- Permission granted to a smart contract to spend tokens from your wallet, tracked by the approve() and allowance() functions.
Disclaimer
This is educational content about BEP-20 token mechanics. Smart contract interaction carries risk — always verify contract addresses from official sources. This is not financial or investment advice.
