English module on
Blockchain Architecture
Powered by Zft
Powered by likha

Application Layer

Co-written by Raphael Bustamante, James de Jesus, and Gabriel Paningbatan
Key Takeaways
  • The Application layer is where different programs and applications with varying use cases emerge. 
  • Some examples of applications include crypto wallets, decentralized apps (dApps), user interfaces (UI) and user experiences (UX), and smart contracts.
  • The Execution layer is a sublayer of the application layer where instructions from the application layer are executed among every node in the network.

In the ever-revolving realm of Web3, a fascinating array of components come together to shape the digital landscape. 

At the heart of it all lies the Application layer, where crypto wallets, decentralized applications (dApps), user interfaces, and smart contracts, all operating on the Application layer converged to create a dynamic ecosystem. Let’s take a closer look at some components that define this layer. 

Crypto Wallets

Crypto wallets serve as your digital address in the Web3 universe. Anyone who wants to interact with blockchain applications needs a crypto wallet..

These tools allow you to securely store, manage, and transact with cryptocurrencies and NFTs. There are two primary types of crypto wallets:

  1. Cold Wallets

These offline wallets, such as paper wallets and hardware wallets, are ideal for long-term crypto and NFT storage. They remain disconnected from the internet, safeguarding your assets from potential malware, links to phishing sites, or password-stealing apps. 

  • Paper wallets – These are physical slips of paper where you write down your public and private keys. Given its nature that’s susceptible to theft and compromise, it’s important to remember to store this information in a safe place to prevent unauthorized access. 

  • Hardware wallets – These USB devices store your public and private keys. In order to use it, you need to plug it into a device that’s connected to the internet, like your smartphone or laptop. The contents of the wallet can be accessed through the device screen.  

Every transaction within your crypto wallet requires you to digitally sign using your private keys. Worry not, it all takes place within the wallet albeit the blockchain, so your keys remain safe within the device. Hardware wallets are protected by a security pin for added safety. 

Remember, a cold wallet can only be accessed if the device is physically present. If stolen, the thief has to bypass the security pin to access the private keys. This is why crypto investors usually prefer cold wallets for long-term storage of assets. 

  1. Hot Wallets

Also known as software wallets, hot wallets like Metamask and Phantom are accessible via apps or browsers, as long as your smartphone or computer is connected to the internet. With this kind of wallet, you don’t have to carry around a physical device so it’s more convenient for day-to-day use.Because of this, they are often preferred by beginners. 

However, hot wallets are more vulnerable to cyber attacks due to their constant internet connectivity. The signing of transactions takes place online, so private keys are more exposed to password-stealing malware, phishing scams,  and other online threats. Besides this, hot wallets usually do not have an additional security layer as protection against malicious apps and sites.

Considering all these factors, hot wallets are preferred for short-term storage of crypto assets – convenience-wise However, its online nature exposes private keys to potential risks, so it’s recommended to transfer large amounts of crypto to hardware wallets for long-term storage.  

If you want to refresh your mind as to how the two types of wallet differ, here’s a summary for you! 

The next component of the application layer is what we call decentralized applications, or dApps. While crypto wallets serve as the gatekeepers of your digital wealth, the next component that we’re going to explore enhances the utility of cryptocurrencies and contributes to the broader adoption of blockchain technology – the decentralized applications.

dApps

Decentralized applications are open-source software applications running on the blockchain. These include crypto wallets and exchanges, NFT marketplaces, and Web3 gaming apps. dApps work by using smart contracts, or special programs designed to execute a set of instructions. (We’ll explain how smart contracts work in the future.)

Benefits

Unlike centralized platforms like Facebook or Instagram, dApps aren’t owned and/or managed by a single company. Instead, they operate through a huge network of computers and other devices, as decentralization proves to have several benefits: 

  • Flexibility - dApps span a wide range of use cases, from decentralized social networks, to gaming applications, financial services, and many more. Really, their existence and application in the real world is only limited to a developer’s imagination, which is why their potential to revolutionize diverse industries from Fintech to agriculture and beyond, knows no bounds.
  • Accessibility - Unlike traditional applications, dApps often require no monthly subscription fee for access to their full features. For added security, however, some dApps may require identity verification through Know-Your-Customer procedures, documentation, or IDs. This is standard practice when finances are involved, typically at no extra cost to users. 
  • User Data Protection - Since dApps lack a central authority, user data cannot be owned, controlled, or sold by any platform. Instead, this data is securely stored on the blockchain giving users control over their information.
  • No Downtimes - DApps run on a huge network of devices that make up the blockchain, without reliance on a single hosting server. It is a good thing as it eliminates downtimes and restrictions. 

Limitations

However, as much as they appear beneficial, they also have their fair share of downsides that can affect the overall user experience.

  • Costs Involved - When conducting transactions on the  blockchain, you will encounter transaction fees, often referred to as “gas.” On Ethereum, for instance, when a high volume of transactions is waiting to be processed, users must pay high gas fees to avoid delay. Depending on network demand, gas fees can range from a few pesos to over a hundred dollars. Unfortunately, the only way to avoid high fees is to wait for the network to become less congested, which can take hours or even days.
  • Security Concerns - Another drawback of dApps is that since the source code is open to the public, hackers have more opportunities to identify vulnerabilities and exploit them. This can lead to dApps becoming compromised with malware or being connected to phishing schemes, posing risks to unsuspecting users’  private keys.
  • Design Challenges - As of writing, many dApps are still a work in progress when it comes to design and user experience. Some of their common issues include: confusing user interfaces, limited features, lack of integration with other apps or websites, slower loading speed, and high frequency of errors.  Additionally, making updates to dApp code can be more difficult, which means that bugs present in newly-released dApps may take longer to resolve, potentially causing frustrations for first-time users. 

The next two parts of the application layer have to do with how the user interacts with the blockchain and its applications.

User Interface and User Experience

  1. User Interface (UI)

The user interface serves as the bridge between the users and the blockchain. It includes both the hardware (e.g., Bitcoin ATMs,USB wallets), and software (e.g., DeFi apps, social media platforms) components for data input, receipt, and transfer. 

  1. User Experience (UX)

User experience, on the other hand, is essential when designing blockchain-based applications. A poor UX can deter users due to software glitches, unattractive design, poor text rendering, slow loading speed, lack of compatibility with device screens, unclear instructions, and confusing controls.For example, if the dApp you are currently using is full of bugs and often crashes, or if an NFT marketplace does not support popular wallets, the inconvenience will discourage you from utilizing them.On the aesthetic side, if the design is not visually appealing or instructions are grammatically incorrect, the application may appear less trustworthy. Therefore, optimizing the UI and UX is essential for ensuring a positive user experience.

Smart Contracts

Smart contracts are self-executing programs that automate actions based on predefined conditions. 

They operate much like  vending machines in the sense that if you provide what the machine requires, it automatically performs the action it was programmed to do. In order to understand this a bit better, imagine a vending machine with the following items:

Chips: A: $10, Soda: B: $5, Crackers: C: $3, Candy: D: 2$

If you insert $5 and then press B, the machine will dispense a can of soda. Then your friend inserts $3 and then presses C, the machine will give out a bag of crackers. And the kid next to your friend tries to insert $1, however, nothing is coming out. Why? Because $1 is not part of any conditions. 

The same goes for the intended purchase of an NFT. Smart contracts require a wallet to have sufficient balance for the transaction to push through. If by chance, it detects insufficient funds, the transaction will automatically be canceled. 

 With that, smart contracts have the potential to revolutionize multiple industries due to the the following properties:

  • Trustless – Parties do not need to know and trust each other for smart contracts to work.
  • Efficiency – Smart contracts do not require additional manpower to implement and audit them.
  • Accuracy – No human error can be involved as the contracts execute transactions exactly as specified in their code.
  • Immutability – Transactions can't be reversed, so it is impossible to secretly change terms of an agreement or total billing by editing the records behind your back and vice versa. 

Use Cases of Smart Contracts

  • For Minting NFTs

Smart contracts play a crucial role in the world of NFTs. Whether it’s a picture or video, NFTs are unique digital assets linked to a smart contract. All the behaviors, characteristics, and utilities of an NFT, including total supply and creator’s royalties, are specified in the smart contract. When NFT is minted on the blockchain, it automatically inherits these features.

For instance, imagine an NFT project featuring endangered Philippine species. The smart contract could dictate that out of 100 NFTs, 1% should represent Philippine tarsiers, 5% should be Philippine eagles, and 3% should be tamaraws. This ensures that the project cannot mint 20 Philippine eagle NFTs because the smart contract does not authorize it to do so. Nor can there be over 100 NFTs in total, because the smart contract will exactly execute what is written in its code. 

Smart contracts provide a transparent way to verify NFT ownership ang authenticity. If you own an NFT and want to confirm its legitimacy, you can do so by inspecting the associated smart contract. Even if visually identical NFT appears on the market, it’s the unique smart contract that sets them apart. In essence, while the visual aspect of NFTs may seem indistinguishable, it’s the embedded smart contract that truly makes NFT one-of-a-kind, and what allows holders to prove ownership rights over their tokens.

  • For Transferring Digital Assets

Picture this: You’re browsing an NFT marketplace, and you find that perfect digital artwork you want to own. Once you confirm the transaction, the smart contract immediately checks your wallet to ensure you have sufficient cryptocurrency to cover the NFT’s cost and the gas fee. If all the necessary conditions within the smart contract are met, and the network is not congested, the contract takes care of everything. It purchases the NFT and transfers it to your wallet.

Since NFTs can also represent real-world assets, like paintings, documents, and even real estate properties, smart contracts serve as the digital bridge that enables transfers of both digital and physical assets.   

  • For DApps

Think of dApps as the engines driving decentralized systems, and at their core, you’ll find smart contracts doing the heavy lifting. Instead of a company managing software operations, dApps rely on smart contracts to handle tasks like gathering user data and executing transactions.

Let’s break it down with a real-world use case: Imagine a scenario where government aid needs to reach remote areas after a calamity. If a farmer loses his harvest because of the storm, he may apply for financial aid using a decentralized application. Normally, the process can take days or even months. The smart contract automates the process, ensuring that the funds are sent directly to the farmer without the need for third-party permission.

  • For DAOs

So, what exactly is DAO? A Decentralized Autonomous Organizations (DAO) is an organization that does not have centralized leadership. Instead, DAO members cast their votes to decide on which projects to undertake next, how to allocate the organization’s funds,token distribution strategies, introducing rewards for token holders, and more. To do this, a DAO uses smart contracts to implement the results of the majority vote. They assist with: 

Governance - allowing members to vote on fund allocation, organizational changes, etc.

Rule enforcement - preventing actions that do not comply with the guidelines and penalizing violators

Asset management - handling the transfer and allocation of tokenized assets such as crypto and NFTs

Crowdfunding and revenue sharing - managing contributions to the treasury and distributing profits among members

  • For Gaming

Smart contracts can also specify ownership and features of NFT-based gaming assets, such as characters and items in a blockchain-powered game. They’re used for:

Asset trading - enabling peer-to-peer trading of gaming assets without the need for centralized intermediaries

Immutable rules - coding mechanics in the game to avoid alteration or manipulation of the rules

Rewards - automatically rewarding players for completing quests and earning achievements

Payments - managing gaming subscriptions and in-game purchases

The potential of smart contracts is incredibly exciting, and we’re only scratching the surface of what they can do. Their range and variety are limited only by human creativity as they already have the potential to revolutionize various industries with automated transactions, increased efficiency, and elimination of human error that often arise from intermediaries. As technology evolves and innovators continue to explore their capabilities, we can look forward to even groundbreaking applications that will shape the way we conduct business and interact with the digital world. 

Now, we’re down to the final component of the Application Layer called the Execution Layer.

The Execution Layer

The execution layer is a sublayer of the application layer. This is where instructions from the application layer are executed among every node in the network. It maintains the whole blockchain by ensuring that all the nodes of the blockchain remain consistent meaning the information recorded in every node stays the same, with no discrepancies. The execution layer consists of chaincode, smart contracts, and the underlying rules of the blockchain. 

While applications empower users with innovative functionalities, there’s a component of the blockchain ecosystem that plays a pivotal role in safeguarding the digital assets that flow within this decentralized landscape – custody. And we’ll delve more into this in the next module!  

ZFT is home for the new gen of Wealth Builders.

Learn how to trade with ZFT →

Think you've mastered "

Application Layer

" now?

Take the quiz!