Skip to content

Capgemini Blockchain Interview Questions & Answers

Curated interview practice questions with answers. These are practice scenarios, not a verified list of past interview questions.

About Capgemini hiring for Blockchain roles

Capgemini is a French multinational IT services and consulting group providing technology, engineering, cloud and data services. India is its largest employee base, supporting projects in testing, application development, SAP, data engineering and analytics for global clients. It hires freshers as analysts and software engineers, and experienced professionals in QA automation, data and cloud roles.

For Blockchain roles, this Capgemini practice set focuses most on Cryptography for Blockchain (7), Ethereum and the EVM (6), Blockchain Fundamentals (4), Consensus and Scaling (4). It has 15 easy, 15 medium questions, so you can start easy and work up to the harder ones.

Company type
IT services
Headquarters
Paris, France
Main India offices
Mumbai, Bengaluru, Pune, Chennai, Hyderabad

Capgemini Blockchain interview process

  1. Online assessment (pseudocode + English)
  2. Game-based aptitude test
  3. Technical interview
  4. HR round

Typical pattern based on public candidate experiences. Rounds vary by role, team and year.

Solved for CapgeminiStart 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

How is a blockchain different from a traditional database?

Save to ▾
Show answer
A traditional database is controlled by one administrator who can create, update and delete rows, and trust comes from that owner. A blockchain is shared by many parties, is append-only, and trust comes from cryptography and consensus. The trade-off is performance: a database handles thousands of writes per second with low latency, while a public chain is slower and costlier. Use a blockchain only when several parties who do not fully trust each other must share one record.
02

What is a hash collision and why does it matter for blockchains?

Save to ▾
Show answer
A collision is when two different inputs produce the same hash. If attackers could find collisions, they could swap one transaction or block for another with the same hash and break integrity, Merkle proofs and address uniqueness. For SHA-256 and Keccak-256, finding a collision needs about 2^128 work, which is infeasible. This is why older broken hashes such as MD5 and SHA-1 must never be used in blockchain systems.
03

What was the Merge?

Save to ▾
Show answer
The Merge, completed in September 2022, switched Ethereum from Proof of Work to Proof of Stake by joining the original execution chain with the Beacon Chain, which had been running PoS since December 2020. Mining ended, energy use fell by more than 99.9 percent, and new ETH issuance dropped sharply. Block times became a fixed 12 seconds. Staked ETH withdrawals were enabled later in the Shapella upgrade of April 2023.
04

What is Ethereum and how is it different from Bitcoin?

Save to ▾
Show answer
Ethereum is a programmable blockchain: besides transferring its native currency ETH, it runs smart contracts, which are programs stored on-chain that execute exactly as written. Bitcoin focuses on being secure, scarce digital money with a deliberately limited scripting language and the UTXO model. Ethereum uses an account model, Proof of Stake since 2022, about 12-second blocks, and a large ecosystem of tokens, DeFi, NFTs and Layer 2 rollups built on top.
05

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.
06

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.
07

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.
08

A transaction keeps failing with an out of gas error. How do you fix it?

Save to ▾
Show answer
First see whether the gas limit was too low or the function is genuinely unbounded. Run eth_estimateGas or simulate with cast run or Tenderly to see actual gas used and where it fails. If estimation is fine, raise the limit with a buffer of 10 to 20 percent. If the function loops over a growing array, redesign it with pagination or pull-based patterns, because the block gas limit will eventually make it impossible to call.
09

What are the ABI and function selectors?

Save to ▾
Show answer
The ABI (Application Binary Interface) is the JSON description of a contract's functions, events and errors, and it defines how arguments are encoded. A function selector is the first four bytes of the Keccak-256 hash of the function signature, for example transfer(address,uint256) gives 0xa9059cbb. Calldata is the selector followed by ABI-encoded arguments in 32-byte words. Wallets, ethers.js and explorers use the ABI to encode calls and decode results and events.
10

What are the basic Foundry commands to create, build, test and work with a project?

Save to ▾
Show answer
curl -L https://foundry.paradigm.xyz | bash && foundryup forge init my-dapp # new project with src, test, script forge install OpenZeppelin/openzeppelin-contracts forge build # compile forge test -vvv # run tests with traces forge coverage # coverage report forge snapshot # gas snapshot anvil # local node cast call ADDR 'count()(uint256)' --rpc-url $RPC Foundry tests are written in Solidity and run fast; Hardhat is the JavaScript or TypeScript alternative with a large plugin ecosystem.
11

Why should you check return values of low-level calls and use SafeERC20?

Save to ▾
Show answer
Low-level call, send and delegatecall return false instead of reverting on failure, so ignoring the result means the contract continues as if the transfer succeeded. Similarly, some ERC-20 tokens do not return a bool from transfer, and others return false instead of reverting. OpenZeppelin's SafeERC20 wraps transfer, transferFrom and approve to handle both cases and revert on failure. Always write (bool ok, ) = to.call{value: x}(''); require(ok).
12

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.
13

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.
14

What is a nonce in blockchain? Explain both common meanings.

Save to ▾
Show answer
In proof of work, the nonce is a number miners change repeatedly in the block header until the header hash falls below the difficulty target. In Ethereum's account model, the account nonce is a counter of transactions sent from an address; each transaction must use the next nonce, which orders transactions and prevents replay. A stuck transaction with a low nonce blocks all later ones from that account until it is mined or replaced.
15

What is a cryptographic hash function and what properties must it have?

Save to ▾
Show answer
A hash function maps any input to a fixed-size output, such as 256 bits. For blockchain it must be deterministic, fast to compute, pre-image resistant (you cannot find the input from the hash), second pre-image resistant, and collision resistant (finding two inputs with the same hash is infeasible). It should also show the avalanche effect, where a one-bit change gives a completely different hash. Blocks, addresses, Merkle trees and proof of work all depend on these properties.
16

How do you calculate a borrower's health factor in a lending protocol?

Save to ▾
Show answer
Health factor = (sum of collateral value x liquidation threshold) / total debt value. Below 1, the position can be liquidated. Example: collateral 10 ETH at 3,000 dollars = 30,000 dollars, liquidation threshold 80 percent, debt 18,000 dollars of stablecoins. HF = (30,000 x 0.80) / 18,000 = 1.33. If ETH falls to 2,250, collateral is 22,500, so HF = 18,000 / 18,000 = 1.0 and liquidation begins. Users raise HF by repaying debt or adding collateral.
17

What are function modifiers in Solidity?

Save to ▾
Show answer
Modifiers are reusable pieces of code that run before or after a function body, placed where the underscore symbol appears. They are mainly used for checks such as onlyOwner, whenNotPaused or nonReentrant. For example, modifier onlyOwner() { require(msg.sender == owner, 'not owner'); _; } blocks everyone except the owner. Keep modifiers short and check-only; complex logic inside modifiers hides behaviour and increases bytecode size because the code is inlined into every function that uses it.
18

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.
19

What does a typical dApp architecture look like?

Save to ▾
Show answer
A dApp usually has smart contracts on a chain holding core logic and assets; a front-end, often React or Next.js, that connects to the user's wallet; a library such as ethers.js, viem or wagmi to read and write contracts through an RPC provider; an indexer or subgraph for fast queries of history; decentralised storage such as IPFS for files and metadata; and optional back-end services for notifications, relaying or off-chain computation, with oracles bringing external data on-chain.
20

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.
21

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.
22

Compare Proof of Work and Proof of Stake.

Save to ▾
Show answer
Proof of Work secures the chain with electricity and mining hardware; it is battle-tested and simple but energy-hungry and tends to centralise in mining pools. Proof of Stake secures it with locked capital that can be slashed; it uses over 99 percent less energy, gives faster economic finality and lowers hardware needs. Its critics point to stake concentration in large staking providers and more complex protocol design. Ethereum moved from PoW to PoS in the Merge of September 2022.
23

How would you check on-chain whether a user is in a 10,000-address allowlist without storing all addresses?

Save to ▾
Show answer
Build a Merkle tree off-chain from the allowlisted addresses (hashing each leaf, ideally double-hashed with amounts if needed) and store only the 32-byte root in the contract. Each user submits a proof of about 14 hashes for 10,000 leaves. The contract recomputes the root with OpenZeppelin MerkleProof.verify and compares it. This costs one storage slot instead of 10,000, and you can update the list by changing the root.
24

What does a block contain and what is inside a block header?

Save to ▾
Show answer
A block has a header and a body. The body holds the list of transactions. The header holds metadata: the previous block hash, a timestamp, the Merkle root (or state and transaction roots in Ethereum) summarising the transactions, and consensus fields such as the difficulty target and nonce in Bitcoin. Because the header commits to all transactions through the root hash, nodes can verify a block's integrity by hashing just the header.
25

What is the checks-effects-interactions pattern?

Save to ▾
Show answer
It is an ordering rule for functions. First do checks: validate inputs, permissions and balances with require. Then apply effects: update all state variables, such as reducing the user's balance. Only then do interactions: external calls, token transfers or ETH sends. Because state is already updated, a re-entering call sees the new state and cannot repeat the action. Combine it with a nonReentrant modifier for defence in depth, especially in functions calling unknown contracts.
26

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.
27

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.
28

Why should you not use tx.origin for authorisation?

Save to ▾
Show answer
tx.origin is the EOA that started the transaction, while msg.sender is the immediate caller. If a contract checks require(tx.origin == owner), a phishing contract can trick the owner into calling it, and that contract then calls the victim; tx.origin is still the owner, so the check passes and funds can be stolen. Always use msg.sender for access control. tx.origin also breaks with smart contract wallets and account abstraction.
29

Write a minimal Python example showing how blocks are linked by hashes.

Save to ▾
Show answer
Each block stores the previous hash, so changing any earlier data breaks the chain. import hashlib, json def block_hash(block): data = json.dumps(block, sort_keys=True).encode() return hashlib.sha256(data).hexdigest() chain = [{'index': 0, 'data': 'genesis', 'prev': '0'}] for i, tx in enumerate(['A pays B 5', 'B pays C 2'], 1): chain.append({'index': i, 'data': tx, 'prev': block_hash(chain[-1])}) valid = all(chain[i]['prev'] == block_hash(chain[i-1]) for i in range(1, len(chain))) print(valid)
30

Tell me about a blockchain project you have built.

Save to ▾
Show answer
Pick one project and explain it with STAR. Situation: in my final year I wanted to learn Solidity end to end. Task: build a crowdfunding dApp. Action: I wrote the contract with goal and deadline logic and refunds, tested it with Foundry including fuzz tests, built a Next.js front-end with wagmi, and deployed to Sepolia. Result: 30 friends tested it, I fixed a refund bug they found, and the repo now has docs and a demo video.

Tips to crack the Capgemini Blockchain interview

  • Practise game-based cognitive tests and pseudocode questions, which are commonly part of Capgemini's online assessment.
  • Prepare a short explanation of your projects, focusing on your role, tools used and what you would improve.
  • Learn about Capgemini's engineering arm and its work in sectors like automotive and financial services to show interest.
  • Keep a one-minute story ready for every project on your CV: problem, your part, tools, result.
  • Practise the hard questions on this page aloud; Capgemini interviewers usually ask follow-ups on your first answer.

Frequently asked questions

How many rounds are there in the Capgemini Blockchain interview?

Candidates usually go through 4 stages: Online assessment (pseudocode + English); Game-based aptitude test; Technical interview; HR round. The exact rounds change with the role, team, location and your experience, so confirm the process with the recruiter.

Which topics should I prepare for the Capgemini Blockchain interview?

This practice set leans on Cryptography for Blockchain (7), Ethereum and the EVM (6), Blockchain Fundamentals (4), Consensus and Scaling (4). Revise those first, then practise explaining one or two of your own projects end to end, because most Capgemini interviewers ask you to walk through real work.

Are these the exact questions asked at Capgemini?

No. These are curated practice questions that match the skills and difficulty usually tested in it services interviews like Capgemini's. They are not a leaked or verified list of past questions.

Where does Capgemini hire Blockchain professionals in India?

Capgemini has large teams in Mumbai, Bengaluru, Pune, Chennai, Hyderabad. Openings and locations change often, so check the Capgemini careers page and filter by city and experience.

Blockchain questions for similar companies