Realm

v0

gno.land/r/moul/x/daily/cliffvestingdemo/v0

Render

Cliff Vesting

A pure vesting calculator, demoing the p/moul/x/daily/cliffvesting library.

A 12-month grant with a 3-month cliff

1200 tokens, Start = 0, Cliff = 3, End = 12.

monthvestedunvested%
0012000%
1012000%
2012000% ← nothing yet
330090025% ← cliff
440080033%
550070041%
660060050%
770050058%
880040066%
990030075%
10100020083%
11110010091%
1212000100% ← fully vested

The cliff is a step, not a ramp: at month 3 a quarter of the term has elapsed, so 300 tokens unlock at once. After that it accrues linearly.

Claiming

The library tracks no balances — the caller supplies what has already been claimed:

at monthalready claimedclaimable
60600
6300300
66000
12600600

Integer rounding

All arithmetic is integer — no float ever reaches consensus state. Rounding is down, so nobody is ever paid more than they earned, and the final instalment collects the remainder.

1000 over 3 periods:

tvested
00
1333
2666
31000

333 + 333 + 334 — the end is exactly 1000, never 999.

The bug this avoids

When the total is smaller than the duration, computing a per-tick rate first truncates it to zero and nothing ever vests. Multiplying before dividing keeps it honest — 7 tokens over 1000 ticks:

tvested
1000
1501
5003
10007

Transactions

No indexed transactions for this realm yet.

Calls, deploys, and child packages in indexed history.

Call function

Calls stay disabled until vm/qfuncs lists this package. Delve only submits functions the chain publishes for gno.land/r/moul/x/daily/cliffvestingdemo/v0.

Source (qfile)