GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Blockchains/rsr: Reserve Rights token and associated contracts

This repository was archived by the owner on Oct 4, 2026. It is now read-only.
BranchesTags
Open more actions menu
 
 

Latest commit

 

History

26 Commits
26 Commits

Folders and files

NameName
Last commit message
Last commit date
abi
abi
 
 
artifacts
artifacts
 
 
openzeppelin-solidity
openzeppelin-solidity
 
 
tests
tests
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
ReserveRights.sol
ReserveRights.sol
 
 
SlowWallet.sol
SlowWallet.sol
 
 
TokenVesting.sol
TokenVesting.sol
 
 
go.mod
go.mod
 
 
go.sum
go.sum
 
 

Repository files navigation

RSR

This repo contains the code for the Reserve Rights token (RSR) and some associated contracts: TokenVesting.sol, and SlowWallet.sol.

ReserveRights.sol

ReserveRights.sol is an ERC20 token that represents the cryptographic right to purchase the excess Reserve tokens produced by the Reserve protocol. Alongside ERC-20 and full-token pausing, it supports specifying addresses deliberately to be locked forever. See https://reserve.org for more information.

Etherscan

What does the code do and why?

We've extended ERC20Pausable, which makes at a pausable ERC20 token.

We made it pausable because we want to be able to pause the contract if we do a hard fork. A common scam is to sell somebody tokens of a deprecated address.

Constructor

Its constructor copies over all balances from our "trove" contract, which was used to track team member allocations and early investor allocations. It also locks all these tokens permanently, until the next hard fork. This is to prevent team members and investors from selling their tokens into the market until mainnet launch. It also copies over the balance of our genesis wallet. For this address, it does not lock the account. This is because we need to transfer tokens out of the genesis address before the mainnet launch.

lockMyTokensForever

Can be called by anyone to lock msg.sender. It's not clear why you would want to do this, but we wanted to have the option of locking more accounts in the future. This could happen either with future investors, or with current team members who haven't received their tokens yet.

Transfer + TransferFrom

The only other thing in this contract is a wrapper around the ERC20Pausable transfer and transferFrom functions. The only thing that happens is that we mandate that the account must not be locked in order for the transfer to occur, and we also return the bool result of the transfer so it can be used with SafeERC20.

TokenVesting.sol

TokenVesting.sol is a contract we use to distribute tokens according to a linear vesting schedule. It is a minor variant of the OpenZeppelin contract from their version 2.0.0 August 2018 audit, taken at commit 4115686b4f8c1abf29f1f855eb15308076159959.

What does this code do and why?

This code provides the ability for tokens to be transferred to a beneficiary's address according to a linear vesting schedule.

release

At any point in time anyone on the blockchain can call release in order to transfer all available vested balance to the beneficiary's address. You could for example call this every day, in order to do day-by-day vesting.

releasable

We added a public view that returns the total amount releasable by the contract. This is just a nicety, since there isn't otherwise a good way to determine how many tokens can potentially be released at some arbitrary time.

SlowWallet.sol

SlowWallet.sol is a contract we use to prevent Reserve from transferring tokens out of the Reserve main wallet unexpectedly. More precisely, it delays transfers out of the wallet by 2 weeks. It is based off a contract that was part of our audit with Trail of Bits.

What does this code do and why?

This code tracks a list of proposals, where each proposal is a time-gated transfer function. The owner of the contract can add proposals to the list by calling propose, and then after 2 weeks has passed, can call confirm in order to carry out the transfer. They can also cancel the propsal, and they can also voidAll of the proposals. This feature is important because it means if an attacker gains a copy of the key, while they can propose transfers, we can easily cancel any number of them at a low cost.

About

Reserve Rights token and associated contracts

Resources

Readme
License

Code of conduct

Code of conduct

Contributing

Contributing

Security policy

Security policy
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.