> For the complete documentation index, see [llms.txt](https://puff-the-dragon.gitbook.io/puff_drgn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://puff-the-dragon.gitbook.io/puff_drgn/puff-university/web3-basics/smart-contracts.md).

# Smart Contracts

**Smart contracts**

Now imagine these highways and flyovers are equipped with add-ons like automated GPS, and automated toll collection. These upgrades are installed with the help of software (coding) to make them smart and programmable. \
\
Similarly, blockchains like Ethereum, Solana, Binance Smart Chain, etc., use code snippets called “smart contracts.” \
\
These smart contracts enable the creation of decentralized protocols and applications, which allow users to transact across the blockchain easily.

<figure><img src="/files/mnmnFxkhzpi9Cx211Q7J" alt=""><figcaption><p>Smart contract details of $PUFF</p></figcaption></figure>

### **Transaction fees**

Now, let’s talk about how these blockchains actually keep the show running. Think of it this way: you must pay toll fees whenever you use these highways and flyovers, right?&#x20;

Similarly, you must pay a transaction fee when you send money through a bank or a third-party app like PayPal.&#x20;

<figure><img src="/files/HtJKNhFtbFWIvGFfINxA" alt=""><figcaption><p>Examples of transaction fees</p></figcaption></figure>

\
Similarly, blockchains also require users to pay "transaction fees" to the network to execute smart contracts and other operations. \
\
These fees compensate the network of nodes (computers) that collectively validate, process, and maintain the blockchain.

<figure><img src="/files/wUp5mWoKup0U0eajvG4J" alt=""><figcaption><p>Transaction fee examples on Rabby and Metamask </p></figcaption></figure>
