# SBT system Analysis Based on ERC3525 **Published by:** [Ruofan](https://paragraph.com/@ruofan-2/) **Published on:** 2022-11-20 **URL:** https://paragraph.com/@ruofan-2/sbt-system-analysis-based-on-erc3525 ## Content Environments Which Blockchain: Polygon Reason: Cheap gas fee Relatively high throughput Solidity compatible — developer-friendly Protocols 🐒 ERC721? Do what mainstream NFT does: develop based on OpenZeppelin standard implementation https://github.com/OpenZeppelin 🤔 ERC 3525? For detailed information, check out below page: https://mirror.xyz/0xA0AFCFD57573C211690aA8c43BeFDfC082680D58/-w3380neddHFU47APGz7o3hzN2zjxhjYhlBRx1cDXiE Based on the research, it can realize a value-bounded SBT, which can reflects how many times a ‘Soul’ have contributed to certain types of activities. For example, as for the report submitting, when a ‘Soul’ firstly submitted a research report, we can issue a new ERC3525 NFT to him/her, with the slot of ‘report-submitting’ type. And after further submitting, we just simply issue some new value this NFT(with transferValue method). With the additional ‘slot’ feature, we can determine a soul’s time of contribution regarding to certain type, and ensure the liquidity to those contribution values(i.e: exchange certain milestone NFTs with certain amount of submitting-report value) Upgradable Contract Upgradable contract has the following pros: Fault-torrence to some bug in implementation Division of data storage & implementation logic Add downward compatibility features As for implementation, below is a detailed reference: https://github.com/AmazingAng/WTF-Solidity/tree/main/47_Upgrade Prerequisites for Upgradable Contract will include: Calldata selector - As Proxy is a static contract, it cannot add more method as the Upgradable Logic contract does, it will use fallback method to process all the calling instructions. Therefore, we should use Calldata selector to call the functions ‘not exist’ in the Proxy contract Some backdoors regarding to using proxy contract(optional) https://medium.com/nomic-foundation-blog/malicious-backdoors-in-ethereum-proxies-62629adf3357 It is recommended to use OpenZeppelin’s implementation https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/transparent/TransparentUpgradeableProxy.sol Detailed Implementations 1. Updatable NFT Updatable NFT means NFT’s metadata can change when certain milestones has met. This change is recommended to happen with a change of NFT’s ‘look’(i.e: picture bounded with it). There are many feasible implementations running on chain. A good example of here will be the Organic Crystals:(a crystal coral that can ‘grow’ overtime) https://opensea.io/collection/og-crystals Based on the contract code, it can be inferred the changing of picture is realized by the ‘setTokenUri’ method 2. NFT Lifetime A lifetime can help us determine what we need and what we don’t for our application scenario. Regarding to the SBT implementation, we prefer to adopt the ERC3525 protocol to ensure cumulative value associate with an NFT and some liquidity on the value for a direct exchange for certain milestone memorial NFTs. Below is the NFT Lifetime Proposal: Create: A soul firstly contributes to a type of activity defined by the community Cumulate: A soul continues contributing to the same type of activity Upgrade: A soul has met some milestone prerequisites Value Burnt: A soul exchanges his/her value bounded to the NFT he/she owns for some memorial NFT 3. Modules Upgradable Contract for ERC3525 SBT: core implementation of this project, should effectively check if the ERC3525 implementation is enough for our feature https://github.com/solv-finance/erc-3525/tree/main/contracts Contribution Activity Definations: should be defined by pd & operators, and developers should translate them to ERC3525 slots, while create, edit is allowed for those configurations Upgradable Conditions: same as Contribution Activity Definations; one can create and edit these conditions. (View it as CRUD functions on chain). ## Publication Information - [Ruofan](https://paragraph.com/@ruofan-2/): Publication homepage - [All Posts](https://paragraph.com/@ruofan-2/): More posts from this publication - [RSS Feed](https://api.paragraph.com/blogs/rss/@ruofan-2): Subscribe to updates