Guides

Grant Lifecycle

Understand grant statuses, transitions, and edge cases

Grant State Machine#

Every grant moves through a defined set of statuses. Understanding these transitions is critical for building a reliable integration.

Status Reference#

StatusMeaningCan Transition To
PENDINGGrant created, waiting for recipient to acceptACCEPTED, REJECTED
ACCEPTEDActive and vestingCOMPLETED, TERMINATED, PAUSED, MARKED_FOR_FUTURE_TERMINATION
REJECTEDRecipient declined the grantTerminal state
COMPLETEDAll vesting periods finishedTerminal state
TERMINATEDTerminated early; future vestings cancelledACCEPTED (via revert)
PAUSEDVesting temporarily suspendedACCEPTED (via resume)
MARKED_FOR_FUTURE_TERMINATIONTermination scheduled for a future dateTERMINATED, ACCEPTED (via revert)

Pausing, resuming and scheduling a future termination are done in the Toku dashboard. The API covers creating, terminating and reverting.


Creating a Grant#

A grant created with addSingleGrant starts in ACCEPTED status, and its vestings are generated straight away (for any frequency other than CUSTOM, or when a grant template is given).

The examples use the tokuAPI helper from Build a Dashboard, which returns the data field of each response.

const grant = await tokuAPI('POST', 'addSingleGrant', {
  grantName: 'Q1 Token Grant',
  grantDescription: 'Q1 2026 token grant',
  grantConfigurationID: 'config-uuid',
  grantAmount: 50000,
  recipientID: 'role-in-org-uuid',
  grantDate: '2026-01-01T00:00:00.000Z',
  vestingStartDate: '2026-01-01T00:00:00.000Z',
  vestingFrequencyType: 'MONTHLY',
  vestingPeriods: 48,
  vestingCliffPeriods: 12,
  vestingCliffPercentage: 25,
  lockup: 0,
  tags: []
});
// { grantID: "550e8400-..." }
// Status: ACCEPTED

Vesting Calculation#

Vestings are calculated automatically from the schedule:

Standard 4-Year Schedule (48 months, 12-month cliff, 25% cliff)#

EventMonthTokensCumulative
Grant starts000
Cliff vests1212,500 (25%)12,500
Monthly vest13~1,04213,542
Monthly vest14~1,04214,583
............
Fully vested48~1,04250,000

Monitoring Vesting Progress#

const grants = await tokuAPI('GET', 'listGrants');
for (const g of grants) {
  console.log(`${g.grantName}: ${g.percentageOfUnitsVested}% vested`);
  // "Q1 Token Grant: 16.67% vested"
}

percentageOfUnitsVested is calculated each time you call listGrants. Poll periodically to track progress.


Termination#

Terminating a Grant#

Sets the grant to TERMINATED and recalculates vestings — only tokens vested before the termination date are retained.

await tokuAPI('POST', 'terminateGrant', {
  grantID: 'grant-uuid',
  terminationDate: '2026-06-30T00:00:00.000Z'
});
// Status: TERMINATED

terminateGrant returns { grantID }. It sets TERMINATED straight away, even when terminationDate is in the future: vestings after that date are cancelled. To schedule a termination that only takes effect on a future date (MARKED_FOR_FUTURE_TERMINATION), use the Toku dashboard.

Bulk Termination (Employee Departure)#

Terminate all grants when an employee leaves:

const result = await tokuAPI('POST', 'terminateEmployeeGrants', {
  externalEmployeeID: 'EMP-001',
  terminationDate: '2026-06-30T00:00:00.000Z'
  // grantIDs omitted = terminate every grant not already terminated
});
// { terminatedGrantIDs: ["..."], alreadyTerminatedGrantIDs: [] }

Or terminate specific grants only:

await tokuAPI('POST', 'terminateEmployeeGrants', {
  externalEmployeeID: 'EMP-001',
  terminationDate: '2026-06-30T00:00:00.000Z',
  grantIDs: ['specific-grant-uuid']
});

Reverting a Termination#

Made a mistake? Revert a termination to restore the grant and regenerate future vestings.

Single Grant#

await tokuAPI('POST', 'revertGrantTermination', {
  grantID: 'terminated-grant-uuid'
});
// { success: true }
// Status returns to: ACCEPTED

Only a TERMINATED grant can be reverted. For any other grant the call still returns 200 with { success: false, errorMessage: "Grant not terminated" }, so check success.

Bulk Revert#

const result = await tokuAPI('POST', 'revertEmployeeGrants', {
  externalEmployeeID: 'EMP-001',
  grantIDs: ['grant-1', 'grant-2']
});
// { revertedGrantIDs: [...], alreadyActiveGrantIDs: [...] }

Reverting a termination restores the vestings the termination cancelled. Any settlements or distributions that were already processed are not affected.


Edge Cases#

Grant with zero token amount#

Fiat-only grants have grantAmount: 0. The grantAmountInFiat field holds the fiat value.

Multiple grants per employee#

An employee can have multiple independent grants, each with its own vesting schedule. Call getEmployeeGrants?externalEmployeeID=... (or ?payrollEmployeeID=...), or filter listGrants by roleInOrgID, to find all grants for an employee.

Terminated then reverted#

When a grant is reverted, it returns to ACCEPTED with the original vesting schedule fully restored. The termination is as if it never happened.

Future termination then reverted#

A MARKED_FOR_FUTURE_TERMINATION grant is reverted in the Toku dashboard; the API revert calls only accept TERMINATED grants.


Polling Strategy#

The API has no webhooks, so poll for status changes:

What to CheckEndpointRecommended Interval
Grant status changeslistGrantsEvery 5 minutes
New vesting eventslistGrants (check percentageOfUnitsVested)Every 15 minutes
Wallet verification statusgetPendingWalletRequestsEvery 2 minutes
Was this page helpful? Suggest edits