cowprotocol / cow-sdk

CoW protocol SDK
https://docs.cow.fi/cow-protocol/reference/sdks/cow-sdk
Other
31 stars 9 forks source link

fix: end timestamp when span not 0 #165

Closed mfw78 closed 1 year ago

mfw78 commented 1 year ago

This PR:

  1. Optimises the end timestamp for TWAPs when span != 0 (ie. durationType != AUTO).
  2. Closes #164
mfw78 commented 1 year ago

Should we have a unit test for this?

I thought about this and thought that unit tests when dealing with this math may be more suitable to implement at the same time as some of the tests forthcoming mentioned in comments.