This site uses cookies. Browsing the site, you agree to the use of cookies. If you need more information, please visit the Cookies Policy page
Cryptocurrencies: 5288 / Markets: 29901
Market Cap: $ 327 654 000 641 / 24h Vol: $ 100 126 016 465 / BTC Dominance: 58.825%

Н News

SushiSwap’s Users Ordered Changes, but the Protocol Can’t Deliver Without an Overhaul

The Takeaway:

The SushiSwap smart contract migration is complete but there’s a problem: Another migration may be needed if the team wants to implement changes to the protocol the SushiSwap community voted for.

Limitations in SushiSwap’s code make the proposed changes impossible without serious alterations to SushiSwap’s code, namely another migration, blockchain research firm IntoTheBlock told CoinDesk.

The SushiSwap community just voted to decrease the Sushi token reward – a so-called liquidity provider (LP) token which is rewarded to sushi users who stake tokens in SushiSwap’s liquidity pools – from 100 SUSHI per block to 50, with successive halvings every two years. In addition, this change would include a “vesting” mechanism whereby two thirds of all newly minted SUSHI are locked for one year.

These vested tokens would earn transaction fees but could not be moved or used in voting until the year-long timelock expires. The vesting proposal is particularly germane to this project after its progenitor, Chef Nomi, sold off $13 million worth SUSHI tokens for ether last weekend. Chef Nomi recently forfeited this fortune, though, announcing on Twitter that he sent the 37,400 ether he garnered from trading in his SUSHI tokens to the SushiSwap treasury.

Read more: ‘I F**ked Up’: SushiSwap Creator Chef Nomi Returns $14M Dev Fund

These proposals won a landslide majority vote among the community, but IntoTheBlock told CoinDesk SushiSwap’s current smart contracts aren’t flexible enough to bend the rules of the protocol.

The MasterChef contract, for instance, doesn’t allow for the reward schedule to be altered because the emission rate is “hard coded.”

“…[T]he current version of the MasterChef smart contract has hard coded the number of SUSHI tokens per block that can be awarded. This has been done via the sushiPerBlock variable which is initialized at a value of 100 at the contract creation time and can’t be modified after that. You can see the reference in line 96 of the MasterChef smart contract. In simpler terms, changing the value of the sushiPerBlock variable would require deploying a new smart contract,” reads an IntoTheBlock research document shared with CoinDesk.

Read more: SushiSwap Will Withdraw Up to $830M From Uniswap Today: Why It Matters for DeFi

Fortunately, there is actually a fix for this limitation that doesn’t require another migration: Even if the reward is hard-capped, it’s possible to send extra rewards to a dead-end address that no one has access to (thus, to decrease rewards from 100 SUSHI to 50 SUSHI, every block reward would send 50 of the 100 SUSHI minted to this dead-end address).

“Although clever, this option is far from elegant and falls outside the original design of the SushiSwap protocol,” the report reads.

More than inelegant, fixing the other limitations would require an overhaul of SushiSwap’s smart contracts entirely. The problem stems from a design choice wherein the MasterChef contract (which has control over the protocol) is not upgradeable and actually owns the SushiToken contract, so migrating to a new MasterChef contract (e.g., MasterChefV2) would also require deploying a new SushiToken contract (SushiTokenV2), according to IntoTheBlock developer Pablo Bianciotto.

“The limitation arises from the fact that MasterChef is not upgradeable,” he told CoinDesk. “To be upgradeable, the actual contract logic should be stored in another contract which is referenced by MasterChef. That would give you the flexibility to change minting/rewards distribution logic by replacing this secondary contract for a new one and updating MasterChef reference.

“In addition to that, SushiToken is owned by MasterChef, so creating a new MasterChef V2 contract with a new reward distribution logic and upgradeable features would require migrating the SushiToken contract, too.”

To implement vesting, for example, would require a MasterChefV2 and a SushiTokenV2 Bianciotto said.

Read more: Fishy Business: What Happened to $1.2B DeFi Protocol SushiSwap Over the Weekend

The code’s limitation would also interfere with implementing the fee payout proposal because there’s no way to transfer the vested tokens from the MasterChef contract into another contract for fee staking.

“This part is even harder to do,” Bianciotto said. “To earn fee payments you have to stake SUSHI into the SushiBar contract, but if your SUSHI rewarded for staking is vested and sitting in MasterChef, you wouldn’t be able to transfer it from MasterChef to SushiBar to earn fee payments.” He added that a SushiBarV2 would need to be spun up to accommodate this change, as well as a new SUSHI token minting contract (SushiMakerV2).

In effect, the MasterChef contract’s non-upgradeable nature creates a cascading effect wherein every smart contract under its control also requires an upgrade to make the proposed changes to the protocol. The only solution, then, involves migrating each smart contract to a completely new version.

Seeing as each contract would need to be redeployed, this migration process would be more labor intensive than the previous one. Fully migrating each smart contract would involved taking a snapshot of all user’s balances and airdropping new tokens after the new contracts are deployed, as well as migrating individual user data from all of SushiSwap’s liquidity pools; users would also have to unstake all SUSHI tokens in the SushiBar and in SUSHI/ETH staking pools prior to the snapshot.

Biaciotto said that while the snapshot and airdrop may seem simple for user addresses, “smart contracts that rely on SushiToken could stop working unless they are upgraded to use the new SushiTokenV2.”

He also noted there “are no time constraints” for these changes. He recommended a transparent and methodical migration that also “clears the way to seamlessly adding/changing protocol features in the future” to avoid having to implement further changes through another migration.

CoinDesk reached out to SushiSwap’s newly elected leadership (those members who hold one of nine multisignature keys to dictate protocol development) to ask if they are planning another migration.

“No migration in the short term,” responded 0xMaki, the lead developer of SushiSwap, who has been with the project from the start. 0xMaki continued that they wish to implement the vesting and fee-staking proposals but that “it will require more thinking” to pull off.

Bianciotto, though, insisted the “the only way forward [to implement these proposals] seems to be doing a migration.”

Read more: SushiSwap Migration Ushers in Era of ‘Protocol Politicians’

Another team member insisted that such a migration would be “significantly less complicated” and that there is “no concern whatsoever of any problems on the horizon.” Bianciotto reaffirmed that since “SUSHI is owned by MasterChef,” that “any kind of migration is non-trivial.”

To corroborate IntoTheBlock’s research, CoinDesk reached out to Zokyo Labs, a blockchain security and development company with a DeFi studio. A Zokyo representative confirmed IntoTheBlock’s findings.

Source

  • 14.09.20 17:15 Юрий Ник

    Шалом

  • 14.09.20 17:20 Захар Трофимов

    Отличные эфиры у вас

  • 14.09.20 17:21 Попков С.А.

    ​здарова бандиты

  • 14.09.20 17:30 Серега Бумер

    Привет из Москвы

  • 14.09.20 17:35 Анастасия

    Давайте биткоин по 20к

  • 14.09.20 17:40 Лысый Боб

    Подарите книгу)))

  • 14.09.20 17:41 Светлана П

    Hello

  • 14.09.20 17:48 Николаев

    Понеслась

  • 14.09.20 17:53 Щука А

    Слава эфиру

  • 14.09.20 17:58 Захар Трофимов

    Надо изучать Defi , интересно

  • 14.09.20 17:59 Павел Павлов

    15$. профита всем

  • 14.09.20 18:01 Попко Колян

    Давайте биткоин по 20к

  • 14.09.20 18:08 Попков С.А.

    Круто

  • 14.09.20 18:13 Алексей С.

    ​гуд

  • 14.09.20 18:18 Попков С.А.

    Как успехи?

  • 14.09.20 18:24 Попко Колян

    👍👍👍👍👍

  • 14.09.20 18:26 Егор Шетюк

    Понеслась

  • 14.09.20 18:26 Захар Трофимов

    15$. Тюмень рулит😁

  • 14.09.20 18:35 Константин В.В

    Биток и эфир держу до лучших времён)

  • 14.09.20 18:38 Попко Колян

    ​ДОБРОГО

  • 14.09.20 18:43 Даниил

    Рига смотрит

  • 14.09.20 18:46 Вадим Никулин

    Всегда смотрю Вас!

  • 14.09.20 18:55 Захар Трофимов

    Минск на проводе

  • 14.09.20 18:56 Щука А

    Спасибо за ваш труд

  • 14.09.20 19:01 Никита

    Хай

  • 14.09.20 19:06 Вячеслав Левков

    Отложил биток на пенсию

  • 14.09.20 19:13 Попков С.А.

    Отличные эфиры у вас

  • 14.09.20 19:20 Щука А

    Привет из Москвы

  • 14.09.20 19:25 Алексей С.

    Всем РЕСПЕКТ

  • 14.09.20 19:27 Николай

    Вперед криптаны

  • 14.09.20 19:34 КРИПТАН

    Слышно гуд

  • 14.09.20 19:36 Егор Шетюк

    Подарите книгу)))

  • 14.09.20 19:44 Светлана П

    миллионерам привет

  • 14.09.20 19:48 Вячеслав Левков

    Крипта скам=)

  • 14.09.20 19:53 Тоха

    Понеслась

  • 14.09.20 19:57 Носов А.А

    Рига смотрит

  • 14.09.20 20:04 Прокоп

    Донаты принемаете?

  • 14.09.20 20:06 Носов А.А

    спасибо

  • 14.09.20 20:12 Юрий Ник

    Тюмень рулит😁

  • 14.09.20 20:18 Даниил

    миллионерам привет

  • 14.09.20 20:18 Нина

    17$. Биток и эфир держу до лучших времён)

  • 14.09.20 20:24 Никита

    18$. Задонатю вам баблишка)

  • 14.09.20 20:25 Вячеслав Левков

    Поможем парням лайками, я уже свой поставил

  • 14.09.20 20:26 Павел Скоровойтов

    Слава эфиру

  • 14.09.20 20:35 Носов А.А

    Привет, пацаны. Слышно, видно хорошо

  • 14.09.20 20:36 Тоха

    Шалом

  • 14.09.20 20:44 Лена

    Биток и эфир держу до лучших времён)

  • 14.09.20 20:47 Нина

    ​ку-ку)

  • 14.09.20 20:53 Попков С.А.

    Все good. Ростем потихоньку и падаем, как всегда

  • 14.09.20 20:58 Санек

    Всем РЕСПЕКТ

  • 14.09.20 21:01 Славка Орехов

    Спасибо за ваш труд

  • 14.09.20 21:10 Ваня А,

    Привет, пацаны. Слышно, видно хорошо

  • 14.09.20 21:13 Нина

    ​ДОБРОГО

  • 14.09.20 21:20 Никита

    Привет парни!

  • 14.09.20 21:25 Егор Шетюк

    Hello

  • 14.09.20 21:27 Вячеслав Левков

    ​ку-ку)

  • 14.09.20 21:33 Попков С.А.

    Тамбов с вами братва

  • 14.09.20 21:37 Серега Бумер

    Слава эфиру

  • 14.09.20 21:42 Ваня А,

    Подарите книгу)))

  • 14.09.20 21:50 Павел Скоровойтов

    Поможем парням лайками, я уже свой поставил

  • 14.09.20 21:54 Захар Трофимов

    Привет парни!

  • 14.09.20 21:56 Санек

    Отложил биток на пенсию

  • 14.09.20 22:03 Носов А.А

    Привет, пацаны. Слышно, видно хорошо

  • 14.09.20 22:03 Попков С.А.

    14$. Надо изучать Defi , интересно

  • 14.09.20 22:09 Николай

    Поможем парням лайками, я уже свой поставил

  • 14.09.20 22:14 Вадим Никулин

    Я из РБ слежу за вами давно💰

  • 14.09.20 22:17 Николай

    Поможем парням лайками, я уже свой поставил

  • 14.09.20 22:24 Лена

    ​Я снова с вами)))

  • 14.09.20 22:28 Носов А.А

    Отложил биток на пенсию

  • 14.09.20 22:31 Серега Бумер

    Тюмень рулит😁

  • 14.09.20 22:40 Светлана П

    Сморгонь 👍

  • 14.09.20 22:43 Вадим Никулин

    Отложил биток на пенсию

  • 14.09.20 22:46 Николаев

    Круто

  • 14.09.20 22:53 Ваня А,

    Люблю ваши трансляции, вы крутые!

  • 14.09.20 22:58 Вячеслав Левков

    Биток вперед!!!

  • 14.09.20 23:05 Носов А.А

    ​Привет всем с Украины!

  • 14.09.20 23:06 Носов А.А

    12$. ​здарова бандиты

  • 14.09.20 23:09 Константин В.В

    Отложил биток на пенсию

  • 14.09.20 23:14 Прокоп

    Екатеринбург на связи

  • 14.09.20 23:18 Николаев

    Круто

  • 14.09.20 23:25 Тоха

    ​здарова бандиты

  • 14.09.20 23:27 Попков С.А.

    Отличные эфиры у вас

  • 14.09.20 23:33 Лена

    Поможем парням лайками, я уже свой поставил

  • 14.09.20 23:39 Николаев

    Доброе утречко

  • 14.09.20 23:45 Лена

    Как успехи?

  • 14.09.20 23:49 Павел Скоровойтов

    ​ку-ку)

  • 14.09.20 23:51 Ваня А,

    Привет, пацаны. Слышно, видно хорошо

  • 14.09.20 23:57 Попков С.А.

    Хомяки тут

  • 15.09.20 00:01 Лысый Боб

    Привет, пацаны. Слышно, видно хорошо

  • 15.09.20 00:07 Санек

    Слава эфиру

  • 15.09.20 00:12 Щука А

    Екатеринбург на связи

  • 15.09.20 00:14 Нина

    23$. Лайк

  • 15.09.20 00:16 Юрий Ник

    Вперед криптаны

  • 15.09.20 00:25 Лена

    Биток и эфир держу до лучших времён)

  • 15.09.20 00:26 Попков С.А.

    Как успехи?

  • 15.09.20 00:33 Попко Колян

    Я из РБ слежу за вами давно💰

  • 15.09.20 00:40 Даниил

    миллионерам привет

  • 15.09.20 00:50 Константин В.В

    11$. Круто

  • 17.09.20 15:31 Trident

    купил билет на семинар который изначально планировался в субботу.... в пятницу не смогу послушать, гле посмотреть запись?

  • 12:08 Серго1985

    Как бабло зарабатывается??

To join the Chat, you need a free pro-blockchain.com account. Enter Registration