Skip to content

Commit 467641d

Browse files
jayantkJayant Krishnamurthy
and
Jayant Krishnamurthy
authored
Check exponent range (#179)
Co-authored-by: Jayant Krishnamurthy <[email protected]>
1 parent 9cefc2b commit 467641d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

program/src/oracle/oracle.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ extern "C" {
2020
#define PC_PUBKEY_SIZE_64 (PC_PUBKEY_SIZE/sizeof(uint64_t))
2121
#define PC_MAP_TABLE_SIZE 640
2222
#define PC_COMP_SIZE 32
23-
#define PC_MAX_NUM_DECIMALS 16
23+
// Bound on the range of the exponent in price accounts. This number is set such that the
24+
// PD-based EMA computation does not lose too much precision.
25+
#define PC_MAX_NUM_DECIMALS 8
2426
#define PC_PROD_ACC_SIZE 512
2527
#define PC_EXP_DECAY -9
2628
// If ci > price / PC_MAX_CI_DIVISOR, set publisher status to unknown.

0 commit comments

Comments
 (0)