FungibleSBT

所属分类:特征抽取
开发工具:Solidity
文件大小:0KB
下载次数:0
上传日期:2023-08-25 14:37:35
上 传 者sh-1993
说明:  用于去中心化声誉系统的Soulbound Token(SBT),
(A Soulbound Token (SBT) for a decentralized reputation system,)

文件列表:
LICENSE (1071, 2023-12-12)
assets/ (0, 2023-12-12)
assets/images/ (0, 2023-12-12)
assets/images/FungibleSBT.png (204847, 2023-12-12)
assets/images/FungibleSBTDepositable.png (254891, 2023-12-12)
assets/images/FungibleSBTIcon.png (35466, 2023-12-12)
assets/images/fungible.png (122042, 2023-12-12)
assets/images/nontransferrable.png (57974, 2023-12-12)
assets/images/revocable.png (48158, 2023-12-12)
contracts/ (0, 2023-12-12)
contracts/FungibleSBT.sol (8491, 2023-12-12)
contracts/FungibleSBTDepositable.sol (5458, 2023-12-12)
contracts/interfaces/ (0, 2023-12-12)
contracts/interfaces/IFungibleSBT.sol (2591, 2023-12-12)
contracts/interfaces/IFungibleSBTDepositable.sol (1870, 2023-12-12)
contracts/interfaces/IFungibleSBTExpirable.sol (508, 2023-12-12)
coverage.json (11203, 2023-12-12)
hardhat.config.js (238, 2023-12-12)
package-lock.json (269641, 2023-12-12)
package.json (454, 2023-12-12)
scripts/ (0, 2023-12-12)
scripts/1_depositable_fsbt_migration.js (284, 2023-12-12)
scripts/1_fungiblesbt_migration.js (251, 2023-12-12)
test/ (0, 2023-12-12)
test/test_depositable_fungible_sbt.js (21905, 2023-12-12)
test/test_fungible_sbt.js (10509, 2023-12-12)

SBT Icon

FungibleSBT

A Prototype for a Fungible, Soulbound, and Revocable Token

![CICD Test Suite Status](https://github.com/Christof93/FungibleSBT/actions/workflows/node.js.yml/badge.svg?branch=main) [![codecov](https://codecov.io/gh/Christof93/FungibleSBT/graph/badge.svg?token=8W8WNOWQ22)](https://codecov.io/gh/Christof93/FungibleSBT) Soulbound Tokens (SBTs) were proposed by Ethereum's founder Vitalik Buterin to provide a means for applications such as degrees, lending or reputation. In contrast to more commonly used types of tokens SBTs can only be issued to an account once and can not be transferred further to any other address. This entails that the token can not be sold or exchanged for other currencies. Among possible use cases might be things such as loyalty points, renting contracts, awards, credit reports attendence certifications or reputation scores. While many of these can be imagined as unique non-fungible artifacts (NFTs) others - like reputation score or loyalty points - are rather fungible tokens in the sense of the [ERC20 standard](https://eips.ethereum.org/EIPS/eip-20). This repository implements a soulbound _fungible_ token standard. Furthermore, it proposes an extension of the token which makes it depositable as a collateral. For example in the case of reputation so that the activities which increase reputation can also potentially lead to a loss of reputation. Or so that loyalty points can be burned in exchange for rewards. ### What are the properties of the Fungible Soulbound Token? 1. __Nontransferability__ - The token can not be transferred to another account or exchanged.

Basic functionalities of the fungible soul bound token

2. __Revocability__ - The token can be burned by the entity which issued it.

Basic functionalities of the fungible soul bound token

3. __Fungibility__ - The individual unitary valued tokens are indistinguishable from each other.

Basic functionalities of the fungible soul bound token

Since the standard template of fungible tokens is the ERC20 contract I adapt it from the reference implementation of the IERC20 interface in the Openzeppelin contract library. The interface defines the blueprint for a token with the getter functions ``balanceOf()`` and ``totalSupply()`` which is also implemented in the FungibleSBT contract. Different from the ERC20 contract there are two separate balances - the balance of unassigned tokens which were not yet issued but only distributed or minted and the balance of issued tokens. This mechanism allows to mint the tokens to an account first without directly issuing them and rendering them unspendable. The first and only transfer called issuance is thereby decoupled from the minting process which makes it possible to control the supply of tokens independently of the issue mechanism. For example one might define a constant fixed supply distributed to a predefined list of recipients such as institutions, DAOs or ordinary accounts. Alternatively, the token can also be distributed as a mining reward.

Basic functionalities of the fungible soul bound token

Compile --- Install hardhat and openzeppelin contracts ``` npm install --production ``` compile using the command: ``` npm run compile ``` Test --- Install hardhat and openzeppelin ``` npm install ``` compile using the command: ``` npm run compile ``` Then, to run the test suite use this command: ``` npm run test ``` And run coverage using ``` npm run coverage ``` License --- This work is published under MIT License. Copyright (C) 2023 by Christof Bless Email: christofbless@gmail.com

近期下载者

相关文件


收藏者