Vote-escrowed DEFE (veDEFE)

DEFE is a governance token and a utility token; In order for a DEFE holder to receive both governance and utility benefits, DEFE must be locked for a period of time and converted to veDEFEs.

Vote-escrowed DEFE (veDEFE)

The veDEFE is non-tradable and only cab is unlocked while the period expires. The user's voting power , which means the number of veDEFEs, will be decreasing linearly since the moment of lock. In order to avoid periodic check-ins, each time the holder locks, unlocks, or changes the locktime (longer), the smart contract records and updates the slope and bias of the user's linear function in the user_point_history. At the same time, the Defed Protocol updates the slope and bias of the veDEFE's total voting power and records the change of the slope and bias in point_history. Besides, when user’s lock is scheduled to end, we schedule change of slopes of W(t) in the future in slope_changes. All the possible expiration times of veDEFEs are rounded to whole weeks to make number of reads from blockchain proportional to number of missed weeks at most, not number of users (which can be potentially large) .Through this, Defed Protocol can calculate without having to cycle through all holdings.

Slopes and biases will only change when the user deposits, locks DEFE, and the veDEFEs locktime expires. All the possible expiration times are rounded to whole weeks to make number of reads from blockchain proportional to number of missed weeks at most, not number of users (which can be potentially large)See formula below for veDEFEs exchange results.

  • wi(t)=attmaxw_i(t)= a\frac{t}{t_{max}}

Parameter

Description

ww

weight

aa

amount of DEFE

tl,tltmaxt_l, t_l \leq t_{max}

locktime

tmaxt_{max}

max locktime, 4 years

t,ttlt, t \leq t_l

remaining locktime

Last updated