There seems to be a flaw in the logic that is used to derive the batched time. It looks like the avereageTimeout is always applied to "now". Regardless of when the last execution happened, e.g., timestamp essentially assuming that bridge just executed.
A more correct guess should be to take last execution into account, e.g., if average time is 2 hours, and it was executed 1 hour ago, the expected time should be ~1 hour, not 2. Seems like it is only getting averageGasPerHour and averageTimeout when querying, so zk-money don't know when the last execution was.
Fixing it fully is larger setup that seems to require changes deeper down.
Originally posted by @LHerskind in #14 (comment)
There seems to be a flaw in the logic that is used to derive the batched time. It looks like the avereageTimeout is always applied to "now". Regardless of when the last execution happened, e.g., timestamp essentially assuming that bridge just executed.
A more correct guess should be to take last execution into account, e.g., if average time is 2 hours, and it was executed 1 hour ago, the expected time should be ~1 hour, not 2. Seems like it is only getting averageGasPerHour and averageTimeout when querying, so zk-money don't know when the last execution was.
Fixing it fully is larger setup that seems to require changes deeper down.
Originally posted by @LHerskind in #14 (comment)