coordinape / coordinape-protocol

🏆 Coordinape contracts
MIT License
32 stars 12 forks source link

allow `setAllowance` to accept `_intervalStart` argument in the past #26

Closed levity closed 2 years ago

levity commented 2 years ago

it would be for a situation where the circle has a repeating epoch, the epoch has already started, and the allowance hasn't been set yet.

you would want to set _intervalStart to match the epoch's (past) start time, and the cooldownInterval to match the epoch's repeating period, so that for the next epoch, the allowance resets at the right time.

levity commented 2 years ago

@spydermonkee and I talked about this just now & realized it's not an urgent change; things will still work as desired even if the first allowance doesn't start until mid-way through the first epoch. The cooldownInterval won't be checked until the end of the second epoch.

spydermonkee commented 2 years ago

I'm also curious to discuss any possible negative or security implications of this change that we may not see at first, @cesarsld