metaDAOproject/YALOB

oracle_sensitivity suggestion

Opened this issue · 1 comments

0xbigz commented

rather than specifying an acceptable change, you should clamp the new point to be within X% of the twap and then use that to update

described flow here:
https://twitter.com/bigz_Pubkey/status/1582771031185293316

late response, srry sir:

I can't clamp the new point to be within x% of the current TWAP because my kind of TWAP doesn't allow me to fetch the current TWAP from within the CLOB program

only an external program can save two aggregator points and divide by the number of slots between points to get a TWAP over a certain time range