Skip to content

Commit 7810480

Browse files
authored
Merge pull request #93 from 0xProject/fix-stake-ratio-query
fixed query for approximate stake ratio, taking into account instance…
2 parents 1b5e223 + bed011b commit 7810480

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

staking-api/src/queries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ export const nextEpochPoolStatsQuery = `
705705
, 0.00 AS total_protocol_fees_generated_in_eth
706706
, 0 AS number_of_fills
707707
, (cs.zrx_staked / NULLIF(ts.total_staked,0))
708-
/ (fbp.protocol_fees / tr.total_protocol_fees)
708+
/ NULLIF((fbp.protocol_fees / NULLIF(tr.total_protocol_fees,0)),0)
709709
AS approximate_stake_ratio
710710
FROM staking.pool_info pi
711711
LEFT JOIN operator_share os ON os.pool_id = pi.pool_id

0 commit comments

Comments
 (0)