UBIScheme
Holds all the G$s that were transferred via bridge from the FundManager.
The pool of G$s is divided equally by the amount of current active users, and distributed every day. Each active user can then "claim" his quota. If a user fails to claim his quota it becomes part of the next day's pool of G$ to be distributed as basic income.
Events
WithdrawFromDao
Emits when a withdraw has been succeded.
prevBalance
The balance before the withdraw.
newBalance
The balance after the withdraw.
ActivatedUser
Emits when a user is activated.
account
The user that was activated.
InactiveUserFished
Emits when a fish
call has been succeded.
caller
The user that doing "fishing".
fished_account
The user that has beed "fished".
claimAmount
The amount of tokens caller got for "fishing".
TotalFished
Emits when finishing a "multi fish" execution. Indicates the number of users from the given array who actually been fished. It might not be finished going over all the array if there no gas left.
total
The amount of total user that were "fished".
UBICalculated
Emits when daily UBI is calculated.
day
The timestamp when this event was emitted.
dailyUbi
The amount of UBI per daily cycle.
blockNumber
The block number when this event was emitted.
UBICycleCalculated
Emits whenever a new multi day cycle starts.
day
The amount of days from the start when the event was emitted.
pool
The balance of the UBI scheme in G$.
cycleLength
The duration that used to calculate a frequency of daily cycle pool distribution.
dailyUBIPool
The amount of the pool.
UBIClaimed
Emits when someone claims the UBI.
claimer
The claimer of the UBI user.
amount
The amount of the UBI the user gathered after claim reward call.
CycleLengthSet
Emits when the Avatar sets the cycle length.
newCycleLength
The duration of the collect UBI cycle..
CycleLengthSet
Emits when the Avatar sets the cycle length.
newCycleLength
The duration of the collect UBI cycle..
DaySet
Emits when the Avatar sets the day.
newDay
New days amount from the start of the UBI work.
DaySet
Emits when the Avatar sets up he is not eligible for G$.
ShouldWithdrawFromDAO
Accounts whether to also withdraw G$ from Avatar for UBI.
checkEntitlement
Checks the amount which the _member
address is eligible to claim for, regardless if they have been whitelisted or not. In case the user is active, then the current day must be equal to the actual day, i.e. claim or fish has already been executed today.
_member
Potential claimers address.
Returns: the amount of G$ tokens the address can claim.
claim
Function for claiming UBI. Requires contract to be active and claimer to be whitelisted. Calls distributionFormula
, calculates the amount the caller can claim, and transfers the amount to the caller.
Returns: a boolean indicating if UBI was claimed.
fish
In order to update users from active to inactive, we give out incentive to people to update the status of inactive users, this action is called "Fishing". Anyone can send a tx to the contract to mark inactive users. The "fisherman" receives a reward equal to the daily UBI (i.e. instead of the “fished” user). User that “last claimed” > 14 can be "fished" and made inactive (reduces active users count by one). Requires contract to be active.
_account
The account to "fish".
Returns: a bool indicating if UBI was fished.
fishMulti
Executes fish
with multiple addresses.
_accounts
The accounts to "fish".
Returns: a bool indicating if all the UBIs were fished.
Last updated