Add a 5% tolerance for declaring a "unpeg event"

This commit is contained in:
natsoni 2024-04-24 13:58:46 +02:00
parent 00e0eea60e
commit 1a5c2c4d3a
No known key found for this signature in database
GPG Key ID: C65917583181743B
2 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
<h5 class="card-title" i18n="liquid.unpeg">Unpeg</h5>
<div *ngIf="(unbackedMonths$ | async) as unbackedMonths; else loadingData" class="card-text">
<ng-container *ngIf="unbackedMonths.historyComplete; else loadingData">
<div class="fee-text" [ngClass]="{'danger' : unbackedMonths.total > 0, 'correct': unbackedMonths.total === 0}">
<div class="fee-text" [ngClass]="{'danger' : unbackedMonths.total > 0, 'correct': unbackedMonths.total === 0}" i18n-ngbTooltip="liquid.unpeg-info" ngbTooltip="Number of times that the Federation's BTC holdings fall below 95% of the total L-BTC supply">
{{ unbackedMonths.total }} <span i18n="liquid.unpeg-event">Unpeg Event</span>
</div>
</ng-container>

View File

@ -34,7 +34,7 @@ export class ReservesRatioStatsComponent implements OnInit {
let avg = 0;
for (let i = 0; i < ratioSeries.length; i++) {
avg += ratioSeries[i];
if (ratioSeries[i] < 1) {
if (ratioSeries[i] < 0.95) {
total++;
}
}