File tree 1 file changed +3
-2
lines changed 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -984,9 +984,10 @@ export function calculateOverdelegationDilution(indexer: Indexer): BigDecimal {
984
984
let graphNetwork = GraphNetwork . load ( '1' ) !
985
985
let delegationRatioBD = BigInt . fromI32 ( graphNetwork . delegationRatio ) . toBigDecimal ( )
986
986
let maxDelegatedStake = stakedTokensBD * delegationRatioBD
987
- return stakedTokensBD == BigDecimal . fromString ( '0' )
987
+ let maxDelegatedStakeBD = max ( maxDelegatedStake , delegatedTokensBD )
988
+ return maxDelegatedStakeBD == BigDecimal . fromString ( '0' )
988
989
? BigDecimal . fromString ( '0' )
989
- : BigDecimal . fromString ( '1' ) - maxDelegatedStake / max ( maxDelegatedStake , delegatedTokensBD )
990
+ : BigDecimal . fromString ( '1' ) - maxDelegatedStake / maxDelegatedStakeBD
990
991
}
991
992
992
993
export function updateAdvancedIndexerMetrics ( indexer : Indexer ) : Indexer {
You can’t perform that action at this time.
0 commit comments