sequenceDiagram
participant U as User
participant B as Bank
participant BC as Blockchain
%%{init: {'theme': 'dark', 'themeVariables': {
'mainBkg': '#111',
'nodeBkg': '#222',
'nodeTextColor': '#fff',
'lineColor': '#fff',
'textColor': '#fff',
'noteTextColor': '#fff',
'noteBkgColor': '#333'
}}}%%
U->>B: Deposit Funds
B->>BC: Record Deposit Transaction
BC-->>BC: Create Smart Contract
Note over BC: Enforce 100% Reserve Ratio
alt Lending Attempt
B->>BC: Attempt to Lend Deposits
BC-->>B: Reject - Violates Reserve Rule
end
U->>B: Withdrawal Request
B->>BC: Verify Funds Available
BC-->>B: Confirm Availability
B->>U: Release Funds