
βοΈ Blockchain & Web3 Β· Sequence
How a DeFi lending protocol works: deposit collateral, borrow, and what happens when the collateral value falls and a liquidator steps in.
Opening a template is free and never counts toward your daily diagrams. Asking the AI to change it counts as one.
Drawing diagramβ¦
DeFi lending sequence: a user deposits 10 ETH as collateral into the lending pool contract and borrows 12,000 USDC. The pool reads the ETH price from a price oracle. When the price falls and the health factor drops below 1, a liquidator bot repays part of the debt and receives ETH collateral at a discount.
sequenceDiagram actor U as User participant P as Lending Pool Contract participant O as Price Oracle actor L as Liquidator Bot U->>P: Deposit 10 ETH collateral U->>P: Borrow 12,000 USDC P->>O: Get ETH price O-->>P: 2,500 USD P-->>U: 12,000 USDC sent Note over P,O: Later the ETH price falls L->>O: Read ETH price O-->>L: 1,500 USD L->>P: Check health factor P-->>L: 0.9, unsafe L->>P: Repay 6,000 USDC of the debt P-->>L: ETH collateral plus 5% bonus
A sequence diagram with 4 participants and 11 messages, in the order they happen.
Describe your own system in plain English and the AI sequence diagram generator draws it in seconds, in the same style as this template.
The main parts of a centralised crypto exchange: a matching engine, wallets split between hot and cold storage, deposits and withdrawals, and compliance checks.
How an exchange processes a crypto withdrawal safely: balance hold, 2FA, risk and address screening, signing, broadcast and confirmations.
How an NFT marketplace works: listings signed off-chain, metadata on IPFS, and sales settled by a marketplace smart contract.
How a team safely upgrades a smart contract behind a proxy: audit, testnet rehearsal, multi-signature approval and a timelock before the change goes live.
The states a blockchain transaction goes through from signing to final confirmation, including replacement and dropped transactions.
How a custodian separates internet-connected hot wallets from offline cold storage, with signing hardware and an air-gapped transfer process.