無知

갈 길이 먼 공부 일기

기술 공부/블록체인

스마트 컨트랙트 (8) | DApp

moozii 2022. 4. 30. 11:49

 

[디지털피디아] 디앱(Dapp) https://news.nate.com/view/20210218n24791

 

 

1. David Johnston이 정의한 Dapp

 

Everything that can be decentralized, will be decentralized.

David A. Johnston, JOHNSTON'S LAW
http://www.johnstonslaw.org/

 

 

A. DApp 정의 )   " DApp은 컴퓨터 프로그램의 종류"

(1) 어플리케이션은 오픈 소스이고, 자율적으로 운영되며, 토큰을 과반 이상 점유하는 세력이 없어야 한다.

(2) 알고리즘을 기반으로 토큰을 생성해 어플리케이션의 사용 및 보상 지급에 활용한다.

(3) 어플리케이션의 개선 목적으로 다수결에 따라 프로토콜의 변경을 결정한다. 

 

- DApp = 컴퓨터 프로그램

- 토큰 = DApp 프로그램 사용 수단. DApp 사용자 참여 활성화를 위한 인센티브 역할. 

- 토큰 가치 = 소프트웨어 가치

 

토큰을 화폐가 아닌 소프트웨어적 관점에서 바라보는 이유 - 비트코인의 사례

* 화폐로 볼 경우, 화폐 주조 권한을 가진 레거시 정부와의 대립 발생
* 화폐로 볼 경우, 토큰의 가치 평가가 어려움

 

토큰을 화폐가 아닌 배당으로 바라보는 경우 - Dan Larimer의 관점

* 암호화폐, 토큰은 탈중앙화 자율기업(Decentralized Autonomous corporation)의 지분
* 회사의 운영 규칙 = 탈중앙화 자율 기업의 소스코드
* 탈중앙화 자율 기업 운영 목적 = 주주 배당
* 토큰을 소유하면 지분 배당금을 수익으로 얻을 수 있다는 관점

비탈릭 부테린의 제안 : DAO, 기업 의사결정의 프로그램화 및 자동화

참고: 스마트 컨트랙트 (4) | 이더리움, DAO
참고_2 : The Hidden Costs of Bitcoin by Daniel Larimer, co-founder Invictus Innovations, Inc

 

업데이트 된 DApp의 정의

(1) 어플리케이션은 오픈 소스이고, 자율적으로 운영되며, 토큰을 과반 이상 점유하는 세력이 없어야 한다. 어플리케이션의 개선 목적으로 다수결에 따라 프로토콜의 변경을 결정한다. 
(2) 데이터 및 운영 기록은 공개되고, 분산된 블록체인에 암호화되어 저장되어야 한다. 
(3) 암호화폐 토큰을 애플리케이션 사용 및 보상 목적으로 활용한다.
(4) 작업증명과 같이, 애플리케이션 기여 노드에 대한 기여분 증명 역할을 수행하는 표준 암호화 알고리즘에 따라 토큰을 생성한다. 
Definition of a Dapp

For an application to be considered a Dapp (pronounced Dee-app, similar to Email) it must meet the following criteria:

1. The application must be completely open-source, it must operate autonomously, and with no entity controlling the majority of its tokens. The application may adapt its protocol in response to proposed improvements and market feedback but all changes must be decided by consensus of its users.

2. The application's data and records of operation must be cryptographically stored in a public, decentralized blockchain in order to avoid any central points of failure.

3. The application must use a cryptographic token (bitcoin or a token native to its system) which is necessary for access to the application and any contribution of value from (miners / farmers) should be rewarded in the application’s tokens.

4. The application must generate tokens according to a standard crytptographic algorithm acting as a proof of the value nodes are contributing to the application (Bitcoin uses the Proof of Work Algorithm).


The General Theory of Decentralized Applications, Dapps
Authors: David Johnston, Sam Onat Yilmaz, Jeremy Kandah, Nikos Bentenitis, Farzad Hashemi, Ron Gross, Shawn Wilkinson and Steven Mason
https://github.com/DavidJohnstonCEO/DecentralizedApplications 
 

GitHub - DavidJohnstonCEO/DecentralizedApplications: Decentralized Applications White Paper and Spec

Decentralized Applications White Paper and Spec. Contribute to DavidJohnstonCEO/DecentralizedApplications development by creating an account on GitHub.

github.com

 

 

 

B. DApp 유형 ) "레거시의 SW환경과 유사한 3단계 접근"

Type_1 : 자체 블록체인을 보유한 DApp (레거시의 운영체제와 유사. 비트코인, 이더리움 등)

Type_2 : 다른 블록체인 기반의 독자적인 프로토콜 DApp (레거시의 일반 소프트웨어와 유사. 마스터코인, 크립토키티 등)

Type_3 : 다른 프로토콜 기반의 새로운 프로토콜 DApp (레거시의 소프트웨어 내 플러그인 등과 유사)

 

Type I decentralized applications have their own block chain. Bitcoin is the most famous example of a type I decentralized application but Litecoin and other “alt-coins” are of the same type.

Type II decentralized applications use the block chain of a type I decentralized application. Type II decentralized applications are protocols and have tokens that are necessary for their function. The Omni Protocol is an example of a type II decentralized application.

Type III decentralized applications use the protocol of a type II decentralized application. Type III decentralized applications are protocols and have tokens that are necessary for their function. For example the SAFE Network that uses the Omni Protocol to issue ‘safecoins’ that can be used to acquire distributed file storage is an example of a type III decentralized application.


Classification of Dapps, The General Theory of Decentralized Applications, Dapps
Authors: David Johnston, Sam Onat Yilmaz, Jeremy Kandah, Nikos Bentenitis, Farzad Hashemi, Ron Gross, Shawn Wilkinson and Steven Mason
https://github.com/DavidJohnstonCEO/DecentralizedApplications 

 

 

 

C. DApp 개발 단계 ) "백서 - 토큰 배분 - 지분 희석"

(1) 백서 작성 : 프로토콜, 특징, 구현 방식, 토큰 배분 방식 등을 정의. 커뮤니티 피드백을 받아 지지 확보. 

(2) 초기 토큰 배분 : 소프트웨어 배포를 통한 채굴 개시 혹은 펀드레이징을 통한 초기 코인 배분. 

(3) 확산 : 마련된 기금 기반 DApp 구현 + 사용자 확산에 따른 토큰 배포 확대

 

Formation and development of a Dapp
Development of decentralized applications takes place in three steps.

Step 1: A whitepaper is published describing the Dapp and its features
As in the case of Bitcoin, the most common way by which a Dapp takes form is by the public release of a whitepaper that describes the protocol, its features, and its implementation. After the public release, feedback from the community is necessary for the further development of the DA.

Step 2: Initial tokens are distributed
If the Dapp is using the mining mechanism to distribute its tokens, a reference software program is released so that it can be used for mining. In the case of Bitcoin, a reference software program was released and the initial transaction block was created.
If the Dapp is using the fund-raising mechanism, a wallet software becomes available to the stakeholders of the Dapp, so that they can exchange the tokens of the DA. In the case of Mastercoin, an Exodus fund-raising address and a wallet script were publicly released.
If the Dapp is using the development mechanism, a bounty system is put in place that allows the suggestion of tasks to be performed, the tracking of the people who are working on those tasks and the criteria by which bounties can be awarded.

Step 3: The ownership stake of the Dapp is spread
As tokens from mining, fund-raising and collaboration are distributed to a greater number of participants, the ownership of the Dapp becomes less and less centralized and participants that held a majority stake at earlier have less and less control. As the Dapp matures, participants with more diverse skills are incentivized to make valuable contributions, and the ownership of the Dapp is distributed further. Through market forces the tokens of a Dapp are transferred to those who value it the most. Those individuals then can contribute to the development of the Dapp in the areas that they have an expertise.
The case of Bitcoin illustrates the point. By some estimates, Satoshi Nakamoto mined many of the first 1,000,000 bitcoins. As developers contributed code to Bitcoin and miners contributed computational power to the Bitcoin network, the market began to value bitcoins more highly. As the system matured even more, people with diverse skills started valuing Bitcoin and contributing to its development. Now that more than 12 million bitcoins are in circulation and Satoshi Nakamoto’s high original ownership stake has been diluted.


Formation and development of a Dapp, The General Theory of Decentralized Applications, Dapps
Authors: David Johnston, Sam Onat Yilmaz, Jeremy Kandah, Nikos Bentenitis, Farzad Hashemi, Ron Gross, Shawn Wilkinson and Steven Mason
https://github.com/DavidJohnstonCEO/DecentralizedApplications 

 

 

 

 

 

 

 

2. DApp Examples

 

(1) Decentralized Data & Storage

* P2P 파일 공유 시스템 : 분산 해시 테이블 기술을 기반으로 데이터를 분산해 저장하고, P2P 네트워크 상의 데이터를 빠르게 검색 가능한 시스템. (비트 토렌트 등)

* 데이터의 탈중앙화 사례인 IPFS는 블록체인 분야에서의 P2P 파일 공유 시스템 구현과 같다. 

* 중앙의 서버 대신 분산된 파일 시스템 제공이 특징

 

IPFS와 파일코인

- 효율적이고 안전하고 공개된 웹을 지향 (과거 집중화된 서버 기반의 비효율성, 검열의 용이성 등을 지양)
- 데이터는 IPFS에 저장하고, 그 데이터의 해시 주소를 블록체인에 저장해 효율성을 꾀함
- IPFS 노드 실행을 통해 디스크 공간을 제공하는 사용자들에게 파일코인 프로젝트와 같은 토큰 보상 프로그램을 운영

IPFS(아이피에프에스)는 "InterPlanetary File System"의 약자로서, 분산형 파일 시스템에 데이터를 저장하고 인터넷으로 공유하기 위한 프로토콜이다. 냅스터, 토렌트(Torrent) 등 P2P 방식으로 대용량 파일과 데이터를 공유하기 위해 사용한다.
(출처: 해시위키)


파일코인(Filecoin, 文件币)은 IPFS 기술을 사용하여 탈중앙 분산형 클라우드 시스템을 구현하기 위한 암호화폐이다. 파일코인 사용자는 다른 사용자 컴퓨터의 남는 하드디스크 공간을 활용해 파일을 저장하고 열람할 수 있다. 파일코인은 후안 베넷(Juan Benet)이 설립한 프로토콜랩스(Protocol Labs)가 개발했다. 파일코인은 2017년 8월 10일 ICO를 시작한지 1개월만에 2억 5,700만 달러(약 2,800억원)이 넘는 투자 자금을 모았다. 이것은 당시로서는 ICO 역사상 가장 큰 액수에 해당한다. 
(출처: 해시위키)

Protocol Labs is an open-source research, development, and deployment laboratory. Our projects include IPFS, Filecoin, libp2p, and many more. We aim to make human existence orders of magnitude better through technology.
https://protocol.ai/about/ 

 

이더리움 기반의 swarm

Swarm is a decentralised storage and communication system for a sovereign digital society. Swarm is a system of peer-to-peer networked nodes that create a decentralised storage and communication service. The system is economically self-sustaining due to a built-in incentive system enforced through smart contracts on the Ethereum blockchain.
https://www.ethswarm.org/ 

Swarm is a peer-to-peer network of nodes that collectively provide a decentralised storage and communication service. This system is economically self-sustaining due to a built-in incentive system which is enforced through smart contracts on the Ethereum blockchain and powered by the BZZ token. In this paper, we first introduce Swarm’s network layer that implements a distributed archive of fixed sized data units. Next we describe high level functionality provided by the API which renders Swarm a viable development stack and deployment environment for the decentralised web.

SWARM: storage and communication infrastructure for a self-sovereign digital society
Authored by the Swarm team
v1.0 of June 13, 2021
https://www.ethswarm.org/swarm-whitepaper.pdf

 

Storj, 드랍박스의 탈중앙화 버전

- 사용자가 본인의 스토리지를 임대하고 그 사용 대가로 암호화폐를 받는 프로젝트
- 분산화된 클라우드 스토리지를 지향

스토리지코인(Storjcoin)은 탈중앙 분산형 클라우드 저장 플랫폼을 기반으로 하는 암호화폐이다. 스토리지코인의 티커는 SJCX이다. 스토리지코인 사용자는 다른 사용자 컴퓨터의 남는 하드디스크 공간을 활용해 파일을 저장하고 열람할 수 있다. (...) 스토리지는 블록체인 기술을 적용한 분산화 클라우드 플랫폼으로 나머지의 하드디스크 용량을 보유한 이용자가 이를 필요로 하는 사람들에게 제공하고 그에 대한 대가로 코인을 보상받는 체계를 구축하였다. 스토리지의 클라우드 스토리지 서비스는 기존의 중앙 통제 장치를 기반으로 제공되는 클라우드 서비스 방식을 블록체인 기술로 대체함으로써 개인 정보 보호 및 데이터 제어를 크게 향상할 뿐만 아니라 대부분의 전통적인 데이터 오류 발생을 최소화할 수 있다. (...) 스토리지코인은 샤딩 기술을 활용한다. 샤딩 기술은 네트워크 내 사용되는 암호화 기술로 파일들을 암호화시킨 후 이 암호화된 파일을 여러 가지 샤드로 나눠서 보관하는 기술이다. (...) 스토리지는 분산 해시 테이블(DHT)인 카뎀리아(Kademlia)를 기반으로 한다. 
(출처: 해시위키)


With Storj DCS (Decentralized Cloud Storage) files aren’t stored in centralized data centers— instead, they're encrypted, split into pieces, and distributed on a global cloud network.
1. Objects are encrypted. Storj DCS (Decentralized Cloud Storage) automatically encrypts all files before being uploaded--your data is only in your hands and those you share it with.
2. Encrypted objects are split into smaller pieces. After being encrypted, each object is split into pieces that are indistinguishable from any other object’s pieces—this also gives your data constant availability.
3. Object pieces are globally distributed. Pieces of an object are then individually stored over a global network of Storage Nodes. An object is never in one place, outages, downtime, and data breaches are a thing of the past.
4. Objects are retrieved when you need them. When you retrieve an object, only 29 of its 80 pieces are needed to reconstitute that object. With no central point of failure, your data is always quickly available, all over the world.
https://www.storj.io/how-it-works 

 

Maidsafe

- 사용자들이 저장공간 및 컴퓨팅 파워를 거래하는 블록체인 기반 플랫폼

메이드세이프코인(MaidSafe Coin)은 분산 클라우드 시스템을 위한 암호화폐이다. 메이드세이프코인은 개인이 가진 중요한 문서 파일을 잘게 조각내어 인터넷에 연결된 여러 컴퓨터에 분산하여 저장하고 관리하는 시스템이다. 2006년 스코틀랜드의 데이비드 어바인(David Irvine)이 처음 시작했고, 2014년 메이드세이프코인을 발행했다. 메이드세이프코인의 화폐 단위는 MAID(메이드)이다. 세이프 네트워크에 접속된 사용자들은 여분의 컴퓨터 자원을 다른 사용자와 공유하고 그 보상으로 세이프코인을 받을 수 있다. 두 종류의 암호화폐가 존재하는데, 세이프코인(Safecoin)은 네트워크를 통해 개인의 컴퓨팅 자원을 공유한 참가자에게 지급하는 보상용 암호화폐이고, 메이드세이프코인(MAID)은 암호화폐 거래소에서 실시간으로 거래할 수 있는 암호화폐이다.
(출처: 해시위키)

If you don’t understand what a new decentralised web might mean, you’re far from alone. But once the benefits of a new web built on the Safe Network become clear—permanent data, never again stored by untrustworthy and hackable third parties that you alone can access at any time from anywhere around the globe—the value becomes clearer. There’s a huge amount of work required to build a system that can deliver on such promises. So to get you started, here’s a few pointers about some of the technology that lies under the hood.
Pay once, securely store forever - You're likely to want to store data on the Network. Why? Because in return for a very small one-time payment, your data will then be stored forever, encrypted and accessible anywhere in the world and only by you—unless you choose to share it.
The Web hosted by everyone, controlled by no-one - With no centralised storage, data is instead stored in Nodes. People download free software to their home computers which tells the Network that they’re happy to take part. By providing storage and bandwidth to support the Network, you can be rewarded and earn Safe Network tokens: the cryptocurrency that powers the Network.
Anatomy of an Autonomous Network - The Safe Network is self-managing. It manages how computers can act on the Network in real-time, changing roles and responsibilities dynamically in response to real-time changes without any input from humans or businesses.
https://safenetwork.tech/how-it-works/ 

 

 

 

(2) Decentralized Identity

* 기존 신원 관리는 중앙화된 정부에 의해 집행되어, 전쟁 / 난민 발생 / 규제 사각지대 발생에 따른 한계 존재

* 타인에 의한 신원 증명이 아닌, 개인 스스로가 주체가 되는 "자기 주권" 형태

* 블록체인 상 다른 서비스 혹은 객체와 무관히 개인이 본인 신분을 증명

* 공개키를 통해 자신의 신분을 대신하고, 비밀 키를 통해 신분을 증명

 

Decentralized identity using blockchain
Deepak Gupta @dip_ak, Venture Beat, March 5, 2022 


A centralized system makes user identity data extremely prone to cyberattacks and privacy breaches. But decentralized identity solutions provide a new horizon by enabling users and service providers to have better authority over their identity and personal data.

Decentralized identity is based on a trust framework for identity management. It allows users to generate and control their own digital identity without depending on a specific service provider.

The setup of decentralized identity with blockchain typically consists of the following elements:
* Identity Wallet: An app that allows users to create their decentralized identity and manage their access to service providers.
* Identity Owner: A user who creates their decentralized identity using the identity wallet.
* Issuer/Verifier: The person who issues and verifies the identity information. They sign the transaction with their private key.
* Service Providers: Applications that accept the authentication using the decentralized identity and access blockchain/distributed ledger to look for the DID that user shared.
* Blockchain/Distributed Ledger: A decentralized and distributed ledger that provides the mechanism and features for DIDs and functioning.
* DID (Decentralized Identifier): A unique identifier that contains details such as the public key, verification information, service endpoints.

In a decentralized form of identity, an application (an identity wallet) allows users to create their own digital identity. Upon identity creation, the respective cryptographic keys (a public and a private key) are generated. The identity wallet submits a registration payload with a public key to the blockchain, which generates a unique identifier against your wallet. The private key remains with the user’s device/identity wallet and is used during the authentication. Similarly, issuers such as the government, universities, and finance institutes verify the respective identity information and add to the digital identity data in a process that is like issuing certificates. The processes, for example, verifying user identity and issuing new credentials, require issuers to sign using their private keys.

Decentralized identity using blockchain
Deepak Gupta @dip_ak, Venture Beat, March 5, 2022 
https://venturebeat.com/2022/03/05/decentralized-identity-using-blockchain/ 

 

 

 

(3) Decentralized Computing

블록체인 내 분산 컴퓨팅 사례
- 비트코인 내 작업증명을 통한 이중 지불 방지 (노드들의 해시값 계산)
- 이더리움의 가상 머신 실행을 통한 DApp 플랫폼 역할 수행

 

SETI @HOME

- 인터넷 연결 컴퓨터를 활용한 외계 지적 생명체 탐구 프로젝트
- 전파망원경 수집 데이터를 전세계 봉사자들 개인 컴퓨터로 보내 분석
- 500만 이상 참여자 모집

 

이더리움 기반의 Golem

- 대규모 컴퓨팅 파워 수요자(개인/기업)에 컴퓨팅 파워를 임대하고 보상을 수령

골렘(Golem, 戈呐特币) 또는 골렘코인(Golemcoin)은 사용하지 않는 컴퓨터 자원을 다른 사람이 사용할 수 있도록 빌려줌으로써, 탈중앙 분산형 클라우드 시스템을 구현하기 위한 암호화폐이다. 블록체인 기반의 슈퍼컴퓨터(supercomputer)를 구현하기 위한 시스템이라고 할 수 있다. 골렘은 이더리움 기반의 ERC-20 토큰이다. 골렘 네트워크 토큰(Golem Network Token)이라고도 한다. 골렘의 티커는 GLM이다. (...) 골렘 서비스를 이용하면, 가정이나 회사에서 사용하지 않는 컴퓨터의 CPU를 골렘 네트워크를 통해 다른 사용자에게 빌려줄 수 있다. 더 많은 컴퓨팅 파워가 필요한 사용자들은 골렘이 제공하는 블렌더(Blender)라는 서비스를 통해 타인의 CPU를 빌려 쓸 수 있게 된다. 특히, 골렘은 시각 효과가 필요한 인터랙티브 3D 앱, 비디오 게임, 영화 CG, 인공지능 등의 분야에서 유용한 서비스이다. 골렘은 블렌더에 직접 CPU를 매칭해 준다. 다른 사람의 컴퓨팅 자원을 사용한 대가를 지급할 때, 골렘 네트워크 토큰(GNT)을 사용한다.
(출처: 해시위키)


The Golem Network fosters a global group of creators building ambitious software solutions that will shape the technological landscape of future generations by accessing computing resources across the platform.
- A flexible, open-source platform for democratised access to digital resources
* Lightweight protocol for building unstoppable applications, anonymous and censorship-resistant
* Modular, cutting edge architecture
* Fast and cheap micropayments with the GLM token on Ethereum’s Layer 2
1. Rent out your digital resources including idle computing power GLM tokens being sent for computed tasks to providers
2. Earn GLM tokens (an Ethereum-based cryptocurrency) Users taking part in decentralized peer to peer network
3. Become part of the decentralized web ecosystem
https://www.golem.network/platform 

 

 

 

(4) Decentralized Browser

Toshi (現 Coinbase Wallet)

- 모바일 내 DApp 사용이 가능케 하는 모바일 DApp 브라우저
- 메타마스크 모바일 버전보다 빠르게 출시
- 암호화폐 거래소 코인베이스 후원 프로젝트 - 사용자 친화적 인터페이스 구축을 통한 블록체인 및 암호화폐 생태계 활성화 목적
- 코인베이스 전자지갑과 토시 브라우저가 통합됨

코인베이스월렛(Coinbase Wallet)은 미국의 암호화폐 거래소인 코인베이스의 핫월렛 암호화폐 지갑이다. 원래의 오픈소스 디앱 브라우저 및 월렛인 토시(Toshi)를 코인베이스월렛이라고 이름을 바꾸면서 일련의 업데이트를 통해 기능과 서비스 영역을 확장했다. 코인베이스월렛은 사용자 제어 암호화폐 지갑이며 웹3(Web 3) 분산 응용 프로그램 또는 디앱(DApp)용 브라우저이다.
(출처: 해시위키)

Coinbase Wallet : Your key to the world of crypto
* Store all of your crypto and NFTs in one place
* Support for hundreds of thousands of tokens and a whole world of dapps
* Explore the decentralized web on your phone or browser
* Protect your digital assets with industry-leading security
https://www.coinbase.com/wallet