Closed danielattilasimon closed 1 year ago
The cause is uncaught exception originating from here: https://github.com/liquity/dev/blob/e76b000e9558640e9479b8080786a9fbc47ed570/packages/dev-frontend/src/components/Bonds/context/api.ts#L112-L118
The frontend should explicitly handle (rare) scenarios when break-even is impossible.
Edit: hacking around the above failure reveals another issue here: https://github.com/liquity/dev/blob/e76b000e9558640e9479b8080786a9fbc47ed570/packages/dev-frontend/src/components/Bonds/context/api.ts#L84
When the market premium is insufficient, the rebonding ROI will be negative, which is not currently supported by Decimal. We might be fine with just a regular old number instead.
Decimal
number
The cause is uncaught exception originating from here: https://github.com/liquity/dev/blob/e76b000e9558640e9479b8080786a9fbc47ed570/packages/dev-frontend/src/components/Bonds/context/api.ts#L112-L118
The frontend should explicitly handle (rare) scenarios when break-even is impossible.
Edit: hacking around the above failure reveals another issue here: https://github.com/liquity/dev/blob/e76b000e9558640e9479b8080786a9fbc47ed570/packages/dev-frontend/src/components/Bonds/context/api.ts#L84
When the market premium is insufficient, the rebonding ROI will be negative, which is not currently supported by
Decimal
. We might be fine with just a regular oldnumber
instead.