This commit is contained in:
commit
14003c1ad8
|
@ -97,7 +97,11 @@ export const computeBinaryCpmmElasticity = (
|
|||
)
|
||||
const resultNo = getCpmmProbability(poolN, pN)
|
||||
|
||||
return resultYes - resultNo
|
||||
// handle AMM overflow
|
||||
const safeYes = Number.isFinite(resultYes) ? resultYes : 1
|
||||
const safeNo = Number.isFinite(resultNo) ? resultNo : 0
|
||||
|
||||
return safeYes - safeNo
|
||||
}
|
||||
|
||||
export const computeDpmElasticity = (
|
||||
|
|
|
@ -169,7 +169,7 @@ export async function updateMetricsCore() {
|
|||
return 0
|
||||
}
|
||||
const contractRatio =
|
||||
contract.flaggedByUsernames.length / (contract.uniqueBettorCount ?? 1)
|
||||
contract.flaggedByUsernames.length / (contract.uniqueBettorCount || 1)
|
||||
|
||||
return contractRatio
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user