CarmineOptions / konoha

A toolkit for DAO-like governance on Starknet
Apache License 2.0
23 stars 33 forks source link

Staking #107

Closed tensojka closed 1 week ago

tensojka commented 2 weeks ago

known issue: can unstake when tokens are delegated

tensojka commented 2 weeks ago

also missing:

tensojka commented 2 weeks ago

@Nerrolol

The production curve will still be discrete.

It's rounded to the lowest int, because, let's assume we rounded up and not down: let's say you want to lock 1000 KONOHA for a duration that gives you a 1.6x multiplier.

If you lock 1000 directly, you get 1600 veKONOHA.

But if you lock 1000x1 KONOHA (call the function stake() 1000 times), you get 2000 veKONOHA. (1000 KONOHA means 1000*10**-18 KONOHA actually if you account for decimals)

Adding a test of unstaking before expiry