October 31, 2024

Smart-Contracts & How they Work

Let’s get to the buttom of this: after ETH rebirth in 2015 smart-contract is the agreement — signable by a human or a programmable entity — enforced by the blockchain. Once signed it is instantly enforced and acted upon for all parties. If you would buy a house via a smart-contract, you get the keys the exact moment dedicated crypto hits the smart-contract address. 

Smart-contracts are the agreement settled on-chain. Now, what kind of agreement? Any: authentication, currency swap, login via WalletConnect, fee deduction, voting & the vote calculation, issuance of new crypto, liquidity management, buy or sell orders, API handling. When you mint NFT it happens after a smart-contract takes crypto for recording a token into a chain of blocks.   

Smart-Contract is the workhorse of blockchain automation, much like we have servers running Linux all around doing meme storage and distribution. If you want something done in the blockchain without touching it by hand — you make a smart-contract. 

Think of it like Youtube — there’s a network of servers to make sure you get that sweep 1080p at high bitrate all around the globe called CDN. Smart-contracts are the same glue to make things happen in blockchain, without them crypto is just digital currency, with them, crypto is the programmable money of the future. 

There’s two types of smart-contracts: 

  • Public; Ones published into the open chain — one that allows to read transaction history, like Ethereum, Solana or Tezos.  
  • Private; Ones, published in the intrachain, like Hedera Hashgraph or private Polkadot parachain; Difference is that they are unreachable by those, who are not registered within said networks. 

Smart-contracts are powerful because they remove middlemen. You don’t need people to run smart-contracts, only to make them. This makes it possible to have «trust» in the «trustless» environment, where everyone is anonymous, like with Uniswap that needs no people to swap crypto for you, only code running in the blockchain.   

Smart-contracts can be trusted. Would you make a deal with the anonymous on the web? What are the guarantees they don’t walk away with your money? In blockchain, smart-contracts is how multiple anonymous individuals settle thousands upon thousands of deals without any of them simply walking away. Why? Because they can’t: every point of risk is controlled by smart-contracts, which hold custody over funds if we talk about currency exnchage or secure votes from being fabricated. 

Here’s a non-exhaustive list of things that run thanks to smart-contract technology: 

  • dApps; 
  • Swap Platforms: Uniswap. 
  • Stacking & Restacking Protocols 
  • Loan Protocols, 
  • Chain-to-Chain Bridges; 
  • On-chain order-matching engine for DEX’es; 
  • DEX’es; 
  • Wallet Auth, also known as Wallet Connect; 
  • Shareable Multisig Wallets; 
  • POS Chains, which exist only thanks to smart-contract tech alone; 
  • DAO’s; 
  • Liquidity Pools;
  • Supply Chains & Logistics; 
  • NFT Royalty Distribution; 

Plot twist — if voting and further election of the official is governed by smart-contracts you get the Algocracy, a tamper-proof government system. Its smaller cousin — DAO, or decentralized autonomous organisation — is basically a corporation on-chain. Thanks to the smart-contract code, DAO’s can be run by multiple anonymous parties at once, worldwide, without restrictions.  

Everybody can review the smart-contract before signing. Remember the fine print in the hefty official documents? Well, fine print for smart-contracts is written in languages like Solidity, Rust or Michelson, so you have to use tools like Etherscan’s copilot AI to read it. Hint — yes, ChatGPT can actually do a code review of the smart-contract. 

Don’t worry, here’s a few headsup

SetApprovalForAll = Bad Time; This is how you can get drained, if you see «Set Approval For All» in the smart-contract prompt before singing it — stop.

If there’s «Blacklist» anywhere in the code — be very aware; This is how scammers don’t let people sell the honeypot tokens.

Here’s an example from the code of the one honeypot token. See the «isBkacklisted[accounts[i]] = excluded»? What it says is «Don’t let users from the blacklist operate a token» in fine print.   

To operate, some smart-contracts might need an Oracle — entity, which provides processed external data. Much like eyes channel visual appeal to the mind, or your skin reports cold or warm. In this context, Oracles consume raw market data, digest it and pass to smart-contracts. Prominent examples — DEX trading protocols, which use Oracle data to define the price of a traded crypto from multiple different sources at once. Say, a DEX takes in data on BTC/USDT price from 1000 of exchange points across the world to adjust the pricing for its own BTC/USDT pair.

Want to get the most out of DeFi? Try NonBank — one NON-ID to pass every KYC out there with a handy Wallet, able to generate multiple accounts at once. Join the public Beta and become one of the first to leverage this new technology to your favour:

https://link.nonbank.io/download

What’s a Rich Text element?

Heading2

Heading3

The rich text element allows you to create and format headings, paragraphs, blockquotes, images, and video all in one place instead of having to add and format them individually. Just double-click and easily create content.

  1. sdfsfd
  2. sdfsdf
  3. sdf
  4. sdf
  • dsfsdfsdf
  • sdfsdfsdf
  • sdfsdfsdf

Static and dynamic content editing

A rich text element can be used with static or dynamic content. For static content, just drop it into any page and begin editing. For dynamic content, add a rich text field to any collection and then connect a rich text element to that field in the settings panel. Voila!

How to customize formatting for each rich text

Headings, paragraphs, blockquotes, figures, images, and figure captions can all be styled after a class is added to the rich text element using the "When inside of" nested selector system.