Conversation
| uint256 hdAmount = amount * conversionMultiplier; | ||
|
|
||
| // Pull the HD tokens from the source. | ||
| if (!token.transferFrom(hdTreasury, address(this), hdAmount)) { |
There was a problem hiding this comment.
what happens to the extra tokens pulled from treasury if someone withdraws early?
There was a problem hiding this comment.
hmm actually, they should just continue vesting. sorry, just thinking outloud
There was a problem hiding this comment.
No worries, thinking out loud is good
| ELFI.approve(address(vault), amount); | ||
| vm.expectEmit(true, true, true, true); | ||
| emit Transfer(alice, address(vault), amount); | ||
| vault.migrate(amount, bob); |
There was a problem hiding this comment.
I'm probably not seeing something here, but shouldn't you do the vm.roll(halfwayBlock) first then call migrate()? That would fit the description of the test better.
| ELFI.approve(address(vault), amount); | ||
| vm.expectEmit(true, true, true, true); | ||
| emit Transfer(alice, address(vault), amount); | ||
| vault.migrate(amount, bob); |
There was a problem hiding this comment.
Same question here. Probably on me, but it seems like you'd want to do vm.roll(vault.globalExpiration()) before calling migrate() to verify that if someone migrates after expiration, then they can claim all the HD immediately
Sean329
left a comment
There was a problem hiding this comment.
Looks good and my comments are resolved. Approved once Jonny's comments are resolved.
This is the first of several voting vaults that we're going to add to Council. This one allows HD to be linearly vested over a three month timespan.