DeFiLive Preview
Flash Loan Executor
Props-driven flash loan UI with protocol selector, token dropdown, fee calculation, and execute button. Supports controlled and uncontrolled selection.
flash-loanaavedydxarbitrage
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
protocols* | FlashLoanProtocol[] | — | Available protocols (id, name, icon, fee) |
tokens* | FlashLoanToken[] | — | Available tokens (symbol, name, icon, maxAmount) |
selectedProtocol | FlashLoanProtocol | — | Controlled selected protocol (uncontrolled if omitted) |
selectedToken | FlashLoanToken | — | Controlled selected token (uncontrolled if omitted) |
onExecute | (params: { protocol, token, amount }) => void | — | Called when user clicks execute with valid amount |
onProtocolChange | (protocol: FlashLoanProtocol) => void | — | Called when user switches protocol |
onTokenChange | (token: FlashLoanToken) => void | — | Called when user switches token |
loading | boolean | false | Show loading spinner on execute button |
className | string | — | Additional CSS classes |