Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying  Building Full Stack DeFi Applications
  • Table Of Contents Toc
  • Feedback & Rating feedback
 Building Full Stack DeFi Applications

Building Full Stack DeFi Applications

By : Zhou
4.6 (5)
close
close
 Building Full Stack DeFi Applications

Building Full Stack DeFi Applications

4.6 (5)
By: Zhou

Overview of this book

Enter the world of Decentralized Finance (DeFi) with Building Full Stack DeFi Applications. Understand how this blockchain-based financial technology, designed to manage crypto assets, runs independently without centralized financial institutions like banks and brokerages, eliminating the fees that banks and other financial companies charge for using their services. This book will show you how DeFi solutions are built with smart contracts running on blockchains and how they allow users to gain and earn crypto assets based on the trust of the smart contracts. This book uncovers the inner workings of DeFi by guiding you through the mathematical foundations and teaching you how to build real-world DeFi products with Solidity and JavaScript. As you progress through the chapters, you’ll learn how to implement smart contracts of liquidity pools to trade cryptocurrencies and implement staking, including farming features that allow users to earn. You’ll also find out how to create asset pools that allow users to lend and borrow cryptocurrencies and generate interest. Additionally, you’ll discover how to use Web3 libraries to build the frontend of DeFi products. By the end of this book, you’ll will be well acquainted with popular tools, libraries, and design patterns for implementing a full-stack DeFi application with Web3 and Solidity.
Table of Contents (21 chapters)
close
close
1
Part 1: Introduction to DeFi Application Development
In Progress | 0 / 1 sections completed | 0%
5
Part 2: Design and Implementation of a DeFi Application for Trading Cryptos
In Progress | 0 / 1 sections completed | 0%
6
Chapter 4: Introduction to Decentralized Exchanges
In Progress | 0 / 5 sections completed | 0%
11
Part 3: Building a DeFi Application for Staking and Yield Farming
In Progress | 0 / 1 sections completed | 0%
14
Part 4: Building a Crypto Loan App for Lending and Borrowing
In Progress | 0 / 1 sections completed | 0%
19
Index
In Progress | 0 / 2 sections completed | 0%

Building an on-chain price oracle with cumulative prices

A price oracle is a technology for providing data for smart contracts to access the prices of various assets. Usually, the smart contracts that access the price oracle can call a function to fetch the prices for specific assets. The assets can be cryptocurrencies, fiat currencies, stocks, or futures. Chainlink (https://chain.link/) is one of the most widely used oracles on the market. Figure 13.1 shows a screenshot of the data feed page (https://data.chain.link/feeds/ethereum/mainnet/eth-usd), which shows the ETH price in US dollars.

Figure 13.1 – The data feed page for showing the ETH price in USD on Chainlink

Figure 13.1 – The data feed page for showing the ETH price in USD on Chainlink

The Chainlink price oracle provides manipulation-resistant and robust pricing data for various assets. The feature of manipulation resistance is implemented by aggregating multiple data sources (AKA oracle responses) of prices of the single asset. Figure 13.2 shows the oracle responses...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY