You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently organiser can only make binary decision about participant and everybody either receives the same payout or 0.
This is achieved by passing bitmap of attendance information at finalise as follows.
function finalize(uint256[] calldata _maps)
By packing all attendance information as a bitmap of uint256, it can handle up to 256 people's attendance information into 1 uint256 slot.
This makes sense in binary result such as meetups, but less flexible for long running challenges.
The proposed change
In addition to pass bitmap where 1 bit represents 1/0 for a participant, allow it to pass bitmap where 8 bit represents 0-255 or 4 bit represents 0-15. By doing so, 8 bit can store up to 32 participant and 4 bit can handle up to 64 participants.
Interface change
function finalize(uint256[] calldata _maps, uint _type)
_type is unum of 1/4/8
payoutAmount(address)
Change payoutAmount to take address so that it returns unique payout amount per each participant.
Background
Currently organiser can only make binary decision about participant and everybody either receives the same payout or 0.
This is achieved by passing bitmap of attendance information at
finalise
as follows.function finalize(uint256[] calldata _maps)
By packing all attendance information as a bitmap of uint256, it can handle up to 256 people's attendance information into 1 uint256 slot.
This makes sense in binary result such as meetups, but less flexible for long running challenges.
The proposed change
In addition to pass bitmap where 1 bit represents 1/0 for a participant, allow it to pass bitmap where 8 bit represents 0-255 or 4 bit represents 0-15. By doing so, 8 bit can store up to 32 participant and 4 bit can handle up to 64 participants.
Interface change
function finalize(uint256[] calldata _maps, uint _type)
_type
is unum of 1/4/8payoutAmount(address)
address
so that it returns unique payout amount per each participant.Scope of the work.
Evaluation
The text was updated successfully, but these errors were encountered: