[] = [
+ {
+ field: "symbol",
+ headerName: "Lend",
+ renderCell: params => {
+ const symbols =
+ params.row.symbol !== "OHMFRAXBP-F"
+ ? params.row.symbol.split("-").filter(s => s !== "")
+ : ["OHM", "FRAX", "CRV"];
+ return (
+
+
+
+
+ {params.row.symbol}
+
+
+ );
+ },
+ minWidth: 120,
+ },
+ {
+ field: "mintAsset",
+ headerName: "Borrow",
+ valueGetter: params => {
+ return params.row.lendAndBorrow.mintedCoin || "OHM";
+ },
+ renderCell: params => {
+ const symbol = normalizeSymbol([params.row.lendAndBorrow.mintedCoin || "OHM"]) as OHMTokenStackProps["tokens"];
+ return (
+
+ {params.row.lendAndBorrow.mintedCoin === "DOLA" ? (
+
+
+
+ ) : (
+
+ )}
+
+
+ {params.row.lendAndBorrow.mintedCoin || "OHM"}
+
+
+ );
+ },
+ minWidth: 110,
+ },
+ {
+ field: "tvlUsd",
+ headerName: "TVL",
+ valueFormatter: (params: GridValueFormatterParams) => formatCurrency(params.value, 0),
+ minWidth: 110,
+ },
+ {
+ field: "apy",
+ headerName: "Supply APY",
+ renderCell: params => (
+ <>
+ {params.row.apyBase || params.row.apyReward ? (
+
+ Base APY: {formatNumber(params.row.apyBase || 0, 2)}%
+ Reward APY: {formatNumber(params.row.apyReward || 0, 2)}%
+ >
+ }
+ >
+ {formatNumber(params.row.apy || 0, 2)}%
+
+ ) : (
+ <>{formatNumber(params.row.apy || 0, 2)}%>
+ )}
+ >
+ ),
+ minWidth: 110,
+ },
+ {
+ field: "borrowApy",
+ headerName: "Borrow APY",
+ valueGetter: params => {
+ return params.row.lendAndBorrow.apyBaseBorrow - params.row.lendAndBorrow.apyRewardBorrow;
+ },
+ renderCell: params => (
+ <>
+ {params.row.lendAndBorrow.apyBaseBorrow || params.row.lendAndBorrow.apyRewardBorrow ? (
+
+ Base APY: {formatNumber(params.row.lendAndBorrow.apyBaseBorrow || 0, 2)}%
+ Reward APY: {formatNumber(params.row.lendAndBorrow.apyRewardBorrow || 0, 2)}%
+ >
+ }
+ >
+ {formatNumber(params.row.lendAndBorrow.apyBaseBorrow - params.row.lendAndBorrow.apyRewardBorrow || 0, 2)}%
+
+ ) : (
+ <>{formatNumber(params.row.lendAndBorrow.apyBaseBorrow || 0, 2)}%>
+ )}
+ >
+ ),
+ },
+ {
+ field: "ltv",
+ headerName: "LTV",
+ valueGetter: params => {
+ return params.row.lendAndBorrow.ltv;
+ },
+ renderCell: params => <>{formatNumber(params.row.lendAndBorrow.ltv * 100)}%>,
+ minWidth: 30,
+ },
+ {
+ field: "available",
+ headerName: "Available to Borrow",
+ valueGetter: params => {
+ return (
+ (params.row.lendAndBorrow.debtCeilingUsd || params.row.lendAndBorrow.totalSupplyUsd) -
+ params.row.lendAndBorrow.totalBorrowUsd
+ );
+ },
+ renderCell: params => (
+ <>
+ {formatCurrency(
+ (params.row.lendAndBorrow.debtCeilingUsd || params.row.lendAndBorrow.totalSupplyUsd) -
+ params.row.lendAndBorrow.totalBorrowUsd,
+ )}
+ >
+ ),
+ minWidth: 150,
+ },
+ {
+ field: "projectName",
+ headerName: "",
+ renderCell: (params: GridRenderCellParams) => (
+
+ {params.row.projectName}
+
+ ),
+ minWidth: 100,
+ flex: 1,
+ },
+ ];
+
+ return (
+
+
+
+
+ Lend & Borrow Markets
+
+
+
+ }
+ >
+
+
+ Borrow & Lend against OHM or gOHM with our trusted partners
+
+
+
+
+
+
+
+
+ Filter by Network
+
+
+
+
+
+
+ );
+};
diff --git a/src/views/Lending/index.tsx b/src/views/Lending/index.tsx
new file mode 100644
index 0000000000..7666a54c67
--- /dev/null
+++ b/src/views/Lending/index.tsx
@@ -0,0 +1,79 @@
+import { ArrowForward } from "@mui/icons-material";
+import { Box, Link, Skeleton, Typography, useMediaQuery, useTheme } from "@mui/material";
+import { Chip, Metric, PrimaryButton } from "@olympusdao/component-library";
+import { Link as RouterLink } from "react-router-dom";
+import PageTitle from "src/components/PageTitle";
+import { formatCurrency } from "src/helpers";
+import { useOhmPrice } from "src/hooks/usePrices";
+import { LiquidityCTA } from "src/views/Liquidity/LiquidityCTA";
+
+export const Lending = () => {
+ const theme = useTheme();
+ const { data: ohmPrice } = useOhmPrice();
+ const isMobileScreen = useMediaQuery("(max-width: 513px)");
+
+ return (
+
+
+
+
+ } />
+
+
+
+
+ Coming Soon} />
+
+
+
+ Cooler Loans
+
+
+ Borrow DAI against your gOHM at a fixed rate
+
+
+
+
+ Coming Soon
+
+
+
+
+
+
+
+ New} />
+
+
+
+ Lending Markets
+
+
+ Borrow OHM or leverage OHM holdings
+
+
+
+
+
+ View Lending Markets
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
From 036ac7cf1461f3463d6100f1162cdfc5dacfa0b6 Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 24 Jul 2023 07:35:13 -0500
Subject: [PATCH 2/2] build(deps-dev): bump dotenv from 16.0.3 to 16.3.1
(#2902)
Bumps [dotenv](https://github.com/motdotla/dotenv) from 16.0.3 to 16.3.1.
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](https://github.com/motdotla/dotenv/compare/v16.0.3...v16.3.1)
---
updated-dependencies:
- dependency-name: dotenv
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot]
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
---
package.json | 2 +-
yarn.lock | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/package.json b/package.json
index 7c6ee9a09f..6fa670036a 100644
--- a/package.json
+++ b/package.json
@@ -104,7 +104,7 @@
"assert": "^2.0.0",
"autoprefixer": "^10.4.14",
"css-mediaquery": "^0.1.2",
- "dotenv": "^16.0.3",
+ "dotenv": "^16.3.1",
"eslint": "^8.43.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.8.0",
diff --git a/yarn.lock b/yarn.lock
index fd278dac13..d69c463ea3 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5329,10 +5329,10 @@ dot-case@^3.0.4:
no-case "^3.0.4"
tslib "^2.0.3"
-dotenv@^16.0.3:
- version "16.0.3"
- resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07"
- integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==
+dotenv@^16.3.1:
+ version "16.3.1"
+ resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.3.1.tgz#369034de7d7e5b120972693352a3bf112172cc3e"
+ integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==
dprint-node@^1.0.7:
version "1.0.7"