Blog > Authors > Fernando Sanchez

Cardano Stack Exchange: a growing and vibrant community developer resource

Learn about this dedicated community hub that supports Cardano developers

19 August 2021 Fernando Sanchez 4 mins read

Cardano Stack Exchange: a growing and vibrant community developer resource

The Cardano ecosystem is committed to supporting and growing our developer community. A vibrant, informed community is essential to the development of a decentralized, functional ecosystem with a diverse user base. In line with our open-source approach, as we evolve Cardano together, everyone can benefit from its decentralized financial solutions while delivering best-in-class blockchain technology.

To reach our common goals, it is essential that everyone participates in the development process and can always get the information, guidance, and assistance they need.

To support this mission, we are encouraging development talent and experts from across the globe to gather in one place – Cardano Stack Exchange. This developer hub is the ideal place to share experiences, ask and answer questions about all the streams of Cardano development and operations, and share resources. This site – being driven by members of the Cardano community – is one of the resources to help you learn how to develop decentralized applications (DApps) and write smart contracts.

What is Stack Exchange?

Cardano Stack Exchange originated from Stack Overflow, the free community website for developers created by Jeff Atwood and Joel Spolsky in 2008. The name was chosen by a voting process in April 2008 by readers of Coding Horror, Atwood's popular programming blog. From this beginning, the movement has grown to host many specialized Stack Exchanges.

One of the newest is dedicated to Cardano developers. Currently in beta, it is a community-moderated question-and-answer site where all Cardano developers, including Plutus pioneers, can get expert answers to a variety of questions, ranging from installation queries to configuration and implementation details.

This community-driven, decentralized philosophy of Stack Overflow fits particularly well with the open-source, decentralized philosophy of Cardano.

How it works

If you are stuck on an issue in Cardano, or curious about an element of its technology, the Stack Exchange is a great resource. It serves more as a place for specific questions about real problems than a discussion site like the Cardano Forum. This format means that you can easily find the questions you are looking for without getting lost in long-winded discussion threads. Once you come on board, you will have the opportunity to search all previous questions and suggested resolutions.

Examples of questions currently being answered on the site include:

What happens to staked ada after transferring ada to another wallet?

What is the maximum number of addresses in a Cardano Wallet?

How to create a serialized transaction without a local full node?

Your question might have already been answered; in this case, you can see how many times it has worked for someone. On the other hand, if you have a new question, someone else will probably encounter the same issue, and your question and answer will be helpful for them.

Cardano developers and support staff regularly check the site and will provide answers where they can. You can check for new questions too, and maybe provide an answer for someone else. The community elects the moderators and upvotes questions and answers to show appreciation.

The more you use the site, the more valuable it becomes. Users gain reputation points by asking questions, upvoting questions and answers, and providing answers to fellow developers. Reputation points increase your overall score and earn you more site privileges. Many people find that explaining something to another developer is one of the best ways to deepen their own understanding. The best way to learn, as they say, is through teaching.

How to get involved

We’re very keen to establish and grow our Stack Exchange presence. The site is currently in beta and can only grow with community usage and support. This is where you come in. We’d like to encourage you to ask a question – or a bunch of them if you like!

The site is completely free to use. Just provide an email address, set your password, and you’re good to go!

When someone from the community answers your question, you can return the favor by helping your fellow developers with possible resolutions and suggestions to their questions. When you receive an answer that works for you, remember to accept and upvote it. Considering the search terms that others might use will help you write a good question.

With the site currently still in beta phase, it needs wider adoption and activity to progress to full production. We encourage you to log on, get involved, and help make the site a valuable resource for everyone in the community.

The Stack Exchange initiative is truly a Cardano community effort. So particular thanks to all the contributors working to drive this project forward.

I would like to acknowledge Neil Burgess for his contribution to this article.

Why they’re calling Cardano ‘the green blockchain’

Staking process avoids the massive energy use and hardware pollution caused by Bitcoin and Ethereum mining

17 August 2021 Fernando Sanchez 5 mins read

Why they’re calling Cardano ‘the green blockchain’

Ever since Satoshi Nakamoto published the Bitcoin whitepaper in 2008, Bitcoin has had its fair share of controversy. The cryptocurrency has often been in the limelight for the wrong reasons. The biggest criticism is how much the mining activities of Bitcoin – and other cryptos such as Ethereum based on proof-of-useless-work – protocols are damaging the environment. Turns out, well, a lot.

The University of Cambridge reckons that mining consumes 100 terawatt-hours (TWh) of electricity a year – that’s one trillion watts every hour. To put this figure into perspective, that's 0.55% of the electricity produced in the world each year, enough to run a country such as Malaysia or Sweden. Digiconomist shows the same energy problem plagues Ethereum. And the figures continue to rise.

In recent months, the environmental impact of proof-of-work mining has come to the forefront. Mining algorithms require massive amounts of energy. This issue was, up to recently, compounded by the fact that 70% of mining was concentrated in China, where electricity production relies on fossil fuels, particularly burning coal. A recent crackdown by the Chinese authorities has prompted an exodus of crypto miners, which will probably just move the problem to another country. And the issue affects other places anyway. Concerns about energy consumption led to the shutting down of a mining hub in Mongolia in March, for example.

Profiting from cryptocurrency mining is not restricted by geography or motivation. British police swooped on a building this year expecting to find a cannabis farm, for example. Instead, they found 100 computer boards mining Bitcoin with an illegal connection to the electricity grid. It was later reported that 'three nerds' had stolen power worth £16,000 a month to make £8,000 in crypto.

The greener crypto road

While fundamental to its function, the proof-of-work algorithms of Bitcoin and Ethereum are their Achilles heel. Powerful, state-of-the-art mining rigs produce better yields, but the faster the rigs are, the more electricity they require. This poses the question of long-term sustainability. A recent post on the Ethereum Foundation blog claimed that ‘Ethereum’s power-hungry days are numbered’ and that its long-awaited move to proof of stake would use 99.95% less energy, although exactly when this shift will take place remains unclear. (‘Early 2022’ has recently been suggested.)

But what makes proof of stake, as used by Cardano, a more environmentally friendly blockchain?

Proof of work is resource-intensive because miners need to solve ever-more-complex mathematical problems to create blocks. They are in an energy-intensive global race to solve meaningless, randomly generated puzzles. This massive amount of computational power could be used to map the stars, search for alien life, or speed up the search for Covid vaccines; but it is just wasted effort. This wasted digital effort leads to real world consequences as well.

The need for powerful hardware leads to a secondary problem: e-waste. Miners always need to keep up with rivals, which means buying more powerful mining rigs. The 'old' equipment – often suitable only for mining – quickly becomes obsolete. It is discarded, and according to the Digiconomist, Bitcoin's e-waste is shockingly high. Only 20% of the world's electronic waste is recycled, so the plastics and poisonous materials such as heavy metals in the rigs can end up in landfill. (According to predictions by the United Nations, the world will produce up to 120 million tonnes of e-waste a year by 2050.)

So why are commentators in newspapers and on investing blogs such as the Motley Fool calling Cardano the ‘green blockchain’? When it comes to sustainability and environment-friendly cryptocurrencies, Cardano has two clear advantages: far less energy consumption, and staking.

In proof of stake, network participants run nodes, and the chain selects a node to add the next block, based on the node's stake and other parameters. So the main difference between these two algorithms (and therefore, in their energy requirements) is that in proof of stake, block producers do not need to spend excessive amounts of time and computer power to solve random puzzles. IOHK chief Charles Hoskinson has estimated that Cardano’s energy use is just 0.01% of Bitcoin’s.

Proof-of-work cryptos need computer power to produce blocks in a pointless, energy-intensive arms race. A Cardano node, in contrast, can be run on a very low-powered processor, such as a Raspberry Pi. More than 40 million of these have been produced, many for schools in developing countries because they cost just $40-$70. This simplicity also reduces plastic and e-waste.

Carbon-neutral blockchains

The extreme weather events and forest fires of recent months, along with the UN’s landmark (and chilling) study into global warming and climate change, has thrown this into even-sharper relief. Deforestation, ice-shelf depletion, and global warming are all in the public eye. Heat waves in many parts of the world are damaging the environment, and forest fires are devastating many areas. Consequently, anything that contributes to the sustainability problem comes under scrutiny. This includes the growing cryptocurrency industry.

On December 12 2015, 196 countries signed up to the Paris Agreement, a legally binding treaty to limit global warming to 2C. A 'net-zero emissions' race is now underway, aiming to cut carbon dioxide emissions sharply by 2050. The next stage in this process is COP26, the United Nations conference in Glasgow in November.

When it comes to addressing environmental problems, there are no easy answers. Cardano is a decentralized platform that can replace the inefficiencies of older and legacy systems. With its sustainability credentials, Cardano, and other proof-of-stake protocols, are seen as part of the solution, rather than contributing to the problem caused by Bitcoin and Ethereum.

A closer look at the cFund

First announced at last year’s Shelley summit, the cFund is an early-stage investment fund focused on innovative companies primarily utilizing the Cardano blockchain and its technology.

28 July 2021 Fernando Sanchez 5 mins read

A closer look at the cFund

As we move closer to smart contracts on Cardano, fund activity is now accelerating. We spoke with David Roebuck, Principal at Wave Financial, to find out more about the fund and its goals.

What is the cFund?

The cFund is a crypto-native hedge fund managed by Wave Financial in partnership with IOG. The fund employs an early-stage venture strategy and invests in innovative technology companies developing applications, businesses, and products being deployed on Cardano and in other R&D projects IOG is working on.

And why the name cFund?

The “c” in the name is a reference to the mathematical term “coefficient” which refers to the multiplier of a variable. Leveraging both IOG’s and Wave Financial’s domain expertise and industry connections, cFund is positioned to create a multiplier effect for its portfolio companies in terms of growth and reach.

What was the rationale for the introduction of the cFund?

IOG is focused on accomplishing two objectives. One is enabling developers to build scalable, interoperable, and sustainable blockchain-based solutions. The other is to foster financial inclusion to the underserved populations of the world. Ultimately, IOG aims to create a new financial infrastructure for emerging economies by cultivating a community of DApps and protocols deployed on Cardano and other blockchains.

To help IOG achieve this vision, it partnered with Wave Financial, a digital asset manager with ~$500 million in assets under management across various different strategies and products, to create cFund.

How does the cFund fit in with the whole ecosystem (Cardano, Project Catalyst, etc)?

While the cFund, IOG, and the Cardano Foundation all operate independently, they look for opportunities to collaborate. cFund in particular evaluates and provides strategic advice to its portfolio companies wishing to deploy on the Cardano blockchain.

Tell us more about the investment approach

cFund is funded by third-party, high-net worth individuals, family offices, and institutional investors (including IOG). cFund looks to invest in, and partner with, leading early-stage projects and businesses that primarily have a focus on the Cardano ecosystem and associated technology. The fund is already actively deploying capital and creating partnerships across the Cardano ecosystem.

When analyzing investment opportunities, cFund takes a disciplined approach that considers a multitude of factors when evaluating an opportunity. Firstly, the fund evaluates whether there is a clear need in the market for the offering a company provides and determines if other competitors can out-execute. In venture, we call this timing the market. Next, the fund evaluates the background of the team to determine if the founders have the knowledge, skills, resources, and ability to scale their company or project. The fund also considers possible exit scenarios.

Since one of cFund’s primary objectives is to help Cardano build alliances across the blockchain space, one of the most important factors cFund considers during its due diligence process is whether or not the company can be a value-add to the Cardano ecosystem.

One market that cFund has been deploying capital into is Decentralized Finance (DeFi), or more broadly, what is called Open Finance. cFund’s first investment in this market was COTI, a decentralized and scalable payments network for the global e-commerce market. COTI is a value-add because it plans to provide a bridge for DeFi applications wishing to deploy on the Cardano blockchain. The company is now developing ADA Pay, a gateway solution that enables merchants to accept payments in ada (the native protocol token for Cardano) with near-instant settlement. The company is also developing a stablecoin that will run on Cardano.

Another DeFI investment in the portfolio is Blockswap, which is an automated liquidity protocol for proof of stake chains that allows users to re-stake their staked assets. Blockswap brings liquidity for staking activities, providing DeFi benefits to the network. Users will be able to re-stake their fully staked assets, earning yield without the use of a synthetic asset.

cFund’s most recent investment in this space is Occam.Fi, a suite of DeFi solutions tailored for Cardano. The company’s first product is a decentralized funding platform. Through this launchpad, the next generation of disruptive DeFi applications will be able to raise capital using the Cardano blockchain. Overall, DeFi is one of a number of markets cFund invests in, but ideally the portfolio companies must have the capability of building on the Cardano ecosystem in some capacity.

Aside from investment, what else do you offer?

cFund is both a capital provider, an advisor, and a partner to its portfolio companies and the broader Cardano ecosystem. Leveraging IOG and Wave Financial’s resources, reputation, expertise, and network, cFund provides unparalleled access and guidance to its portfolio. cFund firmly believes in being a value-added investor. cFund aspires to be a management team's first call.

If there are businesses reading this who might want to be considered for funding, what should they do?

Prospective projects and businesses can reach out to Wave Financial’s early-stage distribution email, or directly message and/or follow me on Twitter.

What is the long-term plan for the cFund?

cFund aims to be the leading early-stage venture firm that invests primarily in Cardano blockchain based technologies besides becoming an integral part of the Cardano ecosystem. In line with IOG’s founding principle of cascading disruption, the idea that most of the structures that form global financial, governance and social systems are inherently unstable and thus minor perturbations can cause a ripple effect that fundamentally re-configures the entire system. cFund's goal is to identify and back technologies that force these perturbations together to push to a fair and transparent order for all stakeholders.

Thanks for your time, David.

Additional resources

  • cFund page
  • Wave Financial website
  • Cardano website

Cardano’s Extended UTXO accounting model – built to support multi-assets and smart contracts (part 2)

In the second part of our blog on Cardano’s EUTXO accounting model, we take a more technical look at transaction components, the UTXO set, and delve deeper into the rationale for Cardano’s EUTXO model

12 March 2021 Fernando Sanchez 5 mins read

Cardano’s Extended UTXO accounting model – built to support multi-assets and smart contracts (part 2)

Yesterday we offered an overview of the Extended UTXO model employed by Cardano, explaining how it differs from the approaches taken by Bitcoin and Ethereum. Now let’s dive a little deeper into inputs and outputs, the component parts of a transaction.

We need to talk about transactions: Outputs and Inputs

The term transaction usually evokes financial echoes. While such meaning would apply to Bitcoin (since the Bitcoin blockchain is used to move funds between peers), many other blockchains (including Cardano) are far more versatile. In these cases, the term ‘transaction’ is much more nuanced. One can think of transactions as transfers of value.

In a blockchain environment, each transaction can have one or multiple inputs, and one or multiple outputs. The concepts of Inputs and Outputs must be understood, if one wants to understand how a transaction works, and how it relates to UTXO. In abstract terms, think of a transaction as the action that unlocks previous outputs, and creates new ones.

Transaction output

A transaction output includes an address (that you can think of as a lock) and a value. In keeping with this analogy, the signature that belongs to the address is the key to unlock the output. Once unlocked, an output can be used as input. New transactions spend outputs of previous transactions, and produce new outputs that can be consumed by future transactions. Each UTXO can only be consumed once, and as a whole. Each output can be spent by exactly one input, and one input only.

Transaction input

A transaction input is the output of a previous transaction. Transaction inputs include a pointer and a cryptographic signature that acts as the unlocking key. The pointer points back to a previous transaction output, and the key unlocks this output. When an output is unlocked by an input, the blockchain marks the unlocked output as “spent”. New outputs created by a given transaction can then be pointed to by new inputs, and so the chain continues. These new outputs (which have not yet been unlocked, i.e., spent) are the UTXOs. Unspent outputs are simply that, outputs that have not yet been spent.

How UTXO works, in a nutshell

In a UTXO accounting model, transactions consume unspent outputs from previous transactions, and produce new outputs that can be used as inputs for future transactions.

The users' wallets manage these UTXOs and initiate transactions involving the UTXOs owned by the user. Every blockchain node maintains a record of the subset of all UTXOs at all times. This is called the UTXO set. In technical terms, this is the chainstate, which is stored in the data directory of every node. When a new block is added to the chain, the chainstate is updated accordingly. This new block contains the list of latest transactions (including of course a record of spent UTXOs, and new ones created since the chainstate was last updated). Every node maintains an exact copy of the chainstate.

EUTXO: The rationale behind Cardano's choice

Bitcoin’s ‘vanilla’ UTXO accounting model would not suit Cardano, as Cardano is designed to do more than handle payments. Particularly, the need for more programming expressiveness for the upcoming smart contracts functionality in the Alonzo era required a novel (‘Extended’) solution.

The 'basic' UTXO model has a limited expressiveness of programmability. Ethereum's Account/Balance accounting model addressed this specific problem with the development of an account-based ledger and associated contract accounts. But by doing so, the semantics of the contract code became far more complex, which had the unwanted effect of forcing contract authors to fully grasp the nuances of the semantics to avoid the introduction of potentially very costly vulnerabilities in the code.

An ‘extended’ UTXO solution would require two pieces of additional functionality that the existing UTXO model could not provide:

1 - To be able to maintain the contract state

2 - To be able to enforce that the same contract code is used along the entire sequence of transactions. We call this continuity.

A powerful feature of the EUTXO model is that the fees required for a valid transaction can be predicted precisely prior to posting it. This is a unique feature not found in account-based models.

How does the EUTXO model extend UTXO?

By adding custom data to outputs (in addition to value), and by allowing for more "locks" and "keys" deciding under which condition an output can be unlocked for consumption by a transaction. In other words, instead of just having public keys (hashes) for locks and corresponding signatures serving as "keys", EUTXO enables arbitrary logic in the form of scripts. This arbitrary logic inspects the transaction and the data to decide whether the transaction is allowed to use an input or not.

Conclusion: What makes the EUTXO model innovative and relevant

Cardano's ledger model extends the UTXO model to support multi-assets and smart contracts without compromising the core advantages of a UTXO model. Our innovative research enables functionality beyond what is supported in any other UTXO ledger, making Cardano a unique competitor in the next-generation blockchain space.

Cardano’s Extended UTXO accounting model – built to support multi-assets and smart contracts

Cardano uses an innovative Extended UTXO accounting model to support multi-assets and smart contracts. In the first of a two-part blog, we look at the different blockchain accounting systems and why EUTXO matters

11 March 2021 Fernando Sanchez 5 mins read

Cardano’s Extended UTXO accounting model – built to support multi-assets and smart contracts

Blockchain networks are complex data structures. Transactions continuously crisscross the chain, creating digital footprints that require careful tracking and management to maintain the integrity and reliability of the underlying ledger.

Two major accounting ledgers exist in the blockchain space: UTXO-based blockchains (Bitcoin, for instance), and Account/Balance chains (Ethereum, and others).

Each of these crypto heavyweights differs in many fundamental ways, but this article focuses on their accounting models. Bitcoin uses an Unspent Transaction Output (UTXO) model, whereas Ethereum deploys an Account/Balance one.

Cardano sought to combine Bitcoin’s UTXO model with Ethereum’s ability to handle smart contracts into an Extended UTXO (EUTXO) accounting model. The adoption of EUTXO facilitates the implementation of smart contracts into the Cardano chain.

What is a blockchain accounting model?

Every company, firm, or commercial entity requires a balance sheet to keep an accurate record of profit, loss, cash flow, and other parameters. By maintaining careful accounting of all this data, companies can, at a glance, visualize their financial status at any given point in time. A company's accounting ledger offers another advantage: The ability to trace the provenance and ownership of funds.

Blockchain networks also require an accounting model to determine who owns what coins (and how many of them), track where those coins go, which ones are used up, and which ones remain available to be spent.

UTXO model v Account/Balance model: A brief overview

Decades ago, accountants used physical ledger books with handwritten entries to keep records about the movement of funds. Nowadays, companies use electronic versions of the same thing. Blockchains use transactions as records (much like entries on a ledger book) to track provenance and ownership. These transactions contain a lot of information (where the coins come from, where they're going, and whatever change is leftover from these transactions).

Here’s a brief overview of the UTXO and Account/Balance models:

UTXO

In a UTXO model, the movement of assets is recorded in the form of a directed acyclic graph where the nodes are transactions and the edges are transaction outputs, where each additional transaction consumes some of the UTXOs and adds new ones. The users' wallets keep track of a list of unspent outputs associated with all addresses owned by the user, and calculate the users’ balance.

UTXO is, in many ways, similar to cash. A good analogy is this: Imagine you have $50 in your wallet. This amount could be made up with several combinations: two $20 bills and one $10, four $10 bills and two $5 bills, and many others. But regardless of the permutations, the amount ($50) remains equal. UTXOs work in the same way. Whatever balance you have in your blockchain wallet (say, 150 coins) could be made up with many different UTXO combinations, based on previous transactions, but the balance amount remains the same. In other words, the balance held in a given wallet address is the sum of all unspent UTXOs from previous transactions.

The concept of 'change' in UTXO models

Much like cash transactions in any store, UTXOs introduce ‘change.’ When you take out say a $50 bill from your wallet, you cannot tear that bill into smaller pieces to pay for something that costs $15, for example. You have to hand over the entire $50 bill and receive your change from the cashier. UTXOs work in the same way. You cannot ‘split’ a UTXO into smaller bits. UTXOs are used whole, and change given back to your wallet’s address in the form of a smaller UTXO.

The advantages of UTXO models

By checking and tracking the size, age, and amount of UTXOs being transferred around, one can extract accurate metrics about the blockchain’s usage and financial activity of the chain.

UTXO models offer other advantages. Better scalability and privacy, for example. Also, the transaction logic is simplified, as each UTXO can only be consumed once and as a whole, which makes transaction verification much simpler.

To sum UTXO up:

  • A UTXO is the output of a previous transaction, which can be spent in the future
  • UTXO chains have no accounts. Instead, coins are stored as a list of UTXOs, and transactions are created by consuming existing UTXOs and producing new ones in their place
  • Balance is the sum of UTXOs controlled by a given address
  • UTXOs resemble cash in that they use ‘change’, and are indivisible (UTXOs are used whole)

The Account/Balance model

As the name indicates, blockchain models that deploy an Account/Balance accounting model use an account (which can be controlled by a private key or a smart contract) to hold a coin balance. In this model, assets are represented as balances within users’ accounts, and the balances are stored as a global state of accounts, kept by each node, and updated with every transaction.

In many respects, Account/Balance chains (such as Ethereum) operate in a similar fashion to traditional bank accounts. The wallet's balance increases when coins are deposited, and decreases when coins are transferred elsewhere. The crucial difference here is that, unlike UTXOs, you can use your balance partially. So for example, if you have 100 ETH in your account, you can send a portion of that (say, 30 ETH) to someone else. The resulting balance will be 70 ETH remaining in your account, and the address where you sent the coins to will increase by 30 ETH. The concept of change does not apply in Account/Balance accounting models as it does in UTXO ones.

To sum up the Account/Balance model:

  • This accounting model resembles how a bank operates
  • Users have accounts that hold their coin balance
  • It is possible to spent partial balances
  • The concept of change does not apply

Tomorrow, in the second part of this analysis, we'll discuss how each model deals with transactions, explain the rationale for developing the EUTXO model for Cardano, and provide an in-depth explanation of what EUTXO is and how it works.