The whole consumption margin redeem() checks with, in seconds (MK-104).
Why it is not the advice margin.nextViableAmount already carries 900 seconds of accrual
from the block it was READ at. redeem() re-reads the Trove one block or more later and used to
add the full 900 again, on a net debt that had grown in between, so it refused its own advice a
block after giving it while the chain accepted the amount. The sending check only has to cover
the gap between ITS read and inclusion. 60 seconds is fifteen blocks at the measured 3.83 seconds
a block (scripts/oracle-moves.ts). The advice therefore stays acceptable to redeem() for
900 minus 60, 840 seconds, which covers the 600 it is advertised for.
The whole consumption margin
redeem()checks with, in seconds (MK-104).Why it is not the advice margin.
nextViableAmountalready carries 900 seconds of accrual from the block it was READ at.redeem()re-reads the Trove one block or more later and used to add the full 900 again, on a net debt that had grown in between, so it refused its own advice a block after giving it while the chain accepted the amount. The sending check only has to cover the gap between ITS read and inclusion. 60 seconds is fifteen blocks at the measured 3.83 seconds a block (scripts/oracle-moves.ts). The advice therefore stays acceptable toredeem()for 900 minus 60, 840 seconds, which covers the 600 it is advertised for.