Skip to content
Tech Interview Prep home
Technical interview guide

DeFi Primitives (AMMs, Lending, Liquidity Pools)

The core building blocks of decentralized finance — automated market makers, lending protocols, and the liquidity pools they're built on.

Read
48 min
Practice MCQs
25
Interview QA
25
Edition
v3
Editorial status
Reviewed

Scope: Uniswap v2 and v3 specifications; Aave borrowing and liquidation documentation reviewed 2026-09-04 (version-specific parameters must be checked at integration); Chainlink Data Feeds; ERC-4626; ERC-3156; OWASP SCSVS.

Interview QA

Treat each question like a live interview question: answer out loud first (structure, assumptions, tradeoffs), then open the model answer to spot gaps and rehearse a tighter follow-up.

Curated: · Written: · Reviewed:

QA-1

Explain and implement a constant-product swap quote.

QA-2

Estimate safe execution for a large AMM order.

QA-3

Mint and burn pool shares without diluting providers.

QA-4

How do you calculate impermanent loss and determine under what conditions trading fee yields offset divergence loss for a liquidity provider?

QA-5

Build safe swap transaction parameters.

QA-6

Reduce sandwich exposure for a trading interface.

QA-7

Select and operate concentrated-liquidity ranges.

QA-8

Choose a TWAP window for collateral pricing.

QA-9

Model supplier accounting in a pooled lending market.

QA-10

Review a kinked utilization rate model.

QA-11

Set collateral risk parameters for a new asset.

QA-12

How does concentrated liquidity in an AMM alter impermanent loss and fee dynamics compared to a standard constant product pool?

QA-13

Implement liquidation accounting correctly.

QA-14

Calibrate liquidation incentive and close behavior.

QA-15

Plan for lending-market insolvency.

QA-16

Implement an ERC-3156-compatible flash lender.

QA-17

Make a protocol invariant robust to atomic capital.

QA-18

Verify index-based debt accounting.

QA-19

Secure a tokenized vault's initial deposits.

QA-20

Assess a stablecoin used as protocol collateral.

QA-21

Govern high-impact DeFi parameter changes.

QA-22

Map transitive risk for a yield strategy.

QA-23

Build an oracle adapter with explicit failure behavior.

QA-24

Create a DeFi protocol verification matrix.

QA-25

Operate a DeFi protocol with actionable monitoring.