Skip to content

Commit 98929d3

Browse files
intro
1 parent e46717b commit 98929d3

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

docs/tutorials/oracles/index.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,37 @@
22
title: "Tutorial: Use the Pyth oracle for DeFi applications on Etherlink"
33
---
44

5-
- TODO introduce the tutorial
5+
Etherlink is great for DeFi applications because of its low latency, fast confirmation times, and low fees.
6+
This tutorial shows you how to set up a simple application that gets market information from [Pyth](https://www.pyth.network/) and makes trading decisions based on those prices.
67

7-
- TODO mention that it is an adaptation of the Pyth tutorial for Etherlink here:
8-
https://docs.pyth.network/price-feeds/create-your-first-pyth-app/evm/part-1
8+
Pyth is a network of oracles, which provide information about currency prices and other market data to smart contracts.
9+
As described in [Oracles](https://docs.tezos.com/smart-contracts/oracles) on docs.tezos.com, smart contracts cannot call external APIs, so they depend on oracles for information about the world outside the blockchain.
10+
Smart contracts must call oracles in a specific way and pay fees to use them.
11+
12+
This tutorial is an adaptation of this Pyth tutorial for Etherlink and its sandbox development environment:
13+
https://docs.pyth.network/price-feeds/create-your-first-pyth-app/evm/part-1
14+
15+
## Learning objectives
16+
17+
In this tutorial, you learn how to:
18+
19+
- Start and use the Etherlink sandbox environment
20+
- Call the Pyth DeFi oracle
21+
- Use the Foundry toolkit to build, test, and deploy a smart contract to Etherlink
22+
- Call an oracle from a smart contract
23+
- Call the smart contract from an off-chain application
24+
- Make basic buy and sell decisions based on the information from the oracle
25+
26+
## Tutorial application
27+
28+
The application that you create in this tutorial has an on-chain component in the form of a smart contract deployed to Etherlink.
29+
It also has an off-chain component in the form of a Node.JS application that calls the smart contract.
30+
31+
The code for the completed application is in this GitHub repository: https://github.com/trilitech/tutorial-applications/tree/main/etherlink-defi.
32+
33+
## Tutorial sections
34+
35+
- [Part 1: Setting up a development environment](/tutorials/oracles/environment)
36+
- [Part 2: Getting information from the Pyth oracle](/tutorials/oracles/get_data)
37+
- [Part 3: Using price data to buy and sell tokens](/tutorials/oracles/tokens)
38+
- [Part 4: Automating pricing decisions](/tutorials/oracles/application)

0 commit comments

Comments
 (0)