Replies: 2 comments
-
Consistency is not worth it in this case. We should stick with |
Beta Was this translation helpful? Give feedback.
-
It turns out that using
|
Beta Was this translation helpful? Give feedback.
-
Consistency is not worth it in this case. We should stick with |
Beta Was this translation helpful? Give feedback.
-
It turns out that using
|
Beta Was this translation helpful? Give feedback.
-
The
SablierV2Pro
contract need to use SD59x18 because all quotients end up taking a value between 0 and 1, and that value is passed as a base to theexp
function, which useslog2
under the hood, which spits out a negative value when the input is smaller than 1.The
SablierV2Linear
contract doesn't use theexp
function though, so that's why we implemented the calculations in thegetWithdrawableAmount
function with UD60x18.Question is: should we switch to use
SD59x18
everywhere?The main pro would be consistency. The main con would be the slightly higher gas of working with signed numbers.
Beta Was this translation helpful? Give feedback.
All reactions