Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cruna/cruna-protocol

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cruna/cruna-protocol

The Cruna protocol

  • 1.0.1
  • unpublished
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Cruna Core Protocol

The protocol

The Cruna Core Protocol establishes a unique hierarchy between two distinct NFTs – the Protector and the Protected – operating on EVM-compatible blockchains to facilitate the management of utility-driven NFTs. The Protected NFT, subordinate in nature, does not possess the capability to alter token ownership; rather, it derives its ownership from the dominant Protector NFT. Simply put, the wallet owning the Protector NFT inherently owns the corresponding Protected NFT.

While the Protector NFT functions as a conventional NFT, complete with rarity distribution and other standard attributes, the Protected NFT diverges by focusing on providing tangible utility. In the Cruna MVP, the inaugural utility NFT takes the form of a Transparent Vault.

The protector

The Protector NFT carries significant responsibility, as its ownership can imply control over hundreds of additional assets. To enhance security, certain limitations have been implemented.

Interaction with Marketplaces:

  • The NFT cannot be approved for everyone, as this is a common avenue for phishing attacks.
  • Before using the protected NFT (for example, before depositing in a vault), the NFT should be made not-approvable. The Cruna dashboard will push the user to do so.

Ownership Transfer:

  • While a Protector NFT can be transferred by default, the owner has the option to designate an initiator wallet.
  • When an initiator is assigned, any transfer process must be initiated by the initiator and subsequently confirmed by the owner. This added layer of security ensures that even in the event of phishing, scammers cannot transfer the NFT without the initiator's involvement.

The protected Transparent Vault

A Transparent Vault is a protected NFT designed to store and safeguard assets (ERC20, ERC721, ERC1155). Its ownership is derived from the associated Protector NFT, meaning that transferring the Protector NFT's ownership will also transfer the ownership of the Transparent Vault.

The Transparent Vault inherits security features from its Protector NFT. If the Protector's owner has designated an initiator, any movement within the Transparent Vault must be initiated by the initiator and confirmed by the owner. This added security layer helps prevent scammers from transferring or withdrawing assets in the event of phishing. Typically, an initiator is a wallet stored in a cold wallet, reserved for crucial operations and not used for daily transactions.

Assets can be deposited into the Transparent Vault by the Protector's owner or other wallets. To prevent abuse, the owner can establish rules to permit deposits from everyone, specific wallets, or exclusively from the owner. It's also possible to implement a confirmation-based system requiring the owner's approval for deposits not originating from whitelisted wallets or the owner themselves.

Asset transfers between Protectors can be executed by the owner, even if an initiator is set, as long as the destination Protector is owned by the same individual. If the destination Protector has a different owner, the initiator must be utilized.

The simple concept of a Transparent Vault dramatically enhances the security of an NFT collection.

Use Cases

  • Consolidate all assets of a collection into a single Transparent Vault, allowing a seamless transfer of ownership without needing to move each asset individually. This offers significant improvements in security and user experience.

  • Create asset bundles and list them for sale as a single NFT on popular marketplaces like OpenSea.

  • Deposit vested assets into a Transparent Vault for scheduled distribution to investors, team members, etc. Note that for this to work, the asset must be capable of managing the vesting schedule. In a future version of the Cruna Core Protocol, a Transparent Distributor will be introduced to handle the vesting of any assets.

Contract ownership

The Cruna Core Protocol lays the foundation for any NFT collection to incorporate a Transparent Vault. Everdragons2 has the distinction of being the inaugural project to execute this protocol.

Given that any project utilizing the protocol could theoretically introduce harmful functions, the Cruna DAO will conduct audits on the associated contracts. Following this review, they will then determine whether the project should be granted access to be managed within the Cruna dashboard. Projects that have not been listed and choose to implement the protocol are required to construct their own management dashboard.

Costs

Implementing the Cruna Core Protocol necessitates a sophisticated UI to manage both Protector and Protected NFTs. Cruna will develop this UI, which will be freely accessible to all projects looking to integrate the Cruna Core Protocol that will successfully pass Cruna's audit. To offset costs, a royalty fee may be applied to the initial sale of each Protector NFT. Alternatively, projects may choose to pay a one-time fee to Cruna to remove the royalty. The Cruna DAO will determine the royalty fee and one-time fee based on the project's size and scope.

Other packages

This repo contains other contracts used as a foundation for the Cruna Core Protocol.

SOULBOUND

NFT Owned Contracts

Dominant Subordinate protocol

History

1.0.0-beta.7

  • Putting in this repo, code previously in @cruna/ds-protocol.

1.0.0-beta.4

  • Make the protector approvable by default. The owner will be pushed to make it not-approvable when depositing the first asset in the Transparent Vault.

1.0.0-beta.3

  • Remove post-install, creating issues when loaded as a dependency

1.0.0-beta.2

  • Adding __gap variables to Transparent Vault contracts to allow for future upgrades

1.0.0-beta.1

  • ready to publish it as an npm package

0.1.5

  • Moving to use @cruna/ds-protocol instead of @ndujalabs/erc721subordinate
  • Adding batch minting functions

0.1.4

  • Optimize mappings using keccak256

0.1.3

  • Renaming the protocol
  • Separating the implementations in the protected folder

0.1.2

  • Add a starter, i.e., a second wallet that must start the transfer of the protector NFT
  • If a starter is active, the protected will only allow transfers of assets between protectors not owned by the same owner only if the transfer is started by the starter

0.1.1

  • Separate ERC721Attributable from IProtector interface for clarity and generality

0.1.0

  • first version

Contributions

This project has born from the collaboration between Everdragons2, Nduja Labs and The Round Table.

License

Copyright (C) 2023 Cruna

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You may have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/gpl-3.0.en.html.

Keywords

FAQs

Package last updated on 06 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc