Commit 41d2fde9 by Jorge Izquierdo

Fix vesting calculation logic

parent 6139500e
......@@ -94,7 +94,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
if (time < cliff) {
return 0;
}
if (time > vesting) {
if (time >= vesting) {
return tokens;
}
......@@ -103,7 +103,7 @@ contract VestedToken is StandardToken, LimitedTransferToken {
uint256 vestingTokens = safeSub(tokens, cliffTokens);
vestedTokens = safeAdd(vestedTokens, safeDiv(safeMul(vestingTokens, safeSub(time, cliff)), safeSub(vesting, start)));
vestedTokens = safeAdd(vestedTokens, safeDiv(safeMul(vestingTokens, safeSub(time, cliff)), safeSub(vesting, cliff)));
}
function nonVestedTokens(TokenGrant grant, uint64 time) private constant returns (uint256) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment