# BST Minting and bnUSD Redeeming

The BST token is backed by an increasing amount of [bnUSD](https://balanced.network/stablecoin/).&#x20;

* <mark style="background-color:purple;">All interactions in the Blobble Playground, Orphanage, Market and Finance place are designed to make the amount of bnUSD grow faster than the total supply of BST.</mark>

Minting and Redeeming BST incurs a 5% tax:

* 95% of minted or redeemed BST gets issued to the user
* 4% of minted or redeemed BST gets added to the bnUSD in the treasury
* 1% of minted or redeemed BST goes to the Blobble Foundation (team + marketing)

### BST MINT

<figure><img src="https://1671434509-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfzJnTcpppcTSAlrPYf77%2Fuploads%2Fj9FKyvwwKo20Ocruo5WJ%2Fminter-contract-mint.jpg?alt=media&#x26;token=ec48caab-6103-4b8c-8fc1-de69e9824016" alt=""><figcaption><p>This is what happens when you mint BST</p></figcaption></figure>

*NOTE: In favor of simplification, the above infographic does not contain the Blobble Foundation (team + marketing) allocation.*

`chunksize = 2000`\
`amountOfChunks = bnusdSend / chunksize`\
\
`for amountOfChunks {`\
&#x20;   `1. calucate the price based on bst supply & bnusd in contract`\
&#x20;   `2. get amount of bst to mint based on price - 5% and mint to user`\
&#x20;   `3. mint 1% of amount to team`\
&#x20;   `4. update the amount of bst supply and bnusd in contract`\
`}`\
\
`for remaining bnusd {`\
&#x20;   `1. calucate the price based on bst supply & bnusd in contract`\
&#x20;   `2. get amount of bst to mint based on price - 5% and mint to user`\
&#x20;   `3. mint 1% of amount to team`\
`}`

### **BST REDEEM**

<figure><img src="https://1671434509-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfzJnTcpppcTSAlrPYf77%2Fuploads%2Fpxe3AMO4AOgIVuHTdbvI%2Fminter-contract-redeem.jpg?alt=media&#x26;token=44ef9169-48dd-463b-9a79-19ebc6f3ed00" alt=""><figcaption><p>this is what happens when you use BST to redeem bnusd</p></figcaption></figure>

*NOTE: In favor of simplification, the above infographic does not contain the Blobble Foundation (team + marketing) allocation.*

`chunksize = 2000 // <- bnusd-value`\
`price = bnusd-in-contract / total-supply-bst`\
`tokens = amount-of-tokens-send-by-user`\
\
`bnusdValue = tokens * price`\
\
`while bnusdValue > 2000 {`\
&#x20;   `// amount of bst to handle in this iteration`\
&#x20;   `bstAmount = chunksize / price`\
&#x20;   `bstAmountPostFee = bstAmount * 0.95`\
&#x20;   `bstTeamFee = (bstAmount - bstAmountPostFee) / 5`\
\
&#x20;   `1. burn bstAmount minus bstTeamFee`\
&#x20;   `2. send (bstAmountPostFee * price) in bnusd to user`\
&#x20;   `3. send team fee in bst to team`\
&#x20;   `4. updated price based on new bst supply and bnusd in contract`\
&#x20;   `5. set 'bnusdValue' with updated price`\
`}`\
\
`for remaining bst tokens {`\
&#x20;   `bstAmount = remaining-tokens / price`\
&#x20;   `bstAmountPostFee = bstAmount * 0.95`\
&#x20;   `bstTeamFee = (bstAmount - bstAmountPostFee) / 5`\
\
&#x20;   `1. burn bstAmount minus bstTeamFee`\
&#x20;   `2. send (bstAmountPostFee * price) in bnusd to user`\
&#x20;   `3. send team fee in bst to team`\
`}`
