WISE logo

TECHNICAL SPECIFICATION

of the

WISE

ERC-20 TOKEN

authored by

Aaron Hanson

CTO, WiseSoft, LLC

v1.6.0 — November 30, 2020

01110111011010010111001101100101

Table Of Contents
1Introduction1.1WISE Token Purpose1.2WiseSoft, LLC1.3Motivations and Principles2WISE Contract Functionality2.1General Properties2.1.1Token Supply2.2Liquidity Transformer Epoch2.2.1Token Reservation2.2.2Daily LT Supply Schedule2.2.3Reservation Referrals2.2.3.1Referrer Bonuses2.3Circulation Epoch2.3.1Uniswap Provision2.3.2Wise Team Reimbursement2.3.3Minting Tokens2.3.4Supply Inflation2.3.5Staking2.3.5.1Opening Stakes2.3.5.2Shares and Interest2.3.5.3Scraping Stake Interest2.3.5.4Closing Stakes2.3.5.5Stake Referrals2.3.6Liquidity Provider Staking2.4ERC-20 Functionality3WISE Website3.1Referral Links4Conclusion5Acknowledgements6Availability7Appendices8References

1  Introduction

WISE Token, hereinafter referred to as WISE, is an ERC-20 compliant smart contract designed for deployment on the Ethereum blockchain. WISE is a decentralized, fairly launched, automatically liquid, trustlessly exchangeable, interest-bearing, bond-like token.

This document is a general technical specification of the contract and its functionality.

Mainnet launch of the WISE contract is scheduled for October 8, 2020

1.1  WISE Token Purpose

The core purpose of the WISE token — staking — is similar to both bonds and CDs (certificates of deposit): rewarding the holder with earned interest in exchange for locking up their funds for a period of time. WISE incorporates some of the features from both of these traditional instruments but improves greatly upon them.

CDs tend to be lower risk, lower return, and only pay out interest on their maturity date.

Bonds tend to be somewhat higher risk, higher return, and pay out interest regularly on a set schedule (typically every six months).

WISE is most similar to a bond, in that it earns relatively high interest, but allows users to withdraw it whenever they want.

WISE is superior to bonds and CDs in every way:

WISE gives the staker complete flexibility in choosing exactly when to withdraw their interest during the life of the stake. You can withdraw interest daily, irregularly, wait until maturity, or whatever you like!

WISE stakes have higher return, much lower risk (due to being decentralized and trustless), and far higher flexibility than both bonds and CDs. No more trusting banks and governments to stay solvent and not change their rules. No more worrying that a bond issuer may default on you.

WISE is pure, immutable code.

1.2  WiseSoft, LLC

WiseSoft, LLC was formed January, 2021. Its purpose is to fund various related software and websites in the WISE ecosystem.

The WISE contract source code is publicly viewable on GitHub and was created by the same team that created WiseSoft. A paid, professional audit of the WISE contract source code has been completed and included in this document.

1.3  Motivations and Principles

Trusting your money in the custody of other humans is inherently risky. This glaring flaw in traditional financial instruments is a primary motivation for developing WISE. The WISE contract aims to ensure that a user can always be in full custody and control of their WISE tokens, even during the course of various economic activities.

The initial minting of WISE, earning referral bonuses, opening and closing stakes, receiving interest, and even selling WISE for ETH or other tokens can all be done end-to-end without the user's WISE tokens ever being under the control of another person or system. Compare this to the world of banks you can('t) trust and traditional money managers that (don't) have your best interests at heart.

One very important aspect of owning cryptocurrencies is having a place to safely, easily, and quickly trade them when the need arises. We believe Uniswap, a popular and highly regarded decentralized exchange (DEX) smart contract on Ethereum, is such a place. Following the fifty day Liquidity Transformer Epoch, the WISE contract will automatically, trustlessly, and irrevocably bootstrap its own initial liquidity pool on Uniswap. At least 90% of all ETH sent by users to the WISE contract during the LT Epoch will in turn be automatically transferred to Uniswap by the WISE contract, along with an amount of minted WISE in equal value.

In exchange for and simultaneous to this liquidity pool deposit, Uniswap transfers to the WISE contract an appropriate amount of UNI liquidity tokens, which carry the sole power to later withdraw that liquidity pool. The WISE contract will automatically, immediately, and provably destroy these UNI tokens by transferring them to a known burn address. In doing so, the WISE contract ensures that this initial ETH/WISE liquidity pool cannot be withdrawn from Uniswap by any person, party, contract, or entity — for all eternity.

The WISE contract also allows users to earn interest on WISE token time deposits called stakes, which are most similar to bonds, but more flexible. A stake earns interest like a bond, but with the added feature of allowing interest withdrawals at any time during the life of the stake; not something bonds allow. These bond-like interest-bearing stakes in WISE are always fully in the custody of the user and their wallet, never held, influenced, or able to be confiscated by any third party.

2  WISE Contract Functionality

The WISE contract has several key properties and core functions, outlined in detail in the following sections. Some of the important mathematical calculations and data structures are also presented here. Various example scenarios of user and multi-user activity and contract state evolution are illustrated where appropriate.

2.1  General Properties

The contract defines the token name as "Wise Token", the token symbol as "WISE", and the number of decimals as 18.

The base unit of WISE is called YODA. One WISE is composed of one quintillion (1 × 1018) YODA.

Time is tracked by the contract in whole day increments, beginning at Day 0, which starts at the midnight UTC preceding the contract deployment. The individual days used for the LT Epoch will be higher day numbers in the code, rather than literally being day numbers 1–50.

The contract has no special functionality granted to the deploying account, no administrative keys, and no concept of a contract owner. All users, including the founders and developers, have precisely equal access to the contract's functionality.

The contract, once deployed, is immutable. No proxy or delegate contracts are involved.

2.1.1  Token Supply

The contract has no set token supply. The total initial supply minted by users through the Liquidity Transformer will fall within a defined range, determined partially by confined randomness, and partially by referral bonuses.

The 50 day Liquidity Transformer has an average of five million WISE available each day, though some days have randomness involved. This means the total supply available in the LT will likely be around 250 million WISE. Due to referrer bonuses, there could be up to an additional 10% minted on top of that (i.e. up to 25 million more).

This total supply is then matched by a minted batch that is then sent permanently to Uniswap. The amount of WISE sent to Uniswap will be up to 10% less than what was mintable through the LT and referral bonuses, due to the team reimbursement ETH. Regardless, the ratio of WISE/ETH sent to Uniswap will match exactly the ratio of mintable LT WISE (including referral bonus WISE) to LT ETH. This ensures that the initial Uniswap price matches the overall price of the LT.

The total supply of WISE in existence after the LT and Uniswap provision is subject to LT randomness, referral activity, and whether the team reimbursement ends up being a full 10% or less due to the hardcoded cap.

For example, if we assume the randomness averages out, assume half of all possible referrer bonuses are earned, and assume the team reimbursement cap causes it to be only 5% of the LT ETH, then the total initial supply would be:


        baseLTSupply = 250,000,000 WISE
referrerBonuses = baseLTSupply * 5% = 12,500,000 WISE
totalLTSupply = baseLTSupply + referrerBonuses = 262,500,000 WISE
uniswapBatch = totalLTSupply * 95% = 249,375,000 WISE

totalInitialSupply = totalLTSupply + uniswapBatch = 511,875,000 WISE

Though extremely unlikely (virtually impossible), the absolute minimum possible total initial supply (all random days get their minimum values, no referral bonuses, and a low enough LT ETH total that makes the team reimbursement exactly 10%) would be:


        baseLTSupply = 180,000,010 WISE
referrerBonuses = baseLTSupply * 0% = 0 WISE
totalLTSupply = baseLTSupply + referrerBonuses = 180,000,010 WISE
uniswapBatch = totalLTSupply * 90% = 162,000,009 WISE

totalInitialSupply = totalLTSupply + uniswapBatch = 342,000,019 WISE

Though equally unlikely (virtually impossible), the absolute maximum possible total initial supply (all random days get their maximum values, maximum referral bonuses, and a high LT ETH total that makes the team reimbursement approach 0%) would be:


        baseLTSupply = 319,999,990 WISE
referrerBonuses = baseLTSupply * 10% = 31,999,999 WISE
totalLTSupply = baseLTSupply + referrerBonuses = 351,999,989 WISE
uniswapBatch = totalLTSupply * ~100% = 351,999,989 WISE

totalInitialSupply = totalLTSupply + uniswapBatch = 703,999,978 WISE

The total token supply will inflate at a rate of 4% per year, starting once the Liquidity Transformer Epoch ends and the Circulation Epoch begins. Some of the new tokens will be minted directly to stakers upon closing a stake, and some minted to stake referrers. If no stakes are closed on a given day, and no stakes scrape interest on that day, no new tokens are actually minted that day, though they are earmarked to be minted later. Once a stake is closed, all tokens the stake had earmarked to it for all past days are then minted at once.

2.2  Liquidity Transformer Epoch

The launch of the WISE contract will kick off an initial 50 day phase during which users may send ETH (or any ERC-20 token traded on Uniswap V2) to the contract in order to reserve WISE tokens. The tokens reserved can be minted by the users immediately following the end of the LT Epoch, i.e. the start of day 51.

Each day of the LT Epoch will have an amount of WISE tokens that are reservable by all those who deposit ETH to that day. Most days will have exactly five million WISE available, but the other days will have their available WISE amount randomly set within a predefined range. These random amounts will be determined by the contract shortly after the end of each random day, by leveraging the Provable (formerly called “Oraclize”) smart contract's Random Datasource interface. The generated randomness is delivered on-chain in a trustless and provably cryptographically secure manner. For more detailed information about Provable, please read their random datasource white paper and their security deep dive.

Each day's available WISE ends up getting split amongst the users who deposited ETH to that day, in direct proportion. In other words, a user that made a reservation on a particular LT day will later be able to mint the fraction of that day's available WISE that equals the fraction of the day's total ETH they personally sent in.

2.2.1  Token Reservation

On any given day of the LT Epoch, users may choose to send ETH (or any ERC-20 token traded on Uniswap V2) to the contract and assign it to any of the LT Epoch days that have not yet concluded. We call this action a “token reservation”.

For example, during day 12, users may send and assign ETH to any of the days 12–50, but not to days 1–11, since those days have already concluded.

Each token reservation is assigned to a single day, but users may make as many such reservations as they wish, to as many different days as they wish.

The WISE contract front end will also include the ability for a user to spread a single reservation amount of ETH (or ERC-20) evenly across all remaining LT days. This “dollar cost averaging” feature saves gas for the user who wishes to reserve an equal part of each LT day.

Reservations can be made with ETH, but also with any ERC-20 token that's traded on Uniswap V2. This is done via direct integration with Uniswap, which swaps the ERC-20 for ETH as part of the reservation transaction. This is functionally the same as the users themselves swapping the ERC-20 for ETH on Uniswap, and then later sending the ETH to the WISE contract for a token reservation. The benefit of using the WISE reservation interface to do this is that it saves the user some gas fees and time.

Each single token reservation must be of a minimum ETH amount, to make spam attacks cost-prohibitive. The specific minimum amount will be finalized at a later date, closer to launch. This is because the price of ETH may change significantly between the time of this writing and the contract launch. The minimum will likely be in the neighborhood of $10 worth of ETH.

The contract will provide public interfaces for viewing the total amount of ETH currently assigned to each LT Epoch day across all users, as well as the total WISE available for each day (where that supply has been determined, in the case of random days). For days where the supply has not yet been finalized, the min/max range will also be retrievable from the contract.

2.2.2  Daily LT Supply Schedule

Every LT day has an average of five million WISE available for reservation. Some of the days with randomly determined amounts have tight ranges only a few hundred thousand WISE in variance, and others are extremely variant, ranging from a single WISE to ten million WISE (technically 9,999,999 WISE, in order to preserve a strict average of five million per day). In this way, the LT Epoch provides various exciting options for users wishing to gamble with their ETH, and at various levels of risk/reward.

The following table outlines how many WISE will be available for user reservation on each day of the LT Epoch. Most days have exactly five million WISE available. The rest show two supply values: the minimum and maximum available that day. Each day is color coded for relative risk level, from none to high):

Sun Mon Tue Wed Thu Fri Sat
Nov 11
5M
Nov 12
5M
Nov 13
5M
Nov 14
5M
Nov 15
5M
Nov 16
5M
Nov 17
5M
Nov 18
5.5M
4.5M
Nov 19
5M
Nov 20
5.5M
4.5M
Nov 21
5M
Nov 22
10M
1
Nov 23
5M
Nov 24
6M
4M
Nov 25
5M
Nov 26
6M
4M
Nov 27
6M
4M
Nov 28
5M
Nov 29
10M
1
Nov 30
5M
Dec 1
6.5M
3.5M
Dec 2
5M
Dec 3
6.5M
3.5M
Dec 4
5M
Dec 5
6.5M
3.5M
Dec 6
10M
1
Dec 7
5M
Dec 8
5M
Dec 9
7M
3M
Dec 10
5M
Dec 11
7M
3M
Dec 12
5M
Dec 13
10M
1
Dec 14
5M
Dec 15
7.5M
2.5M
Dec 16
7.5M
2.5M
Dec 17
5M
Dec 18
7.5M
2.5M
Dec 19
5M
Dec 20
10M
1
Dec 21
5M
Dec 22
10M
1
Dec 23
5M
Dec 24
10M
1
Dec 25
5M
Dec 26
10M
1
Dec 27
10M
1
Dec 28
10M
1
Dec 29
5M
Dec 30
5M

2.2.3  Reservation Referrals

The WISE contract has a direct, one-level referral system that rewards both the referrer and referee when a user reserves WISE tokens in the LT. This referral system is an incentive to help increase the amount of ETH sent in, in turn funding a larger and more robust initial liquidity pool on Uniswap.

When a user makes a token reservation, the front-end interface checks if their browser has a referral cookie stored. If such a cookie is present, the contract makes note of the referrer's ethereum address and associates it with the referee's token reservation. The contract also tags the user's token reservation as having been through a referral, and this reservation is credited as having been 10% more ETH than it actually was. When the user mints their reserved tokens after the end of the LT Epoch, each token reservation that was through a referral will thus mint 10% more WISE than if it hadn't been through a referral.

Users may change the referral cookie stored in their browser at any time by clicking another referrer's link. If they do, their future token reservations would be associated with the new referrer. All past token reservations for that user remain as is; their previous referrer(s) do not lose credit for their existing referred token reservations.

2.2.3.1  Referrer Bonuses

When the LT Epoch ends, referrers that have referred enough ETH into the system, via their referred users' token reservations, can then mint an amount of bonus WISE.

The LT referrer bonus system has two tiers. Bonuses (paid in WISE) are based on how much total ETH their referral link brought in to the LT:

Examples:

Note: all referral bonuses are paid in WISE. When the LT ends, an effective total LT WISE/ETH exchange rate is calculated by looking at the total amount of ETH sent in by all users, and the total amount of WISE made available for reservation. This ratio is then used to calculate the amount of WISE for each referral bonus.

2.3  Circulation Epoch

When the final LT Epoch day ends, the Circulation Epoch begins. At this point, no further token reservations can be made.

Reserved WISE and referrer bonus WISE may now be minted by users, at their leisure. Users may begin staking WISE. 90% or more of all ETH sent into the LT and a matching batch of WISE is automatically sent to Uniswap, so users may begin trading WISE and ETH there. All standard ERC-20 functions involving minted tokens are also now available. At the start of the fifteenth day of the Circulation Epoch, there will be a one-time automatic share price increase of 10%.

Once the LT Epoch has ended, there is a public function in the contract that may be called by anyone to trigger the following one-time sequence of actions to start the Circulation Epoch:

  1. Calculate the total ETH sent into the LT. Set aside 10% or 2,000 ETH, whichever is less, for the Wise team reimbursement performed in Step 4 below. The remaining 90% (or more) of this ETH is the “Uniswap Provision Ether”.
  2. Calculate the total WISE that is available to be minted due to token reservations and referrer bonuses. Calculate the same fraction of this WISE (90% or more) that was used to determine the Uniswap Provision Ether in Step 1 above. Immediately mint this amount of new WISE. This is the “Uniswap Provision WISE”.
  3. Transfer the “Uniswap Provision Ether” and “Uniswap Provision WISE” to the WISE/ETH Uniswap exchange pair contract, forming its initial liquidity pool. As part of this transfer, the WISE contract receives back from the Uniswap contract an amount of UNI-V2 liquidity tokens and immediately burns these by transferring them to a known burn address.
  4. Transfer the 10% (or less) of LT ETH set aside in Step 1 to the Wise team's ethereum address.

2.3.1  Uniswap Provision

The WISE contract's constructor function, executed when deploying the WISE contract, will make a call to the Uniswap V2 factory contract in order to create the Uniswap WISE/ETH exchange pair contract. This newly created exchange contract's address will be stored internally in the WISE contract.

This newly created Uniswap WISE/ETH exchange pair contract will simply lie dormant until the Circulation Epoch begins and the Uniswap provision transfer is executed, using the stored address. No minted WISE exists until that point, so no liquidity can be added until then.

As part of sending the Uniswap provision WISE and ETH to the exchange pair contract, a UniswapV2Router contract is used, which internally wraps the ETH into WETH (wrapped ETH), as is standard in Uniswap V2.

The UniswapV2Router contract returns an amount of UNI-V2 liquidity tokens to the WISE contract as part of the Uniswap provision transaction. These UNI-V2 liquidity tokens represent ownership of the liquidity pool the WISE contract just sent in, and carry the sole power to withdraw that liquidity. The WISE contract has no code or function allowing such a liquidity withdrawal. However, as a further show of the Wise team's commitment to making WISE a totally trustless system, the WISE contract will automatically and irrevocably destroy these UNI-V2 liquidity tokens upon receipt. This is done by transferring them to a known “burn address”, such as 0x0.

Once the Uniswap provision is complete, users are free to use Uniswap's front end to swap WISE into ETH, and vice-versa. They may also choose to deposit their own liquidity pools of WISE/ETH in order to earn fees from traders.

2.3.2  Wise Team Reimbursement

Prior to deploying the WISE contract, the Wise team will determine its total expenses incurred in developing and launching WISE. These will include wages paid to developers, fees paid to lawyers, marketing spend, and the cost of the audit.

This expense total is represented in the contract source code as a hardcoded amount of 2,000 ETH.

When the LT Epoch closes and the Circulation Epoch begins, the total ETH sent into the LT gets divided into two buckets:

The 10% (or less) bucket of ETH is then transferred to an ethereum address owned by the Wise team. The other bucket (90%+) is sent to Uniswap to create the first liquidity pool for WISE.

2.3.3  Minting Tokens

Once the LT Epoch has ended and the Circulation Epoch has begun, users may now mint WISE tokens, either due to having reserved WISE in the LT Epoch or having earned referral bonus WISE, or both.

The minting of WISE is done on-demand by the user, in a single batch, through the front-end interface. The interface will show how many WISE the user can mint, broken down by reservation and/or referral bonus sources. Users may mint their WISE immediately, or wait as long as they like, without penalty.

Users will likely want to mint their WISE sooner rather than later in order to take advantage of staking them to earn interest, which becomes less profitable the longer one waits.

2.3.4  Supply Inflation

The total circulating supply of WISE inflates at a constant rate of 4% per year. At the end of every day of the Circulation Epoch, the contract calculates how many new WISE will need to be minted for that day in order to achieve that rate of inflation.


        totalWiseSupply = circulatingWise + stakedWise
dailyInflationRate = (1.04 ^ (1 / 365) - 1)
dailyInflationRate =~ 0.0001074597820279

newWiseToday = totalWiseSupply × dailyInflationRate

These new daily inflation WISE are not immediately minted. Instead, they are earmarked for distribution to two parties: three quarters (3% inflation) to all active stake shares on that day, and one quarter (1% inflation) to all active, qualified CM shares that day. Each active stake is earmarked a fraction of this new WISE in proportion to the stake's shares' percentage of the total share pool that day. The same apportionment scheme is used for the WISE earmarked to qualified CM shares.

An example scenario:


        On day X, suppose there are:
  100,000,000 total circulating WISE
  30,000,000 total staked WISE
  10,000,000 total shares

The total new WISE that will be generated this day is then:
  newWiseDayX = (100,000,000 + 30,000,000) × 0.0001074597820279
  newWiseDayX = 13,969.771663627 WISE

This new WISE is split into two amounts:
  three quarters for stake shares (i.e. 3% inflation)
  one quarter for CM shares (i.e. 1% inflation)

Now, suppose user A has an active stake that is 2,000,000 shares.
On day X, this user's stake then gets some WISE earmarked for it:

  userANewWiseDayX = newWiseDayX × (3/4) × stakeShares / totalShares
  userANewWiseDayX = 13,969.771663627 × (3/4) × 2,000,000 / 10,000,000
  userANewWiseDayX = 2,095.46574954405 WISE

2.3.5  Staking

The WISE contract allows users to stake their WISE, locking it up for a period of days, in order to earn interest. This is the primary function of the contract during the Circulation Epoch.

Users may open as many stakes as they like. After a stake reaches full maturity, the user may close it at any time to receive their full principal, plus interest, without penalty.

Unlike some other stakeable tokens, WISE never penalizes a mature stake, no matter how late it is eventually closed. This allows users much more flexibility, especially for taxable income purposes. Also, should a user pass away before being able to close their stakes in a timely fashion, the WISE contract thus remains in compliance with estate laws of various jurisdictions that make it illegal to penalize the assets of a deceased person.

2.3.5.1  Opening Stakes

When a user opens a new stake, they choose an amount of WISE to stake, and a stake length in days. The minimum stake amount is 0.000000000001 WISE (1000000 YODA). The minimum stake length is one day, and the maximum stake length is 15,330 days (just under 42 years).

Once a stake is opened, it is in “Pending” status. This means that the stake won't technically begin until the following day. A user may close a stake in Pending status, receiving back the stake's principal, without penalty or interest.

Pending stakes become “Active” status once the next day begins. At this point, closing the stake before it reaches “Mature” status will incur a penalty.

When a stake is opened, the WISE tokens staked are actually burned by the contract and converted into “shares”. These shares exist for the life of the stake. Once the stake is closed, the shares are destroyed, and WISE is minted back to the user (along with any interest added and penalties deducted.

2.3.5.2  Shares and Interest

When a stake is opened, its WISE principal is burned and converted into shares. These shares represent the stake size and length as well as, indirectly, how early the stake was opened. The amount of shares a newly opened stake gets is determined by a global “share price” tracked in the WISE contract, as well as a percentage bonus based on the length of the stake. This share price only increases, hence staking earlier is better than later.

Stakes earn interest daily through the WISE supply inflation, as well as from other stakes' penalties paid. The WISE supply inflates at about 4% per year. Three quarters of that inflation (i.e. 3% APR) is distributed daily to all active stakes, in proportion to their shares as compared to the total share pool. The remaining one quarter (i.e. 1% APR) is distributed daily to the CM referrer shares in the same proportional manner.

Depending on the length of the stake, a bonus amount of shares will be generated on top of the amount determined by the staked amount of WISE and current share price. This bonus scales linearly from slightly above 0% for a one day stake, to 25% for a 5 year stake, and then to 30% for a 42 year stake. For instance, a stake with a length of 1.5 years will generate1.5 * 5% = 7.5% bonus shares.

The share price starts at some predetermined value denominated in WISE per share. Whenever any stake is closed, the contract calculates a ratio of that stake's total return (principal + interest - penalty) to its shares. If this ratio is greater than the current share price, then the share price is immediately set to this new, increased value.

The share price can only increase over time, albeit fairly slowly. This ensures that earlier stakes get more shares than later stakes of the same amount of WISE. This share price increase mechanism also prevents users from being able to compound their interest with a sequence of smaller stakes in order to try and outperform a single long stake of the same size.

On the start of the fifteenth day of the Circulation Epoch, the share price will be automatically increased by 10% as a one-time event. This creates a very strong incentive for users to open their stakes during the first two weeks of the Circulation Epoch. Waiting until day fifteen to open a stake will mean you get roughly 9% less shares than you would have on the previous day, for the same amount of WISE staked. In turn, that means roughly 9% less interest earned by the stake.

2.3.5.3  Scraping Stake Interest

Users will have the ability to withdraw (scrape) any amount of earned interest from an Active stake (i.e. before the stake fully matures).

Users can choose exactly how much interest they wish to scrape, up to the maximum (all accrued, unscraped interest from all previous days). Scraping interest from an Active stake can be done multiple times over the course of the stake.

Scraping interest is possible starting on day 2 of the active stake. On day 1 (the first active day), the stake has not yet completed a full day of being active, and thus has not yet accrued any interest.

When a stake is closed, whether Active or Mature, the interest minted back to the user only includes interest that hasn't already been scraped.

Scraping interest will not affect the stake's principal, but will reduce the number of shares the stake has going forward. This effectively means that the stake will earn slightly less interest on the current and all future days of the stake than it otherwise would have. This share reduction also prevents users from being able to end up with more overall shares if they choose to immediately re-stake their scraped interest.

Scraping interest may cause a share price increase, just as when closing a stake. Stakes track exactly how much cumulative scraped interest the user has scraped over the course of the stake, for the purpose of these calculations. The process for determining the possible share price increase and the stake shares reduction is as follows:

First, calculate a possible new share price based on the stake's pseudo-return (principal plus all scraped interest thus far, including this scrape) divided by the stake's initial shares:


        newSharePrice = (stakePrincipal + cumulativeScrapedInterest) / stakeInitialShares
    

Next, if this new share price is greater than the current global share price, update the global share price (which may have just increased due to this scrape):


        if (newSharePrice > globalSharePrice) globalSharePrice = newSharePrice
    

Next, calculate an amount of shares to be removed from the stake, based on the interest being scraped now and the global share price:


        stakeSharesToRemove = interestBeingScrapedNow / globalSharePrice
    

Finally, reduce the stake's current shares:


        stakeCurrentShares = stakeCurrentShares - stakeSharesToRemove
    

2.3.5.4  Closing Stakes

A user may close a stake at any time. Depending on the stake's status (where the stake is in its lifecycle), different things will happen:

The penalty deducted from the principal (stakedWise) when closing an Active stake is as follows:


        If the stake is one day long:
  penaltyAmount = stakedWise × 0.1

If the stake is two or more days long:
  penaltyAmount = stakedWise × (.1 + .8 × ((daysLeft - 1) / (stakedDays - 1)))

Thus, if you close an Active stake that was 100 days long on its final day before maturity, you get a 10% penalty applied to the principal. If you close the same stake on the first day of it being Active, you get a 90% penalty. The penalty scales linearly between those two extremes.

Any such WISE penalized from a stake's return is earmarked for distribution to all active stake shares that day. These penalty distributions are only realized by those stakes' shares when each of those stakes end.

2.3.5.5  Stake Referrals

Just as the WISE contract includes a referral program to incentivize users to help bring more ETH into the Liquidity Transformer, it also provides a referral program for staking.

When a user opens a new stake, the front-end interface checks whether the browser has a referral cookie, just as it does when making a token reservation in the LT Epoch. If such a cookie is present, AND the new stake is at least 365 days long, the contract tags this new stake with the referrer's address.

A referred stake generates 10% extra shares for the staker (beyond what it would have if not referred) as well an equal (but without the 10% bonus) amount of “critical mass shares” (a.k.a. “CM shares”) for the referrer. The system-wide pool of CM shares gets earmarked one quarter of the daily inflation WISE, but only for referrers that have qualified as CM referrers.

To qualify as a CM referrer, a user must have reached a total of $10,000 worth of referred stakes of 365+ days in length. If a user meets this condition, they are immediately and forever tagged as a CM referrer, and cannot ever lose that distinction, regardless of if their referees close all their stakes.

Another way to qualify as a CM referrer is to have referred 50 ETH of token reservations in the referral system of the LT Epoch. Users reaching that level are automatically pre-qualified as CM referrers forever.

Calculating a new stake's USD value is only done once, when the stake is opened. The WISE/USD exchange rate used for this calculation will be determined by querying the Uniswap WISE/ETH and ETH/DAI exchange pair contracts' price oracle interfaces.

2.3.6  Liquidity Provider Staking

WISE has an additional way of staking that rewards liquidity providers for the WISE/ETH pair if certain conditions are met. If the liquidity percentage of WISE on Uniswap falls below 20%, then you may stake your LP tokens with the WISE contract and start earning interest (on top of the trading fees you already get).

This new money comes from the 3% inflation for stakers such that, the 3% for stakers slowly decreases and the 0% for LPs slowly increases. Once this triggers, it will become valuable for a certain amount of people to LP stake since there is now a new pot of money available for LPs to earn daily interest.

An additional perk for LP staking is that you may end your stake at any time and collect your LP tokens. When the Uniswap liquidity goes back above 30%, the rewards slowly start diminishing. The staking inflation will creep back up towards 3% and the LP inflation will creep back towards 0% until triggered again.

This is a safeguard in the system that will most likely not be triggered for years if at all. Users can still choose to add to liquidity themselves at any time in order to earn about 6% ROI from fees, but the additional incentive of shares interest doesn't trigger until needed.

2.4  ERC-20 Functionality

The WISE contract conforms fully with the ERC-20 token standard, as proposed in EIP-20. This is essentially a set of functions that a token contract must implement in order to be an ERC-20 token.

This ERC-20 standard compliance means that applications, websites, exchanges, and smart contracts can very easily integrate with or be built on top of the WISE contract.

3  WISE Website

This section contains additional information about the WISE website.

3.1  Referral Links

ATTENTION: the WISE referral link and cookie system is ALREADY LIVE! You can start spreading your ref link today and building a base of referred users well before contract launch. So, do yourself a favor and start spreading your ref link everywhere!

Format: https://wisetoken.net/?w=YOURETHADDRESS

Example: Get 10% Bonus WISE!

Anyone may use a referral link to direct users to the WISE website, this Teal Paper, the forthcoming official contract web interface, or any other page on the wisetoken.net domain or its subdomains, in order to potentially earn various referral bonus WISE from those users' contract interactions.

When a user clicks such a ref link, the wisetoken.net website stores a cookie on their browser, containing the referrer's eth address from the ref link. If that user later sends ETH to the LT or starts a stake at least one year in duration, the cookie will cause the contract to mark that LT reservation or stake as having been referred by that referrer.

If a user already has a referral cookie in their browser and clicks a different ref link, the cookie will be overwritten with the second ref link's ethereum address. Referrals are thus "last click wins".

Referral links containing invalid ethereum addresses will not work; the website will not create (or overwrite) the cookie.

4  Conclusion

The Wise team sincerely hopes that our efforts to provide the general public with a trustless, decentralized, interest-bearing instrument will bear fruit, and that WISE will be a great success. But, we can't achieve these goals without the help of the community around us.

The WISE project was started not with the intention to profit, but from the desire to create something incredibly useful for the world. We hope this document has made our vision and intentions clear.

We welcome any questions, comments, or criticism you may have. We also have some need for various types of contributors to the project.

Please join us in the official WISE Telegram group at t.me/WiseToken and the official WISE Discord server to discuss the WISE project with the founders, developers, supporters, critics, and the rest of the community.

5  Acknowledgements

The Wise team would like to sincerely thank the following people and groups that have been and continue to be instrumental in making WISE a reality and a success:

6  Availability

The web version of this paper is hosted at https://wisetoken.net/teal/. Its source code is maintained at https://github.com/wise-foundation/wise-website/tree/master/html/teal.

7  Appendices

Appendix A  Terminology

Appendix B  Coding Standards

Appendix C  Source Code Audit

The Wise team has obtained a paid, professional audit of the WISE contract Solidity source code from CoinFabrik, a reputable auditing firm. The full audit report is included below.

TL;DR - The auditors' conclusion was, “We found that although the project shows a certain complexity, the code [is] well written and security has been taken into account. The documentation provided was also very helpful and relates correctly to what is implemented in the contracts. No security issues were found and the only non-security issue was quickly fixed by the team.

References

Adams, H. (2020, February). Uniswap whitepaper. https://hackmd.io/@Uniswap/HJ9jLsfTz

Adams, H., Zinsmeister, N., Robinson, D. (2020, March). Uniswap v2 core. https://uniswap.org/whitepaper.pdf

Knightly Crypto. (2020, March). Wise token: Trustless and easy interest-bearing crypto. https://wisetoken.net/wise-token-white-paper.pdf

Mushegian, N., Brockman, D., Brockman, M. (2018, February 6). Reference implementation of the decentralized DAI stablecoin issuance system. https://makerdao.com/purple/

Oraclize. (n.d.). A scalable architecture for on-demand, untrusted delivery of entropy. Retrieved March 22, 2020, from https://provable.xyz/papers/random_datasource-rev1.pdf.

Provable Things. (n.d.). Security deep dive. Provable docs. Retrieved March 22, 2020, from https://docs.provable.xyz/#security-deep-dive

Vogelsteller, F., & Buterin, V. (2015, November). EIP-20: ERC-20 token standard. https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md

Wood, G. (2019, October 20). Ethereum: A secure decentralized generalised transaction ledger: Byzantium version 7e819ec. https://ethereum.github.io/yellowpaper/paper.pdf

Zhang, Y., Chen, X., & Park, D. (2018, October). Formal specification of constant product (x × y = k) market maker model and implementation. https://github.com/runtimeverification/verified-smart-contracts/blob/uniswap/uniswap/x-y-k.pdf