Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

24h time windows #27

Open
adria0 opened this issue Apr 26, 2017 · 6 comments
Open

24h time windows #27

adria0 opened this issue Apr 26, 2017 · 6 comments

Comments

@adria0
Copy link

adria0 commented Apr 26, 2017

The time window in checkMainTransfer creates a zero-second window if closingTime and openingTime are the same

        if ( closingTime >= openingTime ) {
            windowTimeLength = closingTime - openingTime ;
        } else {
            windowTimeLength = 86400 + closingTime - openingTime;
        }

To handle 24h windows, consider to change it to:

        if ( closingTime > openingTime ) {
            windowTimeLength = closingTime - openingTime ;
        } else {
            windowTimeLength = 86400 + closingTime - openingTime;
        }

The same issue is also in checkSpenderTransfer

@adria0 adria0 changed the title Time window 24h time windows Apr 26, 2017
@jbaylina
Copy link
Contributor

We need to decide if we accept 0s windows (always closed) and 24h window (always open).
I think that the best is to define the startTime 0-86399 and openWindow 0-86400.

This way we have the best of both and the calculus simplifies a lot.

Opinions?

@GriffGreen
Copy link
Member

I dont like 0s windows... but love an option for always open (turning off this security feature)

@jbaylina
Copy link
Contributor

jbaylina commented Apr 27, 2017

Closing the transfers is a good way to hold the transfers temporally. For example if you go for vacations.

@jbaylina jbaylina reopened this Apr 27, 2017
@GriffGreen
Copy link
Member

Is this the right feature to implement closing the vault for a few days? if there is not a more straight forward feature that allows that functionality then 0s time does make sense!

:-D

@dipenjoshi
Copy link

We imagined not able to modify limits after the contract is deployed. But we'll leave that ability in the system for now. Regardless of open 24 hours/ closed 24 hours. some functionality like overflow, cancel vaults etc. should be able to work.

@adria0
Copy link
Author

adria0 commented Apr 27, 2017

Ok! We need to document it, then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants