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
This ERC-1155 will read from the Game State contract to mint representations of the Game State, and will be the primary method by which the game is funded. It will also be the social object that helps spread the popularity of the game and keep folks engaged.
Mint restrictions:
There will be two main types of edition in this 1155 contract: PLAN and REALITY.
Every payable method needs to accept both Filecoin, as well as the QUARTER ERC-20.
For PLAN: these are memetic and should spread as far as possible
Execution block must be at least 256 blocks into the future.
Each address can only hold one copy of a Plan — to avoid juicing the belief score. Gotta sybil attack us to do that 🤖.
For REALITY: these are mostly common, sometimes rare, and other times oddly sentimental
maxSupply is paused if this blockheight currently has the highest Nostalgia score
maxSupply is permanently limited to 1 if this block perfectly matches a minted plan
Timelocked Mint: If this reality matches a perfect plan, the architect address has 256 blocks to mint it before it becomes mintable by anyone
The tokens will be burnable. Burning will decrement supply.
Token Attributes
REALITY tokens will be grouped by Execution Block. There is only one per block.
PLAN tokens will be grouped by a combination of Execution Block and Move Pattern. There may be more than one per block.
The name of REALITY tokens will be: {Execution Block} Reality
The name of PLAN tokens will be {Execution Block} Plan #{counter incrementing each time a novel plan is minted for this execution block}
Common
Stored in State
Type (string): PLAN or REALITY
Execution Block (uint256): For REALITY this will be an existing block number, equal to or less than the current blockheight. For PLANs this will be the predicted block number.
moves (uint8[256]): an array of the moves. 0 = Block, 1=Paper, 2=Scissors, 3=Stalemate
Calculated on Read (saves gas)
Timelessness (Integer): A counter that increments each time the move pattern has been minted, regardless of whether it is minted as a PLAN or REALITY
Move Pattern (String): For each of the 256 moves: B = Block, P = Paper, S = Scissors, X = Stalemate.
Reality Only
Stored in State
Nostalgia (uint256): When a reality is minted, transferred, or burned we need to calculate the nostalgiaContribution for all address involved in the transaction. For the address minting or receiving the token, we add the nostalgiaContribution to the Nostalgia value. For the address burning or sending the token, we subtract the nostalgiaContribution from the Nostalgia value.
Calculated on Read
Difficulty (uint16): A calculation of the difficulty points based on the moves sequence. Maximum value 2048:
An Block, Paper or Scissors move is worth 1 point
A Stalemate is worth 2 points
The multiplier is initially 1.
If the current move is the same as the previous move, increment the multiplier by 1.
When the current move is different than the previous one, it resets back to 1.
Calculation is done by iterating through the moves array, and adding the score for that move * the current multiplier to the Difficulty total.
Entrainment (uint16): Get the plan for this block with the highest belief and compare its Moves[] to the Moves[] of this block. +1 for each move that matches. If there is no minted plan, return 0.
Plan Only
Stored in State
Architect (address): address of the first minter
Futurity (uint256): distance in blocks from current block at time of first mint
Belief (uint256): When a plan is minted, transferred, or burned we need to calculate a Block Power for all addresses involved in the transaction. For the address that mints or receives the token, we add their Block Power to the Belief value. For the address that burns or sends the token, we subtract their Block Power from the Belief value.
Calculated at Read
Accuracy (uint16): Get the REALITY for this PLAN’s execution block and compare their move patterns. +1 for each move that matches, and divide by 256 to get a percentage. If the REALITY for this block hasn’t been minted yet, do not add this attribute.
Judgement (string):
AWAITING: if the current blockheight is less than the execution block
READY: if the current blockheight is greater than the execution block, but nobody has minted the reality yet.
PERFECT: if the accuracy is 256
CLOSE: if the accuracy is 192 or greater
FAILED: if the accuracy is less than 192
Calculations & Constants:
Calculating Block Power:
function calculateBlockPower(addressvoter, uint256executionBlock) privatereturns (uint256) {
uint256 userPowerScore =5;
uint256 SCALING_FACTOR =10**18;
uint256 blockDistance = executionBlock >=block.number? executionBlock -block.number : block.number- executionBlock;
uint256 exponent = (SCALING_FACTOR * blockDistance) / (blockDistance + SCALING_FACTOR);
uint256 k =8192; // Multiply the exponent by 2, so that the result is 0.5 when x = 4096uint256 result = (SCALING_FACTOR * k * exponent) / (SCALING_FACTOR * SCALING_FACTOR + k * exponent) * userPowerScore;
return result;
}
The text was updated successfully, but these errors were encountered:
Background
This ERC-1155 will read from the Game State contract to mint representations of the Game State, and will be the primary method by which the game is funded. It will also be the social object that helps spread the popularity of the game and keep folks engaged.
Mint restrictions:
There will be two main types of edition in this 1155 contract: PLAN and REALITY.
Every payable method needs to accept both Filecoin, as well as the QUARTER ERC-20.
The tokens will be burnable. Burning will decrement supply.
Token Attributes
REALITY tokens will be grouped by Execution Block. There is only one per block.
PLAN tokens will be grouped by a combination of Execution Block and Move Pattern. There may be more than one per block.
The name of REALITY tokens will be: {Execution Block} Reality
The name of PLAN tokens will be {Execution Block} Plan #{counter incrementing each time a novel plan is minted for this execution block}
Common
Stored in State
Calculated on Read (saves gas)
Reality Only
Stored in State
Calculated on Read
Plan Only
Stored in State
Calculated at Read
Calculations & Constants:
Calculating Block Power:
The text was updated successfully, but these errors were encountered: