Introduction
What is DeFi?
DeFi is an acronym of Decentralized and Finance:
The word Finance refers to all the traditional financial tools and services that have existed since antiquity, such as buying or selling currencies, transferring, borrowing, lending money, trading, betting, insuring, etc.
The word Decentralized refers to the structure of blockchain and how each protocol runs on a multitude of servers (or nodes) worldwide, guaranteeing peer-to-peer, quick, synchronized, uncensurable, immutable, and non-retractable transactions. Moreover, these transactions are visible, transparent, and auditable by anyone.
Mixing these two allows the re-creation of financial services previously only available through centralized financial entities such as banks, exchanges, insurance companies, etc. Although the DeFi movement started by reproducing the existing centralized financial models in a decentralized manner (i.e. smart contracts copied and reproduced the order book model), it soon shifted to the creation of altogether new opportunities that were available thanks to the decentralized nature of the blockchain (i.e. smart contracts creating automated market markers) and thus things previously impossible in traditional finance.
The objective of DeFi is to create added financial value, that is accessible to everyone, decentralized, instantaneous, transparent, and to cut out the middlemen to execute transactions, create and manage savings, trade, and obtain returns on financial assets without the need for a central authority.
DeFi tools and services are often compared to Money Bricks [1]. Instead of creating an isolated software from the ground up (as banks do), DeFi tools and services usually take advantage of the whole ecosystem in place and integrate themselves within them just like bricks would with each other. For instance, decentralized exchanges (DEXs for short) rely on tokens, stable coins, and oracles, which themselves rely on token standards, smart contracts, and the blockchain consensus. Additionally, we find that DeFi apps built on top of other DeFi apps, e.g., swapping apps, yield farming, lending, insurances, etc., built on top of DEXs. Like bricks, DeFi applications can layer on top of each other and build the foundation needed to create completely decentralized financial ecosystems — cutting out the middle man (banks, insurance companies, etc.) to reduce the costs and make services more inclusive.
FIGURE 1: Illustration of DeFi as Money Bricks (in no particular order).DeFi on Mavryk
In this module, we are going to learn more about the main areas where DeFi has been revolutionizing finance [2] and what solutions have been or are currently being developed on Mavryk. Mainly:
Token Standards: Tokens represent a way of exchanging value, e.g., money, collectables, tokenized assets. A token standard ensures that all the smart contracts implementing it are compatible with the ecosystem (e.g. a wallet compatible with a token standard can work with all the tokens implementing this standard).
On Mavryk: The latest token standard is FA2 (standing for Financial Application 2), and it supports a wide range of token types: fungible, non-fungible, non-transferable, as well as multi-asset contracts.
Decentralized Exchanges: This exchange refers to ones that enable the trading of various digital assets in a peer-to-peer form. This form bypasses the need for an intermediary or a centralized, single party.
On Mavryk: You can trade mav and related FA2 supported assets on Maven Finance.
Wrapped Assets: A wrapped asset allows the trading and exchange of an asset between different blockchain network. For instance, you cannot trade native BTC on Mavryk. However, it is possible to wrap BTC into an FA2 token (such as wBTC) that is stable in price with to BTC, and always exchangeable back to a BTC, and fully compatible with all the tools and smart contracts using FA2 on the Mavryk network.
On Mavryk: We've seen the addition of Wrapped MVRK (wMVRK), Wrapped Bitcoin (wBTC).
Cross-Chain Swaps: A cross-chain swap (also referred to as an Atomic Swap) refers to the action of exchanging tokens from two different blockchains in a peer-to-peer fashion without using a third party. This is possible thanks to the ability of code locking mechanisms known as Hash Time Locked Contracts (HTLCs) into blockchain transactions.
On Mavryk: Mavryk Bridge enables cross-chain swaps between Ethereum and Mavryk.
On-Chain Oracles: By default, a Mavryk smart contract cannot receive any data from outside the blockchain. Oracles, therefore, offers to receive data from off-chain sources and make it available on-chain. Information such as token price and much more can be obtained. Trust can be guaranteed through the amalgamation of multiple sources.
On Mavryk: Maven Finance oracles provide this service.
Stablecoins: A stablecoin is a cryptocurrency whose price is fixed to another asset. Most stablecoins are pegged (fixed) to fiat currencies (currencies issued by a central bank) like the US Dollar.
On Mavryk: Several stable coins are available, among which Tether USDT.
Lending protocol: Loans allow you to borrow or lend tokens to someone in exchange for interests.
On Mavryk: Maven Finance is a lending/borrowing protocol recently launched on Mavryk's Atlasnet.
References
[1][The building blocks of decentralized exchange (DEX) explained](https://medium.com/coinmonks/the-building-blocks-of-decentralized-exchanges-on-defi-explained-5cd6756bd3e9).