Testing & QA
Wallet Setup & Faucet
Step 1: Setup your wallet
I use Eternl which you can get here:
Before you create a wallet, switch to the "Pre-prod" network. You do this by clicking this button at the bottom right of the wallet app:
You'll then be shown this popup:
Select "Pre-production Testnet" and then click on "Add Wallet" to begin:
Follow the process carefully, and immediately note down your password, and your secret keys. Once you're done you'll be able to go to the "Receive" tab to copy your wallet address to clipboard for the next step.
Step 2 - Get some funds into your wallet
Before you can test our platform you'll need some test ADA. The faucet below will currently give you 10,000 ADA. Paste your wallet address into the form and you should receive those test funds in less than a minute:
https://docs.cardano.org/cardano-testnets/tools/faucet
Other Asset types
Let's generate an NFT
Step 1: Create NMKR Studio Account
NMKR Studio is an easy-to-use application that enables you to create, manage, and sell NFTs at scale. Native to Cardano, where it has minted millions of NFTs, NMKR now supports minting on multiple chains.
For Pre-production testnet, you can visit this link and create account.
https://studio.preprod.nmkr.io/
Step 2: Create & Mint your test NFT
- Create a new NFT project
note: images have to be .jpg or.png format
The next field fields are all optional but important when launching a commercial project. The project url is the website of the collection; the Description pertains to the NFT, a TokenName prefix is a name that goes before the number of a collection, and finally, the X (Twitter) handle of the project. The NFT reservation time is how long an account can have the asset in reserve before a purchase.
This wallet will be used to mint the NFTs.
CIP-25 is the original standard for Cardano NFTs, providing a fixed, immutable metadata format, CIP-68, on the other hand, is a newer standard that allows metadata to be mutable, meaning it can be updated over time
A new Policy ID creates a unique identifier tied to the provided wallet address, establishing a fresh collection for new NFTs. If a user selects an existing Policy ID, the new NFT will be added to an already-established collection.
Next, the Policyscript lock allows you to set a future date as a minting deadline. After this date, no additional NFTs can be crated under this policy ID, effectively locking the supply permanently and ensuring scarcity of your collection.
Finally, a user can configure the NFT metadata. This information is embedded in the token and visible on Cardano, allowing compatible wallets in the ecosystem to read and display it within the NFT section when users view their NFTs.
- Managing the NFT
You can see this menu appears in the Projects section of NNKR studio. From this menu, a user can access the sale option in NMKR Studio by clicking on "Manage Project" for those interested in putting it up for sale.
The first choice Cardano Collection Token in the dropdown menu allows a user to create a royalty token. This will ensure that a percentage of every NFT resale goes to the wallet specified by the token's creator.
Here to mint token, you should buy MINT COUPONS on dashboard.
The second dropdown menu item Set NFT Prices is where a user can settle on the price of each minted NFT in their collection.
The next feature NMKR Studio allows is for the user to create discount conditions. Users can set up a series of discounts based on some criteria met by the buyers
E2E Scenario
Real World Assets (RWA) on Cardano Blockchain with L4VA
This document outlines how L4VA enables the tokenization, aggregation, and fractionalization of commercial real estate assets on the Cardano blockchain, along with the specific transaction types and smart contracts needed for each step of implementation.
The Story
Introduction
A commercial real estate investment firm, RealX Holdings, identified an opportunity to increase liquidity and accessibility in the traditionally illiquid commercial real estate market. They decided to use L4VA to tokenize their portfolio of commercial properties and create fractionalized ownership tokens that could be traded on the blockchain.
Holding Company Tokenization
RealX Holdings had several LLCs, each holding different commercial properties (office buildings, retail spaces, and industrial warehouses). They tokenized these holding companies by issuing share classes representing percentage ownership of each LLC. These share classes were then minted into NFTs on the Cardano blockchain.
Vault Creation
Using L4VA, RealX created specialized vaults for different asset categories:
- Office Space Vault: Aggregating tokens from office building LLCs
- Retail Space Vault: Aggregating tokens from retail property LLCs
- Industrial Space Vault: Aggregating tokens from industrial warehouse LLCs
Each vault was designed to manage the aggregated tokens and enable fractionalized ownership through fungible tokens (FTs).
Investment Round
Investors were able to purchase fractionalized tokens from any of the vaults, gaining exposure to specific commercial real estate sectors without needing to buy entire properties. Each investor could contribute any amount of ADA, making commercial real estate investment accessible to a much wider audience.
Diversified Portfolio Creation
A financial influencer named Charlie saw an opportunity to create a more diversified commercial real estate portfolio. Charlie created a new vault on L4VA that aggregated tokens from all three sector-specific vaults (Office, Retail, and Industrial) into a "Commercial Real Estate Index" vault. This vault issued its own tokens representing exposure to the entire commercial real estate market, reducing risk through diversification.
Governance Decisions
Each vault implemented strictly defined governance systems allowing token holders to vote on a specific set of permitted actions:
Permitted Governance Actions:
- Asset Sales: Proposals to list or sell vault assets at market price to generate liquidity or rebalance the portfolio.
- Asset Acquisition: Proposals to purchase new assets that match the vault's whitelist using available ADA in the vault.
- Asset Staking: Proposals to stake assets to generate additional yield for the vault.
- Distribution to Token Holders: Proposals to distribute fungible token assets (including ADA) to fractional token holders through an asset claim and token burn process.
- Vault Mergers (v2): Proposals to merge compatible vaults, requiring approval from both vaults' token holders, creating a new vault with combined assets and a whitelist restricted to the sum of the original whitelists.
Prohibited Governance Actions: To prevent potential fraud and maintain vault integrity, certain operations were explicitly prohibited by the smart contract:
- Direct External Transfers: The governance system prevented proposals to send ADA or fungible token assets from the vault to specific external addresses.
- Whitelist Expansion: Vaults could not expand their asset whitelist beyond their initial scope without a full protocol upgrade.
- Non-Market-Based Transactions: All asset sales and purchases required verifiable market price validation.
This strictly defined governance system ensured that vault operations remained secure, transparent, and aligned with token holders' interests while preventing potential abuse.
Revenue Distribution
As the commercial properties generated rental income, this revenue flowed into the respective vaults. The governance system automatically distributed these returns to token holders proportional to their ownership, creating a steady income stream for investors while maintaining complete transparency.
Blockchain Implementation: Transaction Types and Smart Contracts
1. LLC Share Tokenization
Transaction Type: Minting Transaction
- Creates NFTs representing LLC share classes
- Includes metadata about the commercial property details (location, size, income, valuation)
Smart Contract Required: AssetTokenizationContract
(Contract Hash: 479f356943df735488e8f6ce7dd7dd9e757b68b9e01175da42031111
)
- Mints NFTs with property metadata
- Links legal documents to the asset (property deed, LLC operating agreement)
- Creates verifiable link between LLC shares and digital tokens
Implementation:
# Required functions from lib-assets.ts
createAsset("commercial_property", ["operating_agreement.pdf", "valuation_report.pdf", "title_deed.pdf"])
2. Vault Creation
Transaction Type: Minting Transaction
- Creates new tokens representing specialized vaults (Office, Retail, Industrial)
- Establishes governance parameters and fee structures
Smart Contract Required: VaultContract
(Contract Hash: ac2bb90a5a34ee1a7fe5340b73932132df67afb54d90605be6a8329f
)
- Creates vault structure with specified parameters
- Sets up token acceptance policies (which asset types can be deposited)
- Establishes governance rules
- Manages fractionalization mechanisms
Implementation:
deno run --env-file -A create_vault.ts
3. Asset Aggregation
Transaction Type: Transfer Transaction
- Transfers LLC NFTs into appropriate sector vaults
- Records ownership provenance
Smart Contract Required: AssetAggregationContract
(utilizing VaultContract
)
- Validates asset type matches vault criteria
- Records contribution details and ownership transfer
- Updates vault composition
Implementation:
# Uses getVaultUtxo function from lib.ts
getVaultUtxo(vaultPolicyId, vaultAssetName)
4. Fractionalization
Transaction Type: Minting Transaction
- Mints fungible tokens (FTs) representing fractional ownership of the vault
- Associates FT supply with vault asset value
Smart Contract Required: FractionalizationContract
(part of VaultContract
)
- Calculates appropriate token supply based on asset values
- Enforces proportional ownership rules
- Manages token supply updates when assets are added/removed
Implementation:
# Function from lib.ts to calculate token distributions
assetsToValue(vaultAssets)
5. Diversified Portfolio Creation
Transaction Type: Vault Creation + Transfer Transactions
- Creates a new vault that accepts tokens from other vaults
- Transfers tokens from sector-specific vaults to the diversified vault
Smart Contract Required: MetaVaultContract
(extending VaultContract
)
- Handles vault-of-vaults structure
- Manages nested governance rules
- Calculates appropriate index token supply based on underlying vault tokens
Implementation:
# Uses multiple functions from lib.ts
generate_assetname_from_txhash_index(metavaultTxHash, outputIndex)
6. Governance Voting
Transaction Type: Voting Transactions
- Records votes from token holders
- Enforces voting weight based on token ownership
- Executes approved actions within strict constraints
Smart Contract Required: GovernanceContract
(part of VaultContract
)
- Validates voter eligibility based on token ownership
- Enforces voting timeframes
- Requires minimum participation thresholds
- Validates that proposals match permitted operations
- Rejects prohibited operations (e.g., direct transfers to external addresses)
- Executes approved decisions automatically
Implementation:
# Function from lib.ts to track governance proposals
getUtxos(governanceAddress, minimumStake)
7. Asset Distribution
Transaction Type: Distribution Transactions
- Creates asset claims for token holders
- Requires token burn to claim assets
- Distributes assets proportionally to token ownership
Smart Contract Required: DistributionContract
(part of VaultContract
)
- Calculates distributions based on token ownership percentages
- Creates secure claim mechanism requiring token burn
- Validates distribution timeframes
- Executes automatic distributions to token holders
- Updates distribution records
Implementation:
# Asset claim and token burn process
createAssetClaim(vaultId, assetId, distributionAmount) +
burnTokenForClaim(fractionalTokenId, claimId)
8. Vault Merging (v2)
Transaction Type: Complex Transaction
- Requires approval from both vault governance systems
- Creates new vault with combined assets
- Burns original vault tokens
- Mints new vault tokens for holders from both original vaults
Smart Contract Required: VaultMergerContract
(extending VaultContract
)
- Handles complex multi-vault governance voting
- Creates new vault with properly restricted whitelist
- Manages asset transfers from original vaults
- Calculates fair token distribution in new vault
- Ensures continuity of ownership rights
Implementation:
# Implementation for vault merging
proposeVaultMerger(sourceVaultId, targetVaultId, newParams) +
approveVaultMerger(sourceVaultId, targetVaultId, approvalSignature) +
executeVaultMerger(sourceVaultId, targetVaultId, newVaultId)
9. DeFi Integration
Transaction Type: Collateralization Transactions
- Uses vault tokens as collateral for lending platforms
- Enables yield farming with vault tokens
Smart Contract Required: DeFiIntegrationContract
- Creates compatible interfaces with other DeFi protocols
- Manages collateralization ratios and liquidation parameters
- Enables automated yield strategies
Implementation:
# Integration with external DeFi protocols
getUtxos(userAddress) + collateralizeAssets(vaultTokens, loanAmount)
L4VA System Architecture Diagram
flowchart TD;
A[RealX LLC] --> |Mint NFT| B[NFT];
C[L4VA] --> |Create Vault| V[🔒 Vault];
B --> V;
E[Investors] --> |Send Assets| V;
V --> |Create Vote| F[Governance];
F --> |Votes| V;
V@{ shape: rounded}
E@{ shape: rounded}
Transaction Types and Flow
Step | Transaction Type | Asset Involved | Smart Contract | Purpose |
---|---|---|---|---|
LLC Tokenization | Minting | Commercial Property NFT | AssetTokenizationContract | Create digital representation of LLC shares |
Vault Creation | Minting | Vault Token | VaultContract | Create specialized vaults for asset categories |
Asset Aggregation | Transfer | Property NFT → Vault | AssetAggregationContract | Move assets into appropriate vaults |
Fractionalization | Minting | Fungible Tokens | FractionalizationContract | Create tradable fractional ownership tokens |
Meta-Vault Creation | Minting | Meta-Vault Token | MetaVaultContract | Create diversified portfolio vault |
Token Transfer | Transfer | Vault FT → Meta-Vault | VaultContract | Move tokens between vaults for diversification |
Governance Vote | Voting | Governance Token | GovernanceContract | Record holder votes on proposals |
Asset Sale | Market Sale | Vault Asset → ADA | VaultContract | Sell assets at market price |
Asset Purchase | Market Purchase | ADA → New Asset | VaultContract | Buy assets from whitelist at market price |
Asset Distribution | Claim + Burn | Token Burn → Asset Claim | DistributionContract | Distribute assets to token holders |
Vault Merger | Complex | Vault A + Vault B → New Vault | VaultMergerContract | Combine compatible vaults |
Implementation Workflow
This implementation demonstrates how L4VA facilitates the fractionalization, aggregation, and governance of commercial real estate assets on the Cardano blockchain. The key value propositions include:
- Tokenization: Converting illiquid real estate into tradable digital assets
- Fractionalization: Breaking down large investments into affordable units
- Aggregation: Combining multiple assets into thematic vaults
- Diversification: Creating index-like products across property types
- Governance: Enabling democratic management of real estate portfolios within strict security constraints
- DeFi Integration: Unlocking new financial use cases for real estate assets
By leveraging L4VA, creators with influence and ideas can aggregate large vaults by attracting existing tokenized asset holders to contribute to vaults with specific configurations that represent an investment theme or strategy. The creators can then apply utility to their tokens as part of their community or other decentralized applications.
To execute this implementation on the Cardano preprod network, we'll use the Blockfrost API (project ID: preprodGLOrJOlqUt1HBVbDhBTEh9oq7GVUBszv
) and our custom scripts to interact with the smart contracts.