What are smart contracts that Cardano will soon support

Christos Palaskas
3 min readJul 29, 2021

There is a lot of noise regarding smart contracts arriving in the Cardano ecosystem. We hear about the Alonzo hard fork approaching, that Alonzo White is already running successfully on the Testnet. We hear about people betting that the hard fork will not happen before October 1st, although it is scheduled for mid-September. But what are smart contracts and how can they benefit a person or a company?

Let’s say you are company A, and you want to make a deal with another company B. You want 100 tons of ore from them so that you can produce steel. If they deliver the 100 tons by October 1st, company A must pay company B 25,680 ADA. If they are late, you will have to pay less, 5 ADA/ton/day. Also, if the amount of ore delivered is less than the order, you will also pay less, 30 ADA per missing ton from the total order.

That is an agreement, which both parties have to sign and hope that both parties will stand by their word. They can get the document notarized, for more validity, with an officiant, for more validity. If one party does not stand by the terms of the agreement, then the other party can sue them and after a long legal battle might get justified.

With smart contracts there is no need for a validator. There is also no need for an enforcer, like the court described above. All the terms are coded into the smart contract and transmitted to the blockchain. Both parties have a collateral on hold from the smart contract and wait till the execution time to receive the proper amount. The smart contract needs a way to know what happened in the real world, which is the job of an oracle. An API that replies what the status of something is, e.g., the weather, the price of ore, the amount of ore in a company’s warehouse etc. Assuming the contract was coded properly, without disambiguation and that the oracles have a real time update of the real-world status, the smart contract will execute and both parties would be receiving the proper amount.

Let’s try to replay the previous example with the ore, but this time with a smart contract. For the sake of simplicity let’s say that company A submits 25,680 ADA and company B only 10,000 ADA, which is the max penalty they agreed could be paid out. On October 4th, 95 tons of ore were delivered from B to A. The oracle that monitors both warehouses verifies it, and the smart contract executes. It will send 30*5missing tons+5*100tons*3delayd days = 1650 ADA to company A and 25,680–1650penalties+10,000 collateral = 34,030 ADA to company B. There is no way one party can deny now, what they signed on before, no need for lengthy battles in court and no other people/entities involved. The cost of running this contract on the Cardano blockchain? A few cents of the dollar.

If you find this article useful, please consider delegating some ADA to my pool:
ADA Skepsis — ASKP
www.skepsispool.com

--

--

Christos Palaskas

Software Developer Engineer in Test, Blockchain Technologies. Cryptocurrency enthousiast, Cardano Staking Pool Operator. Former monk. Author.