Lossless Governance
Last updated
Was this helpful?
Last updated
Was this helpful?
This contract is in charge of implementing the logic regarding the voting, solving and claiming rewards over the reports.
LSS_TEAM_INDEX
TOKEN_OWNER_INDEX
COMMITEE_INDEX
COMMITTEE_ROLE
HUNDRED
committeeMembersCount
walletDisputePeriod
compensationPercentage
losslessReporting
losslessStaking
losslessController
reportVotes
Vote
proposedWalletOnReport
ProposedWallet
MemberVotesOnProposal
compensation
Compensation
It refers to the index corresponding to the Lossless Team.
It refers to the index corresponding to the Token Owner.
It refers to the index corresponding to the Committee Members.
It refers to the bytes32 role utilized by OpenZeppelin’s Access Control.
Used in order to calculate percentages. Constant value of 100.
It refers to amount of members in the committee.
It refers to amount of time in seconds that a proposed wallet can be disputed.
It refers to the percentage dedicated for compensation when a report is solved negatively.
The ILssReporting type refers to the Lossless Reporting Interface, the variable itself contains the Smart Contract address of the Lossless Reporting to allow interaction.
The ILssStaking type refers to the Lossless Staking Interface, the variable itself contains the Smart Contract address of the Lossless Staking to allow interaction.
The ILssController type refers to the Lossless Controller Interface, the variable itself contains the Smart Contract address of the Lossless Controller to allow interaction.
It contains all the voting information associated with a report Id via the Vote structure.
mapping(address => bool) committeeMemberVoted
- Mapping that indicates if a committee member has voted
mapping(address => bool) committeeMemberClaimed
- Mapping that indicates if a committee member has claim their rewards
bool[] committeeVotes
- Votes done by the committee
bool[3] votes
- Array of three votes, one per part, indicating their decision
bool[3] voted
- Array of three votes, one per part, indicating if they voted.
bool resolved
- Indicates if the report has been solved
bool resolution
- Indicates the report resolution
bool losslessPayed
- Indicates if the lossless team claimed their rewards
uint256 amountReported
- Indicates the amount reported
It contains the information associated with a funds retrieve wallet proposal associated with a report Id via the ProposedWallet structure.
It contains the information associated with a funds retrieve wallet proposal associated with a report Id in the following variables.
uint16 proposal
- Number of proposal
uint256 retrievalAmount
- Amount to be retrieved
uint256 timestamp
- Timestamp of the proposal
uint16 committeeDisagree
- Amount of committee members that disagree
address wallet
- Wallet proposed
bool status
- Indicator if the funds were claimed
bool losslessVote
- Vote casted by the Lossless Team
bool losslessVoted
- Indicator if the Lossless Team has voted
bool tokenOwnersVote
- Vote casted by the Token Owners
bool tokenOwnersVoted
- Indicator if the Token Owners have voted
bool walletAccepted
- Indicator of the proposal state
mapping (uint16 => MemberVotesOnProposal) memberVotesOnProposal
- Mapping indicating if a member has voted on a proposal via the MemberVotesOnProposal
structure
It contains the indicator if a certain committee member has voted on a proposal.
It contains the indicator and amount if an address has claimed and the amount to claim using the Compensation structure
It contains a Uint256 indicating the amount to be compensated with and a bool indicating if it has already been claimed.
onlyLosslessAdmin()
onlyPauseAdmin()
This modifiers ensures that the wrapped method can only be executed by the Lossless Admin
This modifiers ensures that the wrapped method can only be executed by the Pause Admin
NewCommitteeMembers(address[] _members);
CommitteeMembersRemoval(address[] _members);
LosslessTeamPositiveVote(uint256 indexed _reportId);
LosslessTeamNegativeVote(uint256 indexed _reportId);
TokenOwnersPositiveVote(uint256 indexed _reportId);
TokenOwnersNegativeVote(uint256 indexed _reportId);
CommitteeMemberPositiveVote(uint256 indexed _reportId, address indexed _member);
CommitteeMemberNegativeVote(uint256 indexed _reportId, address indexed _member);
ReportResolve(uint256 indexed _reportId, bool indexed _resolution);
WalletProposal(uint256 indexed _reportId, address indexed _wallet);
CommitteeMemberClaim(uint256 indexed _reportId, address indexed _member, uint256 indexed _amount);
CommitteeMajorityReach(uint256 indexed _reportId, bool indexed _result);
NewDisputePeriod(uint256 indexed _newPeriod);
WalletRejection(uint256 indexed _reportId);
FundsRetrieval(uint256 indexed _reportId, uint256 indexed _amount);
CompensationRetrieval(address indexed _wallet, uint256 indexed _amount);
LosslessClaim(ILERC20 indexed _token, uint256 indexed _reportID, uint256 indexed _amount);
ExtraordinaryProposalAccept(ILERC20 indexed _token);
addCommitteeMembers()
isCommitteeMember()
getIsVoted()
getVote()
isReportSolved()
reportResolution()
retrieveCompensation()
losslessVote()
tokenOwnersVote()
committeeMemberVote()
resolveReport()
proposeWallet()
rejectWallet()
losslessClaim()
claimCommitteeReward()
retrieveFunds()
pause()
unpause()
getVersion()
setCompensationAmount()
setDisputePeriod()
removeCommitteeMembers()
isReportActive()
getAmountReported()
Provided list of addresses will be given the role of Committee members.
No duplicate members can ever exist in the committee. Meaning one address cannot be included in the committee twice.
Called by Lossless Admin
_members
address
Array of addresses to add to the committee.
Determines if an address belongs to the Committee.
_account
address
Address to check if is member.
Returns if a report has been voted by one of the three pillars.
_reportId
Uint256
Report ID to check voting.
_voterIndex
Uint256
Voter index.
Returns the resolution on a report by a team.
_reportId
Uint256
Report ID to vote.
_voterIndex
Uint256
Voter index.
Returns if report has been resolved.
_reportId
Uint256
Report ID to check if it's solved.
Runction returns report resolution.
_reportId
Uint256
Report ID to it's resolution.
Once report is resolved negatively or report lifetime is over reporter address become entitled to the compensation.
This feature sends compensation amount to reporter addresses wallet.
Compensation amount (CA) is equal to report stake amount (RSA) multiplied by compensation percentage (CP).
CA = CP * RSA
Compensation is payed out in stake tokens
.
Called by Staker
Lossless Team has a voting power of 1/3.
Called by Lossless Admin
_reportId
Uint256
Report ID to vote.
_vote
bool
Resolution.
Token Owners have a voting power of 1/3.
Called by Token Owner
_reportId
Uint256
Report ID to vote.
_vote
bool
Resolution.
All committee members have combined voting power of 1/3.
Committee vote is a result of more than 1/2 of all committee members voting one way or another.
Called by Committee members
_reportId
Uint256
Report ID to vote.
_vote
bool
Resolution.
This feature can be triggered by anyone.
It should mark reported as resolved.
Resolve positively
Meaning that report was indeed a valid report.
It should move all reported token type tokens from reported address to lossless protocol. This should be done for all reported addresses (reported both in first and second reports).
Resolve negatively
Remove reported address from the blacklist.
Enable refund payout for incorrectly blacklisted addresses.
_reportId
Uint256
Report ID to resolve.
Once wallet is proposed dispute period is started.
Dispute period is set by Lossless Team
and it starts once the wallet is proposed.
Proposed wallet is set to become refund wallet after dispute period is over without any disputes.
Called by Lossless Admin
or Token Owner
_reportId
Uint256
Report ID to generate proposal.
_wallet
address
Proposed wallet.
Once 2/3 of all decision making body entities dispute a proposed wallet becomes rejected.
Once the proposed wallet is rejected dispute period is over and new wallet can be proposed.
For committee to dispute the wallet more than 1/2 of all committee members have to dispute it.
Called by Lossless Admin
, Token Owner
or Committee members
_reportId
Uint256
Report ID to reject proposal.
Both Lossless Team take part of the retrieved tokens as a reward.
For Lossless Team reward (LTR) is equal to retrieved funds (RF) multiplied by lossless reward (LF)
LTR = LF * RF
Called by Lossless Admin
_reportId
Uint256
Report ID to claim rewards.
Committee Member take part of the retrieved tokens as a reward.
For Committee Member reward (CMR) is equal to retrieved funds (RF) multiplied by committee reward (CF) and divided by number of committee member that voted on this particular report (CM).
CMR = RF * CF / votesCountOnReport(report id)
Called by Committee members
_reportId
Uint256
Report ID to claim rewards.
Refund amount (RA) is sent to the refund wallet.
Refund amount (RA) is part of retrieved funds (RF). RA is equal to retrieved funds (RF) minus all the other rewards that other parties take.
RA = RF - (RF * CF) - LTR - SW - RW
Report is marked so that no further actions could be taken on it.
Called by Refund Wallet
_reportId
Uint256
Report ID to retrieve funds.
Sets the pause flag to true which in turn pauses some of the contracts functionality. Can be called only by the pauseAdmin
.
Sets the pause flag to false which in turn unpauses some of the contracts functionality. Can be called only by the pauseAdmin
.
This method returns the version of the smart contract.
Provided value is used to set compensation amount (CA).
Called by Lossless Admin
_amount
Uint256
New Compensation percentage.
Provided value is used for the setting new dispute period.
Dispute period is the time period in which the decision making body entities can dispute the proposed refund wallet.
Called by Lossless Admin
_timeFrame
Uint256
New dispute timeframe.
Provided list of addresses will be revoked the role of Committee members.
Called by Lossless Admin
_members
address
Array of addresses to remove from committee.
It returns if a report is still active
_reportId
uint256
Report Id to check if it's active.
Returns the total balance of a reported account at the moment the report was solved.
_reportId
uint256
Report Id to verify.