api3dao / nodary-utilities

Utility functions for Nodary services
1 stars 1 forks source link

Have the deviation threshold be specified in percentage #14

Open bbenligiray opened 1 year ago

bbenligiray commented 1 year ago

Currently, computeSponsorWalletAddress() expects deviationThreshold to be specified in "normalized percentages". For example, if the user wants to get the sponsor wallet address for 0.5% deviation threshold, they need to set deviationThreshold to be 0.5 * 1e6 = 500000 (https://github.com/nodaryio/examples/blob/main/scripts/get-sponsor-wallet-addresses.js#L16). The normalization method is an implementation detail that shouldn't be exposed to the user, the user should just call the function with 0.5.

This requires a major release, and https://github.com/nodaryio/examples and the manager-multisig will also need to be updated