How WeiDai works
Imagine a Digital Gold Standard (Analogy)
In the original gold standard, a dollar note represented a certain physical quantity of gold. In a very real sense, it was a gift voucher for gold so that when you traded it in at the bank counter, you were presented with the gold promised on the note. The system only worked if the total promised value of gold in circulating notes matched the gold reserves of the state. For instance, if a 1000 notes circulated, each promising 1 ounce of gold then the state would need to maintain 1000 ounces of gold in reserve.
Over the years, the state couldn’t resist printing more notes than gold, which brought into question the actual value of each note. In order to avoid the embarrassing situation of too many note holders redeeming gold that didn’t actually exist, the nation states of the world eventually abandoned the link between notes and gold.
Suppose instead of abandoning the gold standard, a new magical technology came into existence that allowed each circulating note to calculate how much gold it was currently backed by. For instance, assume the state starts with 1000 ounces of gold in reserve and 1000 notes in circulation. Each note claims to redeem 1 ounce of gold. Now the state prints 600 more notes so that there are now 1600 notes in circulation and 1000 ounces of gold in reserve. The notes automatically update their promise to 0.625 ounces of gold. The money therefore instantly debases itself and existing holders are instantly poorer.
Conversely, if the state added to its gold reserve without printing notes or retires a portion of notes from circulation, the circulating notes would instantly register an increase in their redeem value. This is how WeiDai works. WeiDai is collateralized by Dai (instead of gold) in a smart contract. At any point in time, WeiDai has a redeem value stated in Dai. WeiDai is created by sending Dai to a special smart contract that generates new WeiDai in accordance with the existing redeem value. When WeiDai is redeemed, it is destroyed and Dai is released from reserve to the redeemer so that the redeem rate doesn’t fall.
WeiDai is never printed without backing. There is no decentralized or centralized mechanism to create WeiDai without first supplying Dai to be held in reserve. At the very least, WeiDai is as stable as Dai.
A number of incentives exist in WeiDai to encourage holders to burn the circulating supply. Recall from above that burning WeiDai instantaneously increases the redeem rate of the remaining circulating WeiDai. The incentives are dynamic, similar to mining difficulty in proof of work and act to regulate the rate of token burn so that a balance is struck between runaway burning that increases the WeiDai value too rapidly, and zero burning which would render WeiDai equivalent to Dai.
In addition, whenever a portion of WeiDai is redeemed, 2% of it is first set aside and burnt without releasing any Dai. This acts as a transaction fee. The remaining 98% is redeemed against the reserve of Dai and destroyed in the process. Both of these pressures on circulation mean that the circulating supply of WeiDai is always falling relative to the reserve supply of Dai. This instantly and automatically pushes up the redeem value of the remaining WeiDai. WeiDai is not the first token to have burn incentives but the combination of burn incentives and stablecoin collateralization is the magic formula required to create a thriftcoin.
How It Works (semi-technical)
Patience is a virtue
Every currency transfers wealth from one group to another. Inflationary currency transfers wealth from savers to borrowers. Fiat currency transfers wealth from the financially marginalized to financial cartels. Bitcoin transfers wealth from speculators and latecomers to HODLers and early adopters.
WeiDai is no different but the transfer process is new. WeiDai rewards patience, a bedrock of thriftiness and as such transfers wealth from the impatient to the patient using a special Ethereum smart contract known as the “Patience Regulation Engine”.
To create WeiDai, a user sends Dai to the Patience Regulation Engine (PRE, henceforth). The WeiDai (an ERC20 token) is instantly generated according to the current redeem rate but is locked. The user must wait a certain number of blocks, after which the WeiDai is unlocked and can be withdrawn. This wait duration is known as the incubation period. If the user wishes to withdraw their WeiDai early, they incur a penalty. The less patient the user (and hence the earlier they wish to withdraw), the steeper the penalty. The penalty declines from 100% at the time the WeiDai is created in discrete 5% lumps until it reaches 0%, at which point the the incubation period ends and the WeiDai can be claimed without penalty.
The PRE monitors how patient users are. If a weighted majority of users manage to hold out for the duration of the incubation period, then the incubation period is dynamically doubled (increased difficulty). If a weighted majority of users fail to hold out and choose to incur early claim penalties then the incubation period is halved (decreased difficulty). For penalized early claimers, those who claim earlier weigh the decision to adjust difficulty heavier than users who hold out as long as possible before claiming. In this way, the PRE can determine how “unreasonably long” the current incubation period is. This system of regulating patience according to the willpower of users mimics the dynamic difficulty adjustment of proof of work coins, except that instead of electricity and mining equipment, time is the resource extracted from “miners”. Proof of Forbearance.
What happens to the penalty?
When a user creates WeiDai, they can specify a split rate (a percentage between 0 and 99) which only comes into effect if they claim early. The split rate determines what percentage of the penalty is donated to the WeiDai treasury. The development team of WeiDai does not profit from the system and as such relies on donations. The portion of the penalty that isn’t donated is burnt, pushing up the redeem rate for the remaining WeiDai. A high split rate benefits the creator of WeiDai but a low split rate benefits all the holders of WeiDai tokens. The PRE will thus act to gradually push up the redeem value of the circulating WeiDai through constant burning.
What about Whales?
Since WeiDai is created at the prevailing redeem rate, it cannot be pumped. Or rather, so long as Dai cannot be pumped, neither can WeiDai. Weidai is only as stable as the underlying Dai. Unlike all other tokens, dumping actually pushes up the value of WeiDai, curtailing the rush to the exit and once again rewarding the patient by transferring value from dumpers to holders. The reason WeiDai gains in value during a dump is because redeeming WeiDai for Dai first incurs a 2% redemption fee which is burnt. Only the remaining 98% is redeemed. To illustrate how redemption increases the redeem rate, consider the following example:
Satoshi and Sarah each own 50 WeiDai and there is 100 Dai in reserve. This means that each WeiDai token can be redeemed for 1 Dai token. Satoshi decides to redeem 25 WeiDai. 0.5 WeiDai (2%) is burnt as a fee, and the remaining 24.5 is redeemed for 24.5 Dai. The reserve now contains 24.5 fewer Dai but 25 WeiDai were taken out of circulation. This means that the remaining WeiDai can be redeemed for (75.5/75 =)1.006 Dai. Sarah initially could redeem her 50 WeiDai for 50 Dai but can now redeem it for 50.3333 Dai. Her WeiDai wealth has passively grown by 0.6%.
I want to get some WeiDai now!
WeiDai is not presented as an ICO or a future promise. It’s live on the Ethereum mainnet right now. Be sure to have the Metamask extension installed in your browser. You’ll also need some Dai to get started.
Please visit the repo at Github. WeiDai is also live on Kovan testnet if you’d like to play around first before committing real Dai. Just remember to switch the network in Metamask.