A map that records the current state of Basis Share stakers.
address is the Share staker's address.
appointmentTime is the block timestamp of last (deposit / withdrawal / dividend claim) of an account.
shares is the account's current number of shares staked.
boardHistory
An array that records the history of past seigniorage events. This array is used to calculate the amount of dividends that a specific Share holder has accrued. New elements are added to boardHistory whenever Basis Cash is newly minted to the Boardroom contract.
timestamp is the block timestamp when new seigniorage was added.
rewardReceived is the amount of Basis Cash seigniorage that was newly added.
totalShares is the total number of staked shares at the time of seigniorage generation.
Events
Staked
Emitted when Shares are staked via stake.
Withdrawn
Emitted when staked Shares are withdrawn via withdraw.
RewardPaid
Emitted when Share dividends are paid via claimDividends.
RewardAdded
Emitted when new seigniorage is added, and the boardHistory is updated via allocateSeigniorage.
Modifiers
directorExists
Checks whether sender has Shares staked.
Functions
Stake
Stakes amount Basis Shares to Boardroom sends all prior accrued dividends to sender if there is any.
withdraw
Withdraws amount Basis Shares and all accrued dividends to sender.
exit
Withdraws all staked Basis Shares and all accrued dividends to sender.
getCashEarnings
Returns the amount of all dividends accrued by sender.
claimDividends
Claims all accrued dividends to sender.
allocateSeigniorage
Executed when new seigniorage is assigned to the Boardroom contract. Records the current block timestamp, the amount of new Basis Cash seigniorage, and the current amount of total Shares staked to boardHistory.