# How to use the Solidity Burn function?

**URL:** https://forum.openzeppelin.com/t/how-to-use-the-solidity-burn-function/29406
**Category:** Smart Contracts
**Tags:** erc20
**Created:** [June 6, 2022, 6:32pm UTC](https://forum.openzeppelin.com/t/how-to-use-the-solidity-burn-function/29406 "2022-06-06T18:32:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mrlupr](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@mrlupr](https://forum.openzeppelin.com/u/mrlupr)
#### Post date: [June 6, 2022, 6:32pm UTC](https://forum.openzeppelin.com/t/how-to-use-the-solidity-burn-function/29406/1 "2022-06-06T18:32:03Z")

</div>

Newbie here,

Can someone explain how to use the Burn function in a solidity contract? I have a token with 1 trillion supply and I would like to burn 1% when necessary. The Function is asking for a amount = uinit256. I am stuck on what the input would be. I have tried entering 10000000000 and it only burns 1 token.

![111](https://us1.discourse-cdn.com/flex022/uploads/zeppelin/original/2X/3/3fa15ed16925903a9f63bfdd5c8c07d39d8bc60e.png)

---

<div class="post-metadata">

### Author: ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)
#### Post date: [June 7, 2022, 12:35am UTC](https://forum.openzeppelin.com/t/how-to-use-the-solidity-burn-function/29406/2 "2022-06-07T00:35:41Z")

</div>

I think almost every tokens has `decimals`, such as the decimals of DAI is 18, the the decimals of USDC is 6, so when we say 1 token, actually the number should be 1 \* 10 \*\* decimals, eg, 1 DAI = 10\*\*18

---

<div class="post-metadata">

### Author: ![0xnabeix](https://avatars.discourse-cdn.com/v4/letter/0/3e96dc/32.png) [@0xnabeix](https://forum.openzeppelin.com/u/0xnabeix)
#### Post date: [June 7, 2022, 8:54am UTC](https://forum.openzeppelin.com/t/how-to-use-the-solidity-burn-function/29406/3 "2022-06-07T08:54:02Z")

</div>

Hi @Skyge  
I hope you are doing well.

Can you let me know your email or phone number ?

---

<div class="post-metadata">

### Author: ![Skyge](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skyge/32/343_2.png) [@Skyge](https://forum.openzeppelin.com/u/Skyge)
#### Post date: [June 7, 2022, 9:01am UTC](https://forum.openzeppelin.com/t/how-to-use-the-solidity-burn-function/29406/4 "2022-06-07T09:01:27Z")

</div>

All conversations should be public and please do not ask different thing in a topic.

---

<div class="post-metadata">

### Author: ![Jagadish\_K](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jagadish_k/32/12420_2.png) [@Jagadish\_K](https://forum.openzeppelin.com/u/Jagadish_K)
#### Post date: [June 7, 2022, 11:00pm UTC](https://forum.openzeppelin.com/t/how-to-use-the-solidity-burn-function/29406/5 "2022-06-07T23:00:39Z")

</div>

Looks like the decimals in your contract is 10 and hence 1 token is burned.  
10000000000 / (10\*\*10) = 1
