31 July 2021

Ubiquity Editorial Staff

<aside> 🚨 Notice Regarding Pre-Migration Rewards For users who have not redeemed UBQ rewards prior to the bonding v2 launch, please see the following pre-migration notice update.

</aside>

Bonding v2 Launch and Migration

As of today, the awaited upgrade to Ubiquity's bonding contract is finally live! Please see the Bonding v2 Upgrade documentation page for a brief simplified overview of the modifications implemented across the protocol's smart contracts. The most prominent of these changes are as follows:

With the upgraded protocol live, the development team will set the list of addresses to migrate from v1 to v2 via the addUserToMigrate function. If you are on the list, you can migrate by calling the migrate function from the BondingV2.sol smart contract.

If you connect to the dApp using a wallet that is in the v1 list, a migrate button should appear in the UI, which will execute this function for you to seamlessly migrate your bonding shares to the new bonding v2 system.

To summarize, the steps a user can take to migrate to the new contract are as follows:

<aside> 📖 Migrating from Bonding v1 to Bonding v2

0. Your address is added to the whitelist to be migrated from v1 to v2.

1a. When enabled, users who connect to Ubiquity's dApp using an address found in the migration list should find a "Migrate" button appear automatically in the UI. To migrate to the upgraded bonding contract, users can simply click the button (it's as easy as that!).

1b. Alternatively, users can migrate directly using the migrate function found in BondingV2.sol. So long as the user's address is on the whitelist for migration, executing this function will migrate their deposits into the new bonding v2 contract.

2. With your deposit(s) now migrated to the bonding v2 contract, you can now interact with the protocol just as before!

The dApp interface will use the functions in the upgraded smart contracts, and users who want to interact with the bonding contract directly will simply use the functions found in BondingV2.sol

</aside>

It should be noted that users who had multiple bonding shares will have their newly staked funds written onto the new singular and persistent bonding share NFT, which will update its parameters as users interact with the protocol. Likewise, if these users had multiple shares with different bonding durations and LP values, these staked assets will be deposited into the bonding v2 contract using the following weighted average formula:

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/b31571a4-df31-48ec-b6b3-e5063d252d13/weightedavgformula.png

This keeps the migration fair across all user deposits in accordance to their original incentives. If users were permitted to choose an arbitrarily long duration for the bonding v2 contract deposits, users with longer bonding durations in the v1 contract (e.g. on the timescale of years) would have received potentially outsized UBQ and LP token rewards after only being staked for a few weeks.

The weighted average used to merge multiple deposits from the v1 bonding contract preserves the original proportion of total staked assets to bonding durations, thus also preserving the original incentives involved with those deposits.