Tag: gas fees

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

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

    A decentralised application, or dApp, can look just like any other website. It may have buttons, forms, charts, and a familiar login screen. The difference is not mainly visual; it lies in where the important rules and records live.

    A typical dApp has three layers. The frontend is the website or mobile interface. A wallet connects the user’s account and signs instructions. Smart contracts on a blockchain hold the shared state and enforce the core rules. The interface might say Swap, but the contract determines what assets move and under which conditions.

    Reading from a dApp can be almost invisible. The website asks a node for contract data and displays balances or prices. Writing is different: changing blockchain state requires a transaction. Your wallet shows what is being requested, you sign it, the network executes it, and gas is paid even if the transaction later fails.

    Decentralisation is not an all-or-nothing label. A contract may be immutable while its website is hosted by one company. Its data may depend on a centralised server, or an administrator may retain an upgrade key. A useful evaluation asks which parts can be censored, changed, or switched off—and by whom.

    Wallet-based access removes the need to create a new username and password for every service, but it changes the security model. A signature can authorise a harmless login, a token approval, or a valuable transfer. Users must understand the request because there may be no support desk capable of reversing a mistaken signature.

    Good dApps make these boundaries clear: they show contract addresses, transaction details, risks, and the source of external data. Open contracts can be inspected and reused, but open code does not mean bug-free code. Audits help; they never turn software into a guarantee.

    One puzzle remains. A smart contract can read blockchain data, but how can a lending app learn the rupee price of ether or whether it rained in Delhi? Tomorrow we meet the bridge called an oracle.

  • Day 10 — Why Does Ethereum Charge Gas for Every Tiny Step?

    A measured gas meter limiting the computational work of Ethereum

    We now know that Ethereum nodes repeat the instructions inside a smart contract so that the network can agree on one result. That shared execution creates a new problem. Computation is not free. If anybody could ask every node to perform unlimited work, a careless program or an attacker could keep the network busy forever.

    Ethereum solves this with gas. Gas is a unit used to measure the amount of computational work a transaction requires. Adding two numbers costs a small amount. Reading or changing stored data costs more. Deploying a large smart contract may require much more. Gas is not a separate coin; it is the meter that counts the work, while the fee is paid in ether.

    Think of it like taking a taxi. Distance is not money, but it helps calculate the fare. In the same way, gas measures the journey through a program. A user sets a limit on how much gas the transaction may consume. If the contract finishes within that limit, unused capacity is not charged. If it runs out, execution stops so that the program cannot consume resources endlessly.

    The final fee also depends on what the network is charging for each unit of gas. When many people want their transactions included, block space becomes more competitive and fees can rise. A user can also offer an additional priority fee to encourage faster inclusion. This is why two identical actions performed at different times may cost different amounts.

    Gas protects the network, but it can surprise beginners. A transaction that fails may still consume a fee because nodes already performed work before discovering the failure. Paying for computation does not guarantee that the intended result will succeed; it pays the network for checking and executing the attempt.

    This system turns computation into a scarce resource and discourages spam. It also explains why developers try to write efficient contracts and why scaling Ethereum matters so much. Before we reach scaling, however, we need to understand who is authorising these paid instructions.

    When a website sees a password, it asks a company’s server whether the password is correct. Ethereum has no such account desk. So how can a wallet prove that a transaction truly came from you without sending a password to the network? The answer lies in digital signatures.