Squishy Contract
The Squishy Contract`s goal is to serve as a template for nearly any asset in the world for tokenization and effective and secure on-chain management.
Contract Structure
Overview: Each smart contract represents a single asset and manages all associated rights. It contains a bundle of ERC721 tokens, each representing a portion of the asset's ownership and rights.
Components:
Asset Management Module: Handles the core functionality related to the asset, including ownership, rights distribution, and dividend payouts.
Token Management Module: Manages the creation, transfer, and tracking of individual ERC721 tokens.
Role-Based Access Control (RBAC) Module: Integrates with Paddle Identity to manage user roles and permissions.
Data Storage Module: Interfaces with IPFS for metadata storage and on-chain data management.
Code Structure:
Key Features and Operations
Dual Pricing Mechanism: Differentiates between 'last approved price' and 'listing price', catering to different market scenarios.
Asset Metadata Management: On-chain metadata includes basic asset details, with extended data stored on IPFS.
Dynamic Price Calculation: Offers the flexibility to calculate the price per token based on either the 'last approved price' or the 'listing price'.
Minting with Metadata Check: Ensures metadata is not duplicated by creating pointers to already stored data.
Role-Based Access and Event Logging: Ensures secure and transparent operations within the contract, with specific roles assigned for different operations.
Token Structure
ERC721 Standard: Each token is an ERC721, ensuring uniqueness and non-fungibility.
Metadata Pointer: Tokens contain a pointer to the contract's stored IPFS hash, avoiding redundant data storage.
Uniform Value and Rights: All tokens have equal value and represent an equal share of the asset's rights.
Code Structure:
Key Enhancements and Operations
Asset Management Contract Interface: Introduces an interface
IAssetManagementContract
to interact with theAssetManagementContract
. This creates a direct connection between the tokens and the contract, enabling access to crucial data like pricing and metadata.Dynamic Pricing: Incorporates functions
getLastApprovedPricePerToken
andgetListingPricePerToken
to calculate the price per token based on the last approved asset price or listing price, divided by the total number of tokens.Token Minting: The
mint
function is responsible for creating new tokens. The token ID is incremented with each mint, ensuring uniqueness.Metadata Linkage: Overrides the
tokenURI
function to provide a URI pointing to the asset's metadata stored on IPFS. This ensures that each token is linked to its relevant metadata.
Token Parameters
Minimum Value Requirement: Each token must have a value above €500.
Transferability: Tokens can be transferred 24/7, leveraging the inherent features of blockchain technology.
Rights Representation: Each token represents an equal percentage of ownership, rental rights, dividend rights, and other associated rights.
On- & Off-Chain Data Storage
On-Chain Storage: Utilizes Ethereum blockchain for storing critical data such as asset price, token information, and user roles.
Off-Chain Storage (IPFS): Metadata about the asset is stored on IPFS, with the hash reference stored on-chain. This approach ensures data integrity and accessibility without overloading the blockchain.
IPFS / On-Chain
Metadata Management: Asset metadata, including descriptions, valuations, and legal information, is stored on IPFS.
On-Chain Hash Reference: The smart contract stores the IPFS hash, ensuring metadata is tamper-proof and permanently accessible.
Token Minting
One-Time Minting Process: Tokens are minted in a single transaction to minimize costs and ensure efficiency.
External Input Handling: The contract accepts external inputs (such as the number of tokens to mint and IPFS hashes) for minting processes.
Role-Based Access Control with Paddle Identity
Integration with Paddle Identity: The contract utilizes Paddle Identity for secure and private user authentication using zk-proofs and biometric data.
Role Assignment: Users are assigned roles based on their token ownership, enabling specific rights and actions within the contract.
Predefined Roles through the Tokenization Contract
Dividend Receiver: Entitled to receive dividends from the asset's earnings. The contract automatically distributes dividends from its Ethereum pool to these role holders.
Voting Rights: Token holders may have voting rights on decisions affecting the asset, such as maintenance or structural changes.
Asset Manager Role: A designated role for managing significant decisions about the asset, subject to token holder approval.
Conclusion
This technical documentation outlines a comprehensive and scalable smart contract and token structure for asset tokenization. It leverages the ERC721 standard, integrates with Paddle Identity for role-based access, and utilizes both on-chain and IPFS solutions for efficient data management. The contract is designed to be adaptable for various assets, with a focus on security, transparency, and efficiency in managing and representing asset ownership and rights on the Ethereum blockchain.
Last updated