makerdao / vote-delegate

GNU Affero General Public License v3.0
37 stars 29 forks source link

Add expiration time and modifier preventing vote and tests #1

Closed brianmcmichael closed 3 years ago

brianmcmichael commented 3 years ago

Adds an expiration that ends the delegate contract at a set time.

If we modify this contract to keep the IOU's we can also add a permissionless wipe function that would alllow anyone to return MKR tokens to their rightful owners after the expiration.

After writing that, however, I'm not sure that that is the correct approach. If tokens are deposited here via a separate smart contract, it may not be expecting the tokens to be returned directly, so I think for now we're fine sticking with this approach.

kmbarry1 commented 3 years ago

Code here looks fine but I'm split on whether this is the best way to go about it. It's certainly the short-term simplest, but there could be a nasty future migration from the expiration. Although most likely we'll need to move to a new voting solution before the expiry anyway if it's set at least a year in the future.