Skip to content

Blockchain Interview Questions in Visakhapatnam

36 practice questions with answers for Blockchain interviews in Visakhapatnam.

Blockchain jobs in Visakhapatnam

Visakhapatnam (Vizag) has a developing IT market with delivery centres, start-ups and IT parks around Rushikonda. Many local candidates also apply to Hyderabad and remote roles, so a mix of service and product styles is common.

Below are 36 questions that match the mix of service, product and domain employers hiring blockchain developers in Visakhapatnam.

Solved for VisakhapatnamStart practicing
3 QUESTIONS FREESign up to unlock the full question bank and track your progress.Unlock every question and answer, then continue practising company-wise and package-wise.
3 questions free Unlock the rest in seconds
01

What is a Merkle tree and what is a Merkle proof?

Save to ▾
Show answer
A Merkle tree hashes data items in pairs, level by level, until one root hash remains. The root summarises all items: changing any item changes the root. A Merkle proof is the list of sibling hashes on the path from one item to the root. With it, a light client can prove that a transaction is in a block using about log2(n) hashes instead of downloading all transactions. Airdrop allowlists use the same trick on-chain.
02

Compare interfaces, abstract contracts and libraries.

Save to ▾
Show answer
An interface only declares external functions, events and errors, with no state or implementation; it is used to call other contracts, like IERC20. An abstract contract can have state and implemented functions but leaves at least one unimplemented or is marked abstract, so it cannot be deployed alone. A library holds reusable functions without state; internal library functions are inlined, while external ones are deployed once and called via delegatecall. Libraries can attach to types with using for.
03

Which tools do you use for static analysis and fuzzing of smart contracts?

Save to ▾
Show answer
Slither performs static analysis and quickly flags reentrancy, unchecked calls, shadowing and more. Aderyn is another fast static analyser. Foundry provides fuzz and invariant testing, where random sequences of calls try to break properties you define. Echidna and Medusa are property-based fuzzers. Mythril and Halmos use symbolic execution, and Certora offers formal verification. Combining them with manual review and high test coverage catches far more than any single tool.
04

How do you listen to contract events and query past events with ethers?

Save to ▾
Show answer
Use contract.on for live events and queryFilter for history. const abi = ['event Transfer(address indexed from, address indexed to, uint256 value)']; const token = new Contract(TOKEN, abi, provider); token.on('Transfer', (from, to, value, event) => { console.log(from, to, value.toString(), event.log.blockNumber); }); const filter = token.filters.Transfer(null, MY_ADDRESS); const past = await token.queryFilter(filter, -5000); // last 5000 blocks console.log(past.length); Use a WebSocket provider for live events, and page large ranges because providers limit block spans.
05

Why do you want to work in DeFi, given its risks and volatility?

Save to ▾
Show answer
I am drawn to DeFi because it turns financial products into open, auditable code, and that combination of finance and engineering motivates me. I understand the risks: hacks, market crashes and regulatory change. That is why I have focused on security, testing and risk thinking, not just writing contracts. I see volatility as a reason to build carefully. I want to work on a team that values audits, monitoring and user protection.
06

What are events and logs in Ethereum?

Save to ▾
Show answer
Events are declared in Solidity and emitted with emit; the EVM writes them as logs in the transaction receipt. Each log has the contract address, up to three indexed topics plus the event signature hash, and non-indexed data. Logs are much cheaper than storage but contracts cannot read them. Front-ends and indexers subscribe to events to update the UI, track token transfers and build history, so emitting clear events for every state change is good practice.
07

How do you read the latest finalized block with ethers.js, and why use it?

Save to ▾
Show answer
Pass the block tag to getBlock. The finalized tag returns the latest block that Proof of Stake has finalised, which cannot be reverted without slashing a third of stake. import { JsonRpcProvider } from 'ethers'; const provider = new JsonRpcProvider(process.env.RPC_URL); const latest = await provider.getBlock('latest'); const safe = await provider.getBlock('safe'); const finalized = await provider.getBlock('finalized'); console.log(latest.number - finalized.number); // usually about 64-96 Use finalized for deposits and accounting; use latest for UI updates.
08

Your dApp needs a full history of user transactions and fast queries. Reading events from the node is too slow. What do you do?

Save to ▾
Show answer
Build or use an indexer. An indexer listens to contract events from a start block, transforms them and stores them in a database like PostgreSQL, so the front-end runs normal fast queries. Options are a subgraph on The Graph, hosted indexing services, or a custom service with ethers and a queue. It must handle reorgs by tracking block hashes, support backfilling, and expose an API. Design events up front with indexed fields that queries need.
09

How is a sidechain different from a rollup?

Save to ▾
Show answer
A sidechain is an independent blockchain with its own validators and consensus, connected to the main chain by a bridge. Its security depends on its own validator set, so if they collude, funds can be stolen. A rollup posts its transaction data and state roots to Ethereum and relies on fraud or validity proofs, so it inherits Layer 1 security for correctness. Sidechains are usually cheaper and more flexible, but rollups give stronger guarantees.
10

How do you manage deployer private keys in a CI/CD pipeline?

Save to ▾
Show answer
Never commit keys or put them in plain environment files. For testnets, use CI secret storage with restricted access. For mainnet, avoid hot keys in CI entirely: have CI produce a transaction proposal that signers approve in a multisig, or use a cloud KMS or HSM signer so the key never leaves secure hardware. Separate deployer and admin roles, transfer ownership to a multisig immediately after deployment, and log and review every deployment.
11

How would you implement Sign-In with Ethereum on a web back-end?

Save to ▾
Show answer
Follow EIP-4361. The server generates a random nonce and stores it in the session. The front-end builds a SIWE message with domain, address, statement, URI, chain ID, nonce and issued-at time, and the wallet signs it. The server verifies the signature with a SIWE library, checks domain, nonce, expiry and chain, then issues a session cookie or JWT and deletes the nonce. For smart contract wallets, verify via ERC-1271 isValidSignature.
12

What is the difference between an execution client and a consensus client, and why does client diversity matter?

Save to ▾
Show answer
Since the Merge, an Ethereum node runs two pieces of software. The execution client, such as Geth, Nethermind, Besu, Erigon or Reth, runs the EVM, holds state and handles transactions. The consensus client, such as Lighthouse, Prysm, Teku, Nimbus or Lodestar, runs Proof of Stake. They talk over the Engine API. Client diversity matters because a bug in a client used by over two-thirds of validators could finalise an invalid chain and cause mass slashing.
13

Show a contract vulnerable to reentrancy and a fixed version.

Save to ▾
Show answer
Vulnerable: the balance is cleared after sending. function withdraw() external { uint256 bal = balances[msg.sender]; (bool ok, ) = msg.sender.call{value: bal}(''); require(ok); balances[msg.sender] = 0; } Fixed: update state first and add a guard. import {ReentrancyGuard} from '@openzeppelin/contracts/utils/ReentrancyGuard.sol'; function withdraw() external nonReentrant { uint256 bal = balances[msg.sender]; require(bal > 0, 'nothing'); balances[msg.sender] = 0; (bool ok, ) = msg.sender.call{value: bal}(''); require(ok, 'send failed'); }
14

How does inheritance work in Solidity, including virtual and override?

Save to ▾
Show answer
A contract inherits with is, for example contract Token is ERC20, Ownable. Parent functions that may be changed must be marked virtual, and the child must use override; with several parents you list them, as in override(A, B). Solidity uses C3 linearisation, so the order of the parent list matters, from most base to most derived, and super calls the next contract in that order. Constructors of parents run first in linearised order.
15

Write a simple Proof of Work loop in Python with a difficulty setting.

Save to ▾
Show answer
The miner increments the nonce until the hash starts with the required number of zero hex digits. import hashlib def mine(data, difficulty=4): prefix = '0' * difficulty nonce = 0 while True: h = hashlib.sha256(f'{data}{nonce}'.encode()).hexdigest() if h.startswith(prefix): return nonce, h nonce += 1 print(mine('block-1: A pays B 5')) Each extra zero makes mining about 16 times harder, while verifying still needs one hash.
16

A user's transaction has been pending for an hour. How do you troubleshoot it?

Save to ▾
Show answer
First check it on a block explorer: if it is not found, it was never broadcast. If pending, the fee is probably below current market rates, or an earlier transaction with a lower nonce is stuck and blocking it. On Ethereum you fix it by sending a replacement with the same nonce and a higher max fee and priority fee, or cancel by sending zero ETH to yourself with that nonce. Then make the wallet estimate fees dynamically.
17

How do you connect a browser wallet to a dApp using ethers.js?

Save to ▾
Show answer
Browser wallets inject an EIP-1193 provider at window.ethereum. Wrap it with BrowserProvider and request accounts. import { BrowserProvider } from 'ethers'; async function connect() { if (!window.ethereum) throw new Error('Install a wallet'); const provider = new BrowserProvider(window.ethereum); const signer = await provider.getSigner(); // prompts the user const address = await signer.getAddress(); const { chainId } = await provider.getNetwork(); return { signer, address, chainId }; } In production, use EIP-6963 discovery or a connector library so users with several wallets can choose.
18

Your target users in India have never used crypto wallets. How do you design onboarding?

Save to ▾
Show answer
Hide crypto complexity. Offer login with phone or email using embedded or smart contract wallets, so no seed phrase is needed at first. Sponsor gas with a paymaster so users need no tokens. Show amounts in rupees and plain language, support regional languages, and explain actions in simple terms. Provide account recovery via passkeys or guardians, and let advanced users export to self-custody later. Ensure KYC and tax requirements are clear where money is involved.
19

How do you compute a function selector and decode calldata with cast?

Save to ▾
Show answer
cast handles ABI work from the command line. # Function selector cast sig 'transfer(address,uint256)' # 0xa9059cbb # Encode calldata cast calldata 'transfer(address,uint256)' 0xAbc... 1000000 # Decode calldata from a transaction cast 4byte-decode 0xa9059cbb000000... # Decode with a known signature cast decode-calldata 'transfer(address,uint256)' 0xa9059cbb... This is useful when checking what a wallet is really asking you to sign.
20

Your team is preparing a contract for an external audit. What do you do beforehand?

Save to ▾
Show answer
Freeze the code at a commit and stop adding features. Write clear documentation: architecture, roles, trust assumptions, invariants and known risks. Reach high test coverage including fuzz and invariant tests, and run Slither and fix its findings. Remove dead code, add NatSpec comments, and make the build reproducible. Share a scope list and a walkthrough call. A clean, well-documented codebase lets auditors spend their limited time on deep logic bugs.
21

A user lost funds on our DeFi app due to their own mistake and is angry. How would you handle it?

Save to ▾
Show answer
Situation: a user sent tokens to the contract address directly instead of using deposit, and they were stuck. Task: support him honestly. Action: I listened, explained calmly what happened without blaming him, checked whether a recovery function existed, and escalated to the team. We had a rescue function for stray tokens behind the multisig, so after verification we returned them. Result: he thanked us publicly, and we added a front-end warning.
22

How should NFT metadata and tokenURI be structured?

Save to ▾
Show answer
tokenURI(id) returns a URI, usually ipfs://<CID>/<id>.json, pointing to JSON that marketplaces read: { "name": "Course Certificate #12", "description": "Completed Blockchain Developer course", "image": "ipfs://bafy.../12.png", "attributes": [ { "trait_type": "Grade", "value": "A" }, { "trait_type": "Year", "value": 2026 } ] } Store images and JSON on IPFS or Arweave rather than a normal server, so metadata cannot silently change or disappear.
23

How do you read a Chainlink price feed in Solidity safely?

Save to ▾
Show answer
import {AggregatorV3Interface} from '@chainlink/contracts/src/v0.8/shared/interfaces/AggregatorV3Interface.sol'; AggregatorV3Interface public feed; uint256 constant MAX_DELAY = 1 hours; function getPrice() public view returns (uint256) { (, int256 answer, , uint256 updatedAt, ) = feed.latestRoundData(); require(answer > 0, 'bad price'); require(block.timestamp - updatedAt <= MAX_DELAY, 'stale price'); return uint256(answer); // scale using feed.decimals(), often 8 } Always check staleness, sign and decimals; on L2s also check the sequencer uptime feed.
24

Compare ERC-20, ERC-721 and ERC-1155 tokens.

Save to ▾
Show answer
ERC-20 defines fungible tokens where every unit is identical, with functions like transfer, approve, transferFrom and balanceOf; used for currencies, stablecoins and governance tokens. ERC-721 defines non-fungible tokens where each tokenId is unique, used for NFTs like art, tickets or certificates. ERC-1155 is a multi-token standard where one contract manages many token types, fungible or not, with batch transfers; it is popular in games where items have quantities.
25

A fee-on-transfer token breaks your DEX's accounting. What happened and how do you fix it?

Save to ▾
Show answer
Fee-on-transfer tokens deduct a percentage on every transfer, so when your contract calls transferFrom for 100 tokens it may receive only 98. If the code assumes 100 arrived, balances and reserves drift and can be exploited. Fix it by measuring the actual amount received: read the contract's balance before and after the transfer and use the difference. Also decide whether to support such tokens at all and document unsupported token behaviours like rebasing.
26

Compare the UTXO model and the account model.

Save to ▾
Show answer
In the UTXO model used by Bitcoin, coins exist as unspent transaction outputs; a transaction consumes some outputs and creates new ones, which makes parallel validation and privacy easier. In the account model used by Ethereum, the state stores a balance and nonce per account, which is simpler for smart contracts and wallets. The trade-off: UTXO avoids replay issues and scales verification well, while accounts make complex stateful logic far easier to write.
27

Where do you see yourself in five years?

Save to ▾
Show answer
I see myself as a senior smart contract engineer, owning the design and security of production protocols and mentoring juniors. In the next two years I want to master Solidity, testing and audit techniques, and contribute to open source. Later I would like to specialise in security or Layer 2 infrastructure. I hope to grow inside a team like this one, where the work is real and the standards are high.
28

How are mappings stored, and why can you not iterate over them?

Save to ▾
Show answer
A mapping does not store keys. The value for key k in a mapping declared at slot p lives at storage slot keccak256(k . p). Every possible key implicitly exists with a default zero value, so the contract cannot know which keys were set or how many. To iterate, keep a separate array of keys or use OpenZeppelin EnumerableSet or EnumerableMap, accepting extra gas, or rebuild the list off-chain from emitted events.
29

Explain Byzantine Fault Tolerance and the 3f+1 rule.

Save to ▾
Show answer
Byzantine Fault Tolerance is the ability of a system to reach agreement even when some nodes lie or act arbitrarily. Classical BFT protocols such as PBFT, Tendermint and QBFT need at least 3f+1 nodes to tolerate f Byzantine nodes, because a quorum of 2f+1 votes guarantees that any two quorums overlap in at least one honest node. They give instant deterministic finality but involve heavy message passing, so they work best with tens to low hundreds of validators.
30

Describe a time you found a security problem in code and how you handled it.

Save to ▾
Show answer
Situation: while reviewing a teammate's staking contract, I saw it sent tokens before updating the user's balance. Task: confirm the risk without blaming anyone. Action: I wrote a Foundry test with a malicious receiver that re-entered withdraw and drained extra funds, then shared it privately with a suggested fix using checks-effects-interactions and a reentrancy guard. Result: the fix merged before the audit, and we added reentrancy tests to our standard checklist.
31

What is the difference between require, revert, assert and custom errors?

Save to ▾
Show answer
require(condition, message) validates inputs and conditions, reverting with a message if false. revert stops execution explicitly and is often used with custom errors, such as error InsufficientBalance(uint256 need, uint256 have); revert InsufficientBalance(x, y); which are cheaper than strings and carry data. assert checks invariants that should never fail; a failure signals a bug and raises a Panic. Since Solidity 0.8.26 you can also pass custom errors to require.
32

A user is angry that withdrawing from an optimistic rollup to Ethereum takes seven days. How do you explain and solve it?

Save to ▾
Show answer
Explain that the seven-day window lets anyone challenge a fraudulent batch; it protects their funds. For faster exits, offer third-party fast bridges or intent-based bridges where a liquidity provider pays them on L1 within minutes for a small fee and later claims the slow withdrawal. Also show the expected timeline clearly in the UI and send a notification when funds are claimable, because most anger comes from uncertainty, not the delay itself.
33

What is a reentrancy attack?

Save to ▾
Show answer
Reentrancy happens when a contract makes an external call, such as sending ETH, before updating its own state, and the receiver calls back into the contract to repeat the action. For example, a withdraw that sends funds and then sets the balance to zero can be re-entered to withdraw many times. The 2016 DAO hack drained millions this way. Prevent it with checks-effects-interactions, reentrancy guards, and pull payments.
34

What is the difference between SHA-256 and Keccak-256?

Save to ▾
Show answer
SHA-256 is from the SHA-2 family and uses a Merkle-Damgard construction; Bitcoin uses double SHA-256 for block hashes and transaction IDs. Keccak-256 is based on the sponge construction and is what Ethereum uses for addresses, function selectors, event topics and storage slots. Ethereum's Keccak-256 is the original Keccak submission and differs from the final NIST SHA3-256 in padding, so the two give different outputs for the same input.
35

What is the difference between a full node, a light node and an archive node?

Save to ▾
Show answer
A full node downloads and validates every block and keeps the current state, so it can verify everything independently. A light node stores only block headers and asks full nodes for Merkle proofs of the data it needs, which suits mobile wallets. An archive node keeps all historical states, so you can query a balance at any past block; indexers and block explorers need it, but it requires many terabytes of storage.
36

What is storage packing, and what are other key gas optimisations?

Save to ▾
Show answer
The EVM stores data in 32-byte slots, so consecutive small variables like uint128, uint64, address and bool can share a slot if declared next to each other, saving expensive SSTOREs. Other optimisations: use calldata for external arrays, cache storage reads in local variables, use immutable and constant, prefer custom errors over strings, avoid unbounded loops, use events instead of storing history, and use unchecked for counters that cannot overflow. Always measure with forge snapshot.

Few big employers listed in Visakhapatnam?

Many Visakhapatnam candidates also apply to teams in Hyderabad and to remote or hybrid roles. Practise the Hyderabad set as well.

Frequently asked questions

Which companies hire Blockchain professionals in Visakhapatnam?

Companies with large offices in Visakhapatnam include many IT services and product firms. Use their company pages below to practise employer-specific sets.

Are Blockchain interviews in Visakhapatnam different from other cities?

The questions depend more on the company than the city. Visakhapatnam's mix of employers decides the style: Many local candidates also apply to Hyderabad and remote roles, so a mix of service and product styles is common

How do I find Blockchain jobs in Visakhapatnam?

Shortlist companies with Visakhapatnam offices, keep your CV focused on Blockchain projects, apply on company career pages and job portals with the Visakhapatnam filter, and practise the questions on this page before each interview.