Skip to content

Commit

Permalink
Add wind down price to bond stats
Browse files Browse the repository at this point in the history
  • Loading branch information
edmulraney committed Jan 17, 2023
1 parent b244294 commit e55aa07
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/dev-frontend/src/components/BondStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export const BondStats: React.FC<BondStatsProps> = () => {
<Statistic name={l.BLUSD_FLOOR_PRICE.term} tooltip={l.BLUSD_FLOOR_PRICE.description}>
<Metric value={protocolInfo.floorPriceWithoutPendingHarvests.prettify(4)} unit="LUSD" />
</Statistic>
<Statistic name={l.BLUSD_WIND_DOWN_PRICE.term} tooltip={l.BLUSD_WIND_DOWN_PRICE.description}>
<Metric value={protocolInfo.windDownPrice.prettify(4)} unit="LUSD" />
</Statistic>
<Statistic name={l.BLUSD_APR.term} tooltip={l.BLUSD_APR.description}>
<Metric
value={
Expand Down
5 changes: 4 additions & 1 deletion packages/dev-frontend/src/components/Bonds/context/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@ const getProtocolInfo = async (
treasury.pending
);

const windDownPrice = treasury.reserve.add(treasury.permanent).div(bLusdSupply);

return {
bLusdSupply,
marketPrice,
Expand All @@ -605,7 +607,8 @@ const getProtocolInfo = async (
bLusdLpApr,
controllerTargetAge,
averageBondAge,
floorPriceWithoutPendingHarvests
floorPriceWithoutPendingHarvests,
windDownPrice
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ export type ProtocolInfo = {
controllerTargetAge: Decimal;
averageBondAge: Decimal;
floorPriceWithoutPendingHarvests: Decimal;
windDownPrice: Decimal;
};

export type TransactionStatus = "IDLE" | "PENDING" | "CONFIRMED" | "FAILED";
Expand Down
6 changes: 6 additions & 0 deletions packages/dev-frontend/src/components/Bonds/lexicon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ export const BLUSD_FLOOR_PRICE = {
"The amount of LUSD that an arbitrageur could redeem bLUSD for thus creating a lower bound bLUSD market price."
};

export const BLUSD_WIND_DOWN_PRICE = {
term: "Wind down price",
description:
"The protocol supports a graceful wind down mechanism whereby Yearn Finance governance can trigger a special function which moves the Permanent bucket LUSD into the Reserve, thus increasing the floor price. This new floor price is the 'wind down price'."
};

export const BLUSD_APR = {
term: "bLUSD APR",
description: "The APR of bLUSD, based on the yield generated from each bucket in the Treasury."
Expand Down

0 comments on commit e55aa07

Please sign in to comment.