Tag: smart contracts

  • Day 25 — How Can a Crypto Treasury Avoid One Dangerous Key?

    Watercolor illustration of several trusted signers jointly unlocking a multisignature crypto treasury

    Why a crypto treasury needs shared control

    A crypto treasury can hold serious value. Therefore, one private key should not control everything.

    If that one key is lost, stolen, or used badly, the whole treasury can be at risk.

    This is why teams often use a multisig, also called a multisignature wallet.

    What a multisig does

    A multisig wallet requires more than one approval before funds can move.

    For example, a two-of-three setup has three signers. Any two must approve a transaction.

    As a result, one compromised key is not enough to empty the treasury.

    Why this matters for DAOs

    Many DAOs and crypto teams use treasuries to pay contributors, fund projects, and manage reserves.

    A shared treasury needs clear rules. It also needs signers who understand their responsibility.

    Good treasury security is not only about tools. It is also about process.

    The human side of key management

    Signers should store keys safely. They should also avoid approving transactions they do not understand.

    In addition, teams should decide what happens if a signer leaves, loses access, or becomes inactive.

    The takeaway

    A crypto treasury should avoid depending on one dangerous key.

    A multisig spreads control, reduces single-point failure, and makes treasury decisions easier to review.

  • Day 24 — Can an Online Community Run an Organisation?

    Watercolor illustration of a DAO community voting on proposals around a shared treasury

    A decentralised autonomous organisation, or DAO, is an attempt to coordinate people and shared resources using blockchain-based rules. Instead of every decision being made by a traditional management hierarchy, members can create proposals, vote, and direct a treasury through smart contracts.

    Many DAOs use governance tokens. A holder may vote on protocol fees, upgrades, grants, or which assets a treasury should hold. Proposals often move through discussion, a formal vote, and then execution. Some systems execute successful votes automatically; others rely on a committee or multisignature wallet.

    The word autonomous can be overstated. Writing proposals, evaluating trade-offs, maintaining software, and negotiating partnerships remain human work. Smart contracts can enforce a voting process and treasury rule, but they cannot decide what a community should value.

    Token voting also does not guarantee equal power. Wealthy holders, founders, investors, or exchanges may control a large share of votes. Participation is often low, so a small organised group can outweigh thousands of passive members. Delegation helps people assign their votes to informed representatives, while creating its own centres of influence.

    Governance has technical risks as well. Attackers may borrow voting power, exploit poorly written execution code, or rush harmful proposals through inattentive communities. Sensible systems use proposal thresholds, voting delays, timelocks, transparent delegates, and emergency procedures, though every safeguard adds friction or trust.

    A strong DAO is therefore more than a token and a chat group. It needs clear scope, reliable information, accountable contributors, conflict resolution, and a treasury process people can audit. The blockchain records decisions; community culture determines whether those decisions are thoughtful.

    Large treasuries rarely let one person hold the only key. Tomorrow, on Day 25, we will close this first arc with the multisignature wallet—a simple tool for turning shared responsibility into an enforceable rule.

  • Day 22 — What Happens When a DeFi Loan Becomes Unsafe?

    Watercolor illustration of a DeFi loan health meter triggering collateral liquidation

    A DeFi loan begins with more collateral value than debt, but crypto prices can move quickly. If the collateral falls far enough, the protocol cannot wait for a human conversation or a monthly payment. Its smart contracts enforce a liquidation rule.

    Each market defines a threshold that determines how much borrowing a particular asset can support. Interfaces may summarise the buffer as a health factor. A comfortable value means the collateral can absorb some decline; a value near the limit means even a small price move may make the position eligible for liquidation.

    When the threshold is crossed, an independent liquidator can repay part of the borrower’s debt and receive some collateral, usually with a bonus. That reward motivates bots to act quickly. The protocol reduces risky debt, lenders remain better protected, and the borrower loses collateral plus a penalty.

    Consider ether collateral worth $1,500 against an $800 loan. If ether falls and the permitted borrowing limit drops below the debt, liquidation can begin. Adding collateral or repaying part of the loan before that point restores the safety margin. Watching only the original deposit price is not enough because the relevant values update continuously.

    Liquidation depends heavily on price oracles. A delayed or manipulated price can liquidate healthy users or leave the protocol with bad debt. Network congestion also matters: when many positions fail together, gas costs rise and liquidators may struggle to process them quickly.

    Borrowers can reduce risk by using less leverage, choosing strong collateral, maintaining a wide buffer, monitoring alerts, and understanding the exact threshold and penalty. There is no universal safe ratio because volatility, oracle design, and protocol rules differ.

    Liquidations show that attractive borrowing and lending rates come from a system of incentives and risk controls. Tomorrow we will ask the broader question behind every advertised return: where does crypto yield actually come from?

  • Day 21 — How Can DeFi Lend Money Without a Credit Score?

    Watercolor illustration of borrowers and lenders connected through an overcollateralized DeFi lending pool

    A bank can evaluate salary, identity, and repayment history before making a loan. A public blockchain usually does not know those facts. DeFi lending therefore relies on a different protection: borrowers commonly lock collateral worth more than the amount they borrow.

    Lenders deposit assets into a smart-contract pool. Borrowers draw from that shared pool after supplying acceptable collateral. The protocol records deposits, debts, interest, and collateral ratios on-chain, while its rules apply equally to any wallet that can submit a valid transaction.

    Imagine depositing ether worth $1,500 and borrowing $800 in stablecoins. You still benefit if ether rises, and you gain spendable stablecoins without selling it. But if ether falls, the safety margin shrinks. Borrowing the maximum allowed amount leaves very little room for market movement.

    Interest rates are often driven by utilisation. When most of a pool is available, borrowing can be cheap. As more assets are borrowed and liquidity becomes scarce, rates rise to encourage repayment and attract new deposits. The exact curve is code defined by each protocol.

    This system makes loans fast and transparent, but it is not unsecured credit. Overcollateralisation protects lenders precisely because the protocol cannot chase an anonymous borrower later. It also means borrowers already need valuable assets, so DeFi lending does not solve every financial access problem.

    Depositors face risks too: smart-contract bugs, bad collateral, oracle failures, governance changes, and periods when withdrawals are constrained because too much of the pool is borrowed. A displayed supply rate can change rapidly and is not the same as a guaranteed bank deposit.

    If collateral can fall below the safe level, the protocol needs a way to act before the loan becomes undercollateralised. Tomorrow we will examine liquidation—the automatic process that protects the pool but can be painful for borrowers.

  • Day 19 — How Can You Trade Without an Order Book?

    Watercolor illustration of an automated market maker balancing two token reserves in a liquidity pool

    Trading without an order book

    An automated market maker, or AMM, lets people trade crypto without a traditional order book.

    Instead of matching buyers with sellers, an AMM uses a liquidity pool and a pricing formula.

    This is one reason decentralized exchanges can run directly on blockchains.

    What a liquidity pool is

    A liquidity pool holds two or more tokens inside a smart contract.

    Users called liquidity providers deposit tokens into the pool. In return, they may earn trading fees.

    When someone swaps tokens, they trade against the pool rather than another person.

    How the price changes

    Many basic AMMs use a simple idea often written as x*y=k.

    If a trader removes one token from the pool, the pool charges more of the other token.

    Therefore, large trades can move the price more. This effect is called slippage.

    Why arbitrage matters

    AMM prices can drift away from prices on other markets.

    Arbitrage traders notice the gap. Then they trade until the AMM price comes closer to the wider market.

    The takeaway

    An automated market maker turns a smart contract into a simple trading venue.

    It is open and useful, but traders still need to understand liquidity, slippage, and smart contract risk.

  • Day 18 — What Is DeFi If There Is No Bank Behind It?

    Watercolor illustration of open financial services connected through decentralized smart contracts

    What decentralized finance means

    Decentralized finance, or DeFi, uses smart contracts to build financial tools on public blockchains.

    Traditional finance depends on banks, brokers, and payment companies. Decentralized finance depends on wallets, tokens, contracts, and open networks.

    The goal is not to remove every human. Instead, the goal is to make core rules more open and programmable.

    What DeFi apps can do

    A DeFi app may let users swap tokens, lend assets, borrow against collateral, or supply liquidity.

    These actions happen through smart contracts. The contracts hold assets and follow predefined rules.

    Because the rules are on-chain, users can often inspect how the system works.

    Why wallets matter

    In decentralized finance, a wallet is the user’s account.

    The wallet signs actions and connects to applications. This gives users direct control.

    However, direct control also means mistakes can be expensive.

    The main risks

    DeFi has smart contract risk, market risk, oracle risk, liquidity risk, and user-error risk.

    For example, approving a bad contract can put funds at risk.

    Therefore, open access does not mean automatic safety.

    The takeaway

    Decentralized finance is finance built with blockchain-based rules.

    It can be open and powerful, but it must be used carefully.

  • Day 16 — How Can a Blockchain Know What Happened Outside It?

    Watercolor illustration of an oracle bridge carrying real-world data onto a blockchain

    Why blockchains need oracles

    A blockchain oracle brings outside information to a blockchain. Smart contracts need this because they cannot freely browse the web.

    That limitation is intentional. Every node must be able to reach the same result.

    If each node fetched a website on its own, the answers could differ. Then the network could not agree.

    The oracle problem

    Smart contracts can verify on-chain data easily. However, real-world facts live outside the chain.

    For example, a lending app may need the price of ether. A prediction market may need a sports result. An insurance contract may need weather data.

    An oracle delivers that information in a form the contract can use.

    Why trust still matters

    An oracle can become a weak point. If it reports a bad price, a contract may make a bad decision.

    Because of that, many oracle systems use several data sources. Some also use multiple operators.

    This reduces risk, but it does not remove risk completely.

    A simple example

    Imagine a smart contract that lends stablecoins against ether. It must know the current ether price.

    The oracle supplies that price. Then the contract can decide whether a loan is safe.

    The takeaway

    A blockchain oracle is a bridge between on-chain code and outside facts. It is useful, but it must be designed carefully.

  • Day 15 — What Actually Makes an App a dApp?

    Watercolor illustration of a user interface connecting a wallet to decentralized smart contracts

    What a decentralized application is

    A decentralized application, or dApp, is an app that uses blockchain-based rules instead of relying only on one company’s server.

    The screen may look like a normal website. However, the important actions connect to smart contracts.

    That is what makes a decentralized application different from a regular web app.

    The frontend still matters

    Most dApps still have a frontend. This is the page users see in the browser.

    The frontend helps users read information, choose actions, and connect a wallet.

    So, a decentralized application is not only smart contracts. It also needs a usable interface.

    The wallet replaces the login

    In many dApps, the wallet acts like the user account.

    The wallet signs messages and transactions. Then the blockchain can verify that the action came from the right user.

    This gives users more control, but it also creates more responsibility.

    Smart contracts hold the rules

    A smart contract is code that runs on a blockchain.

    For a decentralized application, smart contracts may manage tokens, lending, voting, swaps, or game items.

    Because the rules are public, users can inspect them. Still, public code can contain bugs.

    The takeaway

    A decentralized application combines a frontend, wallets, smart contracts, and on-chain state.

    It can be powerful because users interact with open rules. However, they must also understand fees, signatures, and contract risk.

  • Day 13 — Is Every Crypto Token Its Own Blockchain?

    Watercolor illustration of many tokens recorded inside one Ethereum smart contract

    Tokens do not always need their own blockchain

    Crypto tokens often live on an existing blockchain. Many do not have their own separate network.

    This surprises many beginners. A wallet may show many assets, but several can be smart contracts on Ethereum.

    So a token is usually a record managed by code.

    What a token contract does

    A token contract keeps track of balances. It knows how many units each address owns.

    It also defines transfer rules. When you send tokens, Ethereum runs the contract and updates those balances.

    No tiny token file travels through the internet. Instead, the contract changes its ledger.

    Why this is useful

    Creating a new blockchain is difficult. It needs validators, security, infrastructure, wallets, and users.

    Creating a token on an existing chain is easier. The token can use the security and tooling of that chain.

    Therefore, many projects launch tokens before they ever consider their own network.

    Coins versus tokens

    A coin usually belongs to the base blockchain. Bitcoin belongs to Bitcoin. Ether belongs to Ethereum.

    A token is usually built on top of a chain. For example, many stablecoins and governance tokens run as Ethereum token contracts.

    The takeaway

    Crypto tokens are often smart-contract records. They use an existing blockchain for settlement, security, and visibility.

    That is why one wallet can hold many assets without each asset having its own blockchain.