Nexera Wrapper

Introduction - Wrapper

The Wrapper module, an integral component of the Nexera ecosystem, comprises a suite of smart contracts designed to facilitate the bundling and unbundling of various external asset types (e.g., ERC-20, ERC-721, ERC-1155) into On-Chain-Data-Containers (ODCs). By external assets, we refer to tokens not implemented as a Property Manager smart contract themselves. In contrast, internal assets include customized token-based Property Managers implementing the respective ERC token interface.

Notably, the Wrapper can be extended to accommodate external assets of any token standard. Support for other ERCs, such as ERC-3643 and ERC-1400, can also be developed.

Specialized Property Managers, known as External ERC Property Managers, oversee this intricate process, and each asset type corresponds to a dedicated implementation, such as the ExternalErc20PropertyManager for ERC20 tokens. These contracts handle various aspects, including wrapping, unwrapping, rewrapping, and partially unwrapping assets into and from ODCs, utilizing Properties and token-related Restrictions.

For instance, when a user intends to wrap ERC20 tokens into their ODC, the ExternalErc20PropertyManager is employed, creating the corresponding Properties based on the tokens' addresses and adding them to the targeted ODC. ERC20 token-related Restrictions are also applied to these Properties detailing critical information such as the token addresses, amounts, and unlock timestamps specified by the user. Subsequently, the designated token amounts are securely transferred from the user to the ODC contract and locked through respective internal hooks triggered by the application of the Restrictions.

Users can initiate the unwrapping process upon the expiration of the designated lock timestamps specified in the applied Restrictions. At this stage, the associated External ERC Property Managers remove these Restrictions from the related Properties of the ODC. This action triggers the respective internal hooks, facilitating the secure transfer of the targeted wrapped assets back to the user's ownership.

Getting Started

Main Concepts Overview

Explore the core principles of the Nexera Wrapper and acquire a comprehensive understanding of its fundamental workings.