Libretto is an innovative on-chain deposit fund that ensures long-term commitment through its immutable unlock date. Once funded, only the owner can withdraw the entire balance after the specified period, making it a secure way to save for the future. Anyone can contribute, empowering a community-focused approach to investment.
Libretto is a smart contract designed to function as an on-chain deposit fund, promoting owner commitment over a predetermined duration. Drawing inspiration from the Italian tradition of establishing a "libretto" (a savings account) for newborns, where funds are deposited to be accessed upon reaching adulthood, Libretto operates similarly but implements these rules entirely on-chain.
Functionality Overview
- The unlock date is established during contract creation and is immutable, meaning it cannot be altered by the owner or any other parties.
- Anyone is allowed to deposit funds at any time.
- Only the owner has the authority to withdraw the funds.
- Withdrawals are permitted solely after the unlock date, and the entire balance is released at that time.
Example Scenario:
If a user deposits 1 ETH today and sets an unlock date of 20 years, the funds can only be withdrawn in 2046. This feature ensures a long-term commitment to the investment while keeping it fully integrated on the blockchain.
Notable Features
| Feature | Description |
|---|---|
| Immutable unlock date | Set at deployment; cannot be modified |
| Owner-only withdrawals | Exclusively accessible by the contract deployer |
| Full-balance payout | Withdrawals release the entire deposit |
| Public deposits | Open for anyone to contribute at any time |
| On-chain enforcement | Rules are fully governed by the Ethereum blockchain |
Future Enhancements
- A transferable or giftable version of the contract
- A Multi-owner/Multi-Signature iteration of the contract
- Open to community suggestions for further development
Deployment Information
- Mainnet Address: 0xC2c3603ae32Acc8313b606B36878212a4DfC1300
- Testnet Address: 0x3C566f823D63239bBD5FC07b3e01F40fe7054b77
Usage Steps
- Deploy a new Libretto contract and specify the unlock duration (in years).
- Contribute funds — either as a single transaction or via multiple deposits; anyone is welcome to add funds at any time.
- Await the unlock date until it arrives.
- Withdraw the full balance as the designated owner — this action is only permissible after the unlock date.
The contract enforces commitment automatically. Note that if the owner loses access to their key, recovery of the funds will not be possible.
Disclaimer
Utilization of this contract is at the user's own risk. Funds will remain locked until the specified unlock date. It is imperative to verify addresses and unlock durations thoroughly prior to depositing.
No comments yet.
Sign in to be the first to comment.