An Assessment of UTXO Smart Contracts: Towards Optimized Application Development on Cardano Blockchain
This repository contains the implementation and research work of my Master's degree at Ca' Foscari University of Venice. The project focuses on the Extended UTXO (eUTXO) model used by the Cardano blockchain.
The research explores the advantages, challenges, and scalability of UTXO-based smart contracts compared to traditional account-based models like Ethereum, using a functional Auction dApp as a primary case study.
- Analysis: Deep dive into the EUTXO mechanism including Datum, Redeemer, Script Context, and Validator Scripts.
- Practical Evaluation: Implementation of a decentralized Auction System as a real-world case study.
- Comparison: Evaluating deterministic behavior, concurrency, and state management against the Account-based model (Ethereum).
This is a full-stack decentralized application (dApp) built for the Cardano ecosystem:
- On-Chain Logic: Developed using Aiken (Smart Contract Validator).
- Off-Chain Logic: Built with TypeScript and Lucid for transaction construction.
- Frontend Framework: Developed using React and the Fresh (Deno) framework.
Based on the research findings, the Auction System follows a strict state-transition logic defined in the thesis:
- Initialize: Define the auction parameters (minimum bid, duration, and asset).
- Bidding: Users submit bids. The script ensures the new bid is higher than the current one and manages the locked UTXO.
- Withdraw: Non-winning bidders can safely retrieve their locked funds.
- Conclusion: Once the deadline passes, the seller claims the highest bid, and the winner claims the asset.
| Feature | Cardano (eUTXO) | Ethereum (Account-Based) |
|---|---|---|
| State Management | Localized in UTXOs | Global state updates |
| Concurrency | High (Independent UTXOs) | Potential bottlenecks/race conditions |
| Fees | Deterministic (Fixed in advance) | Dynamic (Gas fluctuations) |
| Validation | Local (No cost for failed TX) | On-chain (Gas paid even if TX fails) |
| Security | Reduced attack surface | Vulnerable to re-entrancy attacks |
Make sure to install Deno: https://deno.land/manual/getting_started/installation
This is a Fresh project. You can follow the Fresh "Getting Started" guide here: https://fresh.deno.dev/docs/getting-started
-
Start the development server:
deno task start
This will watch the project directory and restart as necessary.
-
Build the On-Chain Scripts: If you have the Aiken CLI installed:
aiken build
- Author: Hammad Zubair
- Supervisor: Prof. Michele Bugliesi
- Institution: Ca' Foscari University of Venice
- Academic Year: 2024/2025