Skip to content

Instantly share code, notes, and snippets.

Problem

RP is a complex codebase of contracts and it's hard to know how all the game theory assumptions will hold up if we assume node operators don't care about the health of the RP network. On prater and mainnet, NOs will mostly behave, following the CLI suggestions. How can we simulate an environment where more adversarial NOs exist?

Potential Solution

Create a game to incentivize prater NOs to try and game the system, with no cost to their reputations. Nominate some NOs to "play". Each player is given exactly 17 gETH (1 extra for gas costs) and some amount of gRPL. They all run a staking node for the same period of time, and, at the end of the period, the RP team runs a script to confirm that the participating players followed some set of rules agreed upon before the game. Players that game the RP system to make more RPL or ETH while operating their nodes will win real RPL at the end, with the highest performing operator recieving the largest payout.

Implementation

This game would require no

@colin-1833
colin-1833 / WrappedXInvites.sol
Created October 16, 2021 01:01
$X Token Invites as NFTs
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
interface IInviteContract {