# Lesson 4.1: On-Chain Vs. Off-Chain Code

Welcome to Lesson 4.1! In this lesson, you'll learn about the roles and characteristics of on-chain and off-chain code in smart contracts.

{% embed url="<https://youtu.be/pTc_BJby5GU>" %}

{% tabs %}
{% tab title="Learning Objectives" %}
After completing this lesson, you'll be able to:

* Describe the differences between on-chain and off-chain code.
* Identify the advantages and limitations of on-chain and off-chain code.
* Understand the off-chain code compilation process.
* Summarize how to interact with off-chain code using `cardano-cli`.
  {% endtab %}

{% tab title="Additional Resources" %}
To learn more about the topics covered in this lesson, we encourage you to review the following resources:

* [Where is stored off-chain code?](https://cardano.stackexchange.com/questions/2274/where-is-stored-off-chain-code)
* [What's the difference between "on-chain" and "off-chain" in plutus smart contracts?](https://cardano.stackexchange.com/questions/219/whats-the-difference-between-on-chain-and-off-chain-in-plutus-smart-contrac)
  {% endtab %}
  {% endtabs %}

## Collaborate with the Pioneers Community

Remember that you can interact with the participants of the PPP through the [IOG's technical community on Discord](https://discord.gg/inputoutput) by joining the channels under the Plutus Pioneers category.

If during the program you have questions about Plutus, we invite you to share them at [Cardano Stack Exchange (CSE)](https://cardano.stackexchange.com/) by adding the `plutus-pioneer-program` tag to your question. The IOG's Education Team members will monitor these questions to support your learning journey. Whenever you share a question at CSE, you're helping to build up the Cardano and Plutus development knowledge base.

***

This work is licensed under a [Creative Commons Attribution 4.0 International License](http://creativecommons.org/licenses/by/4.0/).

<figure><img src="https://i.creativecommons.org/l/by/4.0/88x31.png" alt="Creative Commons License BY 4.0"><figcaption></figcaption></figure>
