What Is a Mint Function and Why Is It a Rug Pull Risk?
A mint function is a piece of token contract code that creates new tokens and adds them to total supply. It is a rug pull risk when one wallet can call it without limits, because that wallet can print new tokens, sell them into the liquidity pool and dilute every other holder. Whether minting is safe depends on who controls it and what caps apply. What is a mint function in a token contract? Every token contract keeps a record of total supply and of each wallet's balance. A mint function is the code that increases both. When it runs, new tokens appear at a chosen address and total supply rises by the same amount. Its opposite, a burn function, removes tokens and lowers supply. Minting is not suspicious by itself. Many legitimate designs need it: Staking and reward tokens mint new units to pay participants over time. Bridged or wrapped tokens mint a unit when the original asset is locked elsewhere. Stablecoins mint when users deposit collateral and burn when they redeem. In these...