diff --git a/src/App.tsx b/src/App.tsx index 8abdfd6..90d4466 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -385,30 +385,38 @@ export default function App() { x => x + initialHatchFunds ); + const totalInitialHatchFunds = Math.round(d0 * theta); + const totalExitTributes = Math.round(getLast(withdrawFeeTimeseries)); + const totalFunds = totalInitialHatchFunds + totalExitTributes; + const formatFunds = (n: number) => (+n.toPrecision(3)).toLocaleString(); + const resultFields = [ { label: resultParameterDescriptions.totalReserve.name, description: resultParameterDescriptions.totalReserve.text, value: (+totalReserve.toPrecision(3)).toLocaleString() + " DAI" }, - { - label: resultParameterDescriptions.initialHatchFunds.name, - description: resultParameterDescriptions.initialHatchFunds.text, - value: Math.round(d0 * theta).toLocaleString() + " DAI" - }, - { - label: resultParameterDescriptions.exitTributes.name, - description: resultParameterDescriptions.exitTributes.text, - value: - (+getLast(withdrawFeeTimeseries).toPrecision(3)).toLocaleString() + - " DAI", - valueFooter: `From ${withdrawCount} exit txs` - }, { label: resultParameterDescriptions.slippage.name, description: resultParameterDescriptions.slippage.text, value: +(100 * avgSlippage).toFixed(3) + " %", valueFooter: `Avg tx size ${Math.round(avgTxSize).toLocaleString()} DAI` + }, + { + label: resultParameterDescriptions.initialHatchFunds.name, + description: resultParameterDescriptions.initialHatchFunds.text, + value: formatFunds(totalInitialHatchFunds) + " DAI" + }, + { + label: resultParameterDescriptions.exitTributes.name, + description: resultParameterDescriptions.exitTributes.text, + value: formatFunds(totalExitTributes) + " DAI", + valueFooter: `From ${withdrawCount} exit txs` + }, + { + label: resultParameterDescriptions.totalRaised.name, + description: resultParameterDescriptions.totalRaised.text, + value: formatFunds(totalFunds) + " DAI" } ]; diff --git a/src/Header.tsx b/src/Header.tsx index ffa5c97..5f87224 100644 --- a/src/Header.tsx +++ b/src/Header.tsx @@ -4,20 +4,27 @@ import Link from "@material-ui/core/Link"; import Typography from "@material-ui/core/Typography"; const cadCadLink = - "https://medium.com/block-science/cadcad-filling-a-critical-gap-in-open-source-data-science-fcd0d3faa8ed"; + "https://medium.com/giveth/deep-dive-augmented-bonding-curves-3f1f7c1fa751"; const useStyles = makeStyles((theme: Theme) => createStyles({ + container: { + display: "flex", + flexDirection: "column", + alignItems: "center" + }, title: { // color: theme.palette.text.secondary, }, subtitle: { color: theme.palette.text.secondary, - margin: theme.spacing(3, 0, 0) + margin: theme.spacing(3, 0, 0), + maxWidth: theme.spacing(82) }, subsubtitle: { color: theme.palette.text.secondary, - opacity: 0.6 + opacity: 0.6, + maxWidth: theme.spacing(74) }, lightBulb: { verticalAlign: "middle", @@ -47,7 +54,7 @@ const useStyles = makeStyles((theme: Theme) => export default function Header() { const classes = useStyles(); return ( - <> +