Something went wrong.
+{error.message}
+ ++ Could not load this market: {marketsError.message} +
++ {assetDisplayName(market.asset)} +
+ > + ) : ( +{label}
+ {value ? ( +{value}
+ ) : ( ++ This example only wires up supply and withdraw for the USDC market. +
++ Every other market is listed read-only, with live rates straight from + the Moonwell API. +
+ + Go to the USDC market + ++ Supply assets to Moonwell on Base and earn interest. +
+
+ {markets.length} active markets. Deprecated markets are filtered out —
+ including the legacy USDbC market, which reports the same{" "}
+ mUSDC symbol as native USDC.
+
Wallet balance
+ {isLoading ? ( ++ {balances ? formatUsdcAmount(balances.walletUsdc) : "—"} + USDC +
+ )} +Supplied
+ {isLoading ? ( ++ {balances ? formatUsdcAmount(balances.suppliedUsdc) : "—"} + USDC +
+ {!balances && + // A failed read is not the same as being signed out — never ask + // a user with a live position to "sign in" over an RPC error. + (error ? ( ++ Could not read your balances: {error} +
+ ) : ( ++ Sign in to see your position +
+ ))} + > + )} +Enter your email
+ setEmail(e.target.value)} + placeholder="you@example.com" + className={INPUT} + onKeyDown={(e) => e.key === "Enter" && email && sendEmailOTP({ email })} + /> + + {error && ( +{error.message}
+ )} ++ Code sent to {email} +
+ setCode(e.target.value.replace(/\D/g, "").slice(0, 6))} + placeholder="Enter 6-digit code" + className={`${INPUT} font-mono tracking-[0.4em] text-center`} + /> + + {error && ( +{error.message}
+ )} +{market.asset}
++ {assetDisplayName(market.asset)} +
++ Supply APY +
+{formatApy(market.baseSupplyApy)}
++ {formatUsd(market.totalSupplyUsd)} +
++ {mode === "supply" + ? "Amount exceeds your wallet balance" + : "Amount exceeds your supplied balance"} +
+ )} + {loggedIn && balances === undefined && ( ++ {balancesError + ? "Could not read your balances — retrying in the background." + : "Loading balances…"} +
+ )} ++ Sign in to {mode} +
+ ) : ( + + )} + + {tx.phase === "error" && ( ++ {tx.error} + {approvalStands && + " Your USDC approval did go through, so the allowance is in place — submitting again will not re-approve."} + {tx.hash && ( + <> + {" "} + + View on Basescan + + > + )} +
+ )} + + {/* Suppressed while the flow is still running: the approval's own + "confirmed" state is an implementation detail mid-chain, not an + invitation to interact. */} + {tx.phase === "success" && !isSubmitting && ( ++ {successLabel()}{" "} + {tx.hash && ( + + View on Basescan + + )} +
+ )} +Signed in as
+{user.email ?? "—"}
+Base wallet
++ {truncate(evmAccount.address)} +
+