Yam is an experimental protocol building upon recent innovations in programmable money and governance. It launched publicly on August 11, 2020. Cryptocurrency holders staked over $400 million through the YAM protocol within 24 hours of launch. After a rapid rise in market cap and Total Value Locked (TVL), the project crashed and burned on August 12th, 2020 due to unforeseen bugs in the rebase code.
YAM is an elastic supply cryptocurrency, which expands and contracts its supply in response to market conditions, initially targeting 1 USD per YAM. This stability mechanism includes one key addition to existing elastic supply models such as Ampleforth: a portion of each supply expansion is used to buy yCurve (a high-yield USD-denominated stablecoin) and add it to the Yam treasury, which is controlled via Yam community governance.
The team built Yam to be a minimally viable monetary experiment, and at launch, there will be zero value in the YAM token. After deployment, it is entirely dependent upon YAM holders to determine its value and future development. The team also employed a fork of the Compound (cryptocurrency) governance module, which will ensure all updates to the Yam protocol happen entirely on-chain through community voting.
At the time of launch, YAM had not been audited. Contributors simply gave their best efforts to ensure the security of the contracts.
On September 10, 2020, Peckshield a leading DeFi audit company completed an audit of Yamv3. The firm discovered numerous problems that dealt with performance and security. Specifically, the audit discovered 17 basic coding bugs and 12 problems within the firm’s ‘advanced DeFi scrutiny’ of ‘business logic’ and ‘system operations.’ Moreover, the firm made six recommendations to the team.
Classifying the problems in levels, PeckShield categorized four problems as informational, four as medium-risk, and one as high-risk. Additionally, there were four informational issues. Moreover, there was no critical bug that could disable the protocol. Since the audit, all problems have been resolved. The blockchain firm stated:
“YAM presents an interesting and novel experiment of on-chain community-based governance and elastic supply cryptocurrency, and we are very impressed by the overall design and implementation.”
YAM is being distributed in the same way as YFI: no pre-mine, no founder shares, and no venture capital interests.
The initial distribution of YAM will be evenly distributed across eight staking pools: WETH, YFI, MKR, LEND, LINK, SNX, COMP, and ETH/APML Uniswap v2 LP tokens. These pools were chosen intentionally to reach a broad swath of the overall DeFi (Decentralized Finance) community, as well as specific communities with a proven commitment to active governance and an understanding of complex tokenomics.
Following the launch of the initial distribution pools, a second distribution wave will be incentivized through a YAM/yCRV Uniswap pool. This pool will allow Uniswap's TWAP-based oracle to provide necessary input as the basis for rebasing calculations, as well as provide liquidity for the rebase to purchase yCurve for the treasury.
Rebates are controlled by an external contract called the Rebaser. This is comparable to Ampleforth's monetary policy contract. It dictates how large the rebase is and what happens on the rebase. The YAM token just changes the supply based on what this contract provides it.
Requirements before rebates are active:
- Liquid YAM/yCRV market
Following the launch of the second pool, rebasing can begin its activation phase. This begins with init_twap() on the rebaser contract. Anyone can call this at any time once there is a YAM/yCRV Uniswap V2 market. The oracle is designed to be 12 hours between checkpoints. Given that, 12 hours after init_twap() is called, anyone can call activate_rebasing(). This turns to rebase on, permanently. Now anyone can call rebase() when inRebaseWindow() == true;.
In a rebase, the order of operations is:
- ensure in rebase window
- calculate how far off-price is from the peg
- dampen the rebase by the rebaseLag
- if positive calculate protocol mint amount
- the change scaling factor, (en/de) floating the supply
- sync uni swap, mint, sell to uni swap, transfer excess YAM, and bought yCRV to reserves
- call any extra functions governance adds in the future (i.e. Balancer gulps)
Much of YAM's codebase is modified from existing works, including:
- Compound (cryptocurrency) - Jumping off point for token code and governance
- Ampleforth (Cryptocurrency) - Initial rebasing mechanism, modified to better suit the YAM protocol
- Synthetix - Rewards staking contract
- yEarn - Initial fair distribution implementation
YAM launched with fully decentralized governance from day 1 by implementing the Compound (protocol) governance module. This gives control of the protocol to YAM token holders, meaning that updates to the protocol and management of the treasury can only be performed with approval from YAM holders.
The governance process begins on where proposals are first submitted for discussion. If the community signals its interest and any necessary modifications to the proposal are made, the proposal is submitted to, where token holders can vote with their token balances. If a snapshot proposal is passed and no code is required to be implemented, the approved action can be taken. If code deployment is required, the code will go to audit if necessary, and then be proposed via on-chain governance at which point token holders will vote once more to deploy.
YAM is the governance token for the YAM protocol. Using token voting, YAM holders have direct influence over the YAM treasury and the direction of the protocol. Governance discussions take place on the Yam Governance Forum. It releases every 12 hours.
With no pre-mine and no sale, YAM tokens are distributed evenly across eight YAM staking pools including:
- ETH/AMPL Uniswap LP tokens
- There was initially a total supply of 5,000,000 YAM. YAM initially distributed 2,000,000 YAM (250,000 per pool) per week to users who stake any of the aforementioned DeFi tokens. Following the initial distribution, Wave 2 Uniswap Liquidity Providers (LPs) were incentivized with 3,000,000 YAM with 1.5 million distributed in the first week and decreasing by 50% each week after.
The original YAM protocol was launched on August 11, 2020, but had a critical bug that disabled any future governance and control of the treasury. Token holders migrated to YAMv2 in order to vote on the parameters for a V3 launch while the protocol was audited. On September 18, 2020, the fully functional YAM protocol was released and V2 token holders migrated to the new YAM token.
YAMv1 experienced a critical bug that disabled governance. On August 12, 2020, the YAM team discovered a bug in the YAM rebasing contract that would mint far more YAM than intended to sell to the Uniswap YAM/yCRV pool, sending a large amount of excess YAM to the protocol reserve. Given YAM’s governance module, this bug would render it impossible to reach quorum, meaning no governance action would be possible and funds in the treasury would be locked.
The team believed achieving quorum for a bug-fix proposal would allow them to save the protocol, and they quickly rallied the community to delegate their votes towards this end.
Shortly after August 13th, they submitted a governance proposal and cast a vote with what they originally believed were sufficient votes to be able to enact it. Shortly thereafter, with help from security experts, the team concluded that the rebaser bug would interact with the governance module and prevent this proposal from succeeding.
The team initiated a community-funded audit of the YAM contracts. According to their plans, if the funding goal was reached, upon the completion of the audit, they would launchYAM 2.0 via a migration contract from YAM.
YAMv2 and YAMv3
Following the successful audit funding in the wake of the V1 bug, the launch team deployed a migration contract enabling migration from V1 to a stable ERC20 YAMv2. The V2 token was to be used for voting on key issues for the relaunch of YAM, while the protocol was being audited.
After the launch of the YAM governance portal on August 24, 2020, the community discussed, proposed, and voted on the key issues relating to YAMv3’s launch, and reached a consensus regarding those specifications.
On August 31, the YAMv2 interim governance period ended, and all successful proposals prior to that time were implemented in YAMv3.
Below is a summary of the YAMv3 launch parameters, as voted on and created by the YAM community.
V3 Initial Supply: 5,010,000
Migration: YAMv2 to YAMv3 was a 1:1 migration with no deadline, with 50% immediately redeemable and 50% continuously vested over 30 days.
Delegator Rewards: Delegators with equal to or under 27 votes received a flat 27 YAMv3 reward, while delegators with over 27 votes received a 1:1 YAMv3 reward for votes delegated. Rewards were continually vested over 90 days.
Incentivized Pools: The YAMv3/yUSD Uniswap LP pool received awards totaling approximately 925k, with 92.5k distributed the first week and decreasing by 10% each following.
YAMv1 Missed Migration: Using a snapshot of balances at the time the end of V1 to V2 migration, a multisig was created to assist users who missed the initial migration. This assistance did not apply to any YAMv1 purchased after the migration window closed.
Gitcoin Grant Matching Pool: The Yam protocol directed 1% of all treasury inflows to Gitcoin Grants in order to support public goods in the Ethereum ecosystem.
Did you find this article interesting?