A use case for oracles on Tezos: calling external contracts with Ligo

Learn how inter-contract invocations work in Ligo

Claude Barde
Coinmonks
Published in
7 min readMay 18, 2020

--

The Tholos of Delphi where the oracle could be consulted

“Oracles” is a buzzword these days in the cryptoverse. Following different attacks on Ethereum platforms involving problems with their oracles (think about what happened with MakerDAO during “Black Thursday” in March), there has been a lot of thinking around how oracles work and how to use them.

We are going to explore what oracles are and most importantly, how you can use them when writing smart contracts with Ligo. At the end of the article, you will have a good understanding of what oracles are and how to communicate with one from your smart contract.

What is an oracle?

In Ancient Greece, it was believed that some people could predict the future or give wise advice because they were inspired by the gods. As such, they were seen as channels through which the gods could talk to the people.

The same analogy can be used to understand what an oracle is in the context of a blockchain: it’s a channel between two different worlds so that they can communicate with each other. The blockchain is a self-contained environment that has no contact with the outside world, except for the transactions that are sent to it. So how can you provide…

--

--

Claude Barde
Coinmonks

Self-taught developer interested in web3 and functional programming