Skip to main content

TypeScript: Governance

GovernanceClient is the front end to the veNOTA contract: lock NOTA to mint non-transferable veNOTA, use veNOTA balances to vote on protocol proposals, and unlock when your lock matures. Access as ntm.governance.

The veNOTA model

Locking longer grants more voting power. The contract implements a linear decay: 1 NOTA locked for the maximum duration yields 1 veNOTA; 1 NOTA locked for half the maximum yields 0.5 veNOTA. See veNOTA for the exact decay curve and maximum lock duration. veNOTA is not transferable, is not ERC-20 fungible, and decays continuously toward zero over the lock’s life. Voting power is always read-time.

Write methods

lock(amount, duration)

Creates a new lock. duration is in seconds; the contract rejects values below the configured minimum or above the configured maximum. Requires a prior ERC-20 approval on NOTA for the veNOTA contract:
Returns the transaction hash. The lockId is emitted in the LockCreated event.

extendLock(lockId, additionalDuration)

Extends an existing lock by adding to its duration. Useful to boost voting power without adding NOTA:

unlock(lockId)

Unlocks a matured lock, returning the underlying NOTA to the owner. Reverts if the lock has not yet matured:

Read methods

getVotingPower(address)

Returns the current veNOTA voting power for an address, summed across all of its locks and decayed to “now”:

getLock(lockId)

Fetches a single lock record:
VeNOTALock fields include owner, amount, startTime, endTime, and isActive.

getTotalSupply()

Returns the total veNOTA supply (sum of live voting power across all addresses) at this moment:

Full example

Voting on proposals

The veNOTA contract exposes voting power queries that the protocol’s governance module reads. The proposal creation and voting UI is the Notareum governance portal, not part of this SDK directly. For on-chain proposal execution see the Governance protocol page.

See also