Sushi
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Help
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
Publish Note

Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

Your note will be visible on your profile and discoverable by anyone.
Your note is now live.
This note is visible on your profile and discoverable online.
Everyone on the web can find and read all notes of this public team.
See published notes
Unpublish note
Please check the box to agree to the Community Guidelines.
View profile
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# Postmortem (26/04/2022) Postmortem: 26th April, 2022 Participant: Sushi Core Team (Sarang, Matthew, Ramin, Jiro), Synthetix (JJ, Ethernaut) On April 26, 2022 at 11:33 PM UTC Sushi was alerted of a bug at handling of SNX token inside Bentobox. **TLDR: ALL USER FUNDS ARE SAFE. DON'T DEPOSIT SNX OR ANY SYNTHETIX BASED ASSETS ON BENTOBOX** Bentobox Contract: https://etherscan.io/address/0xf5bce5077908a1b7370b9ae04adc565ebd643966 The SNX token had two contracts, *Target* and *Proxy*. These contracts mirrored the balances of SNX within each other, as they share the same storage. Bentobox allows users to deposit via sending tokens directly to the contract (skimming). SNX Target Token Contract: https://etherscan.io/address/0xE95A536cF5C7384FF1ef54819Dc54E03d0FF1979 SNX Proxy Token Contract: https://etherscan.io/address/0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f As per the SNX recommendation, Bentobox and Kashi were using the Proxy token contract on the Sushiswap UI. However, the bug arises when the user deposits using the Target token contract, which bentobox treats as a different token as expected. When the Target token contract SNX is withdrawn, it also updates the Proxy token contract balance, and the user receives both Target and Proxy tokens, instead of just Target Token Contract SNX. However, as this is not registered inside the Bentobox, it would ultimately allow for draining the entire Proxy Contract SNX tokens. I.e. Anyone could deposit 0 SNX Target tokens. As Bentobox has the unskimmed balance of SNX target tokens, you can deposit the entire amount of Proxy SNX tokens, without depositing any actual tokens. Were the user to withdraw, it would withdraw both SNX Target and Proxy tokens, leaving the Bentobox balance as 0 in both the contracts, hence draining the entire vault. This issue was present with every Synthetix based asset. So, any SNX tokens for Synthetix based assets on Bentobox would be at risk. On further investigation we found that only SNX and sUSD were deposited on Bentobox. Most of these tokens were being used at Kashi for Lending and Borrowing. Using the above exploit anyone could have drained the respective Kashi Pairs, causing loss of funds to the lenders and borrowers. **Bentobox is safe for the Standard ERC20 Tokens. However, it can act not as expected in case of tokens that use older proxy patterns, such as SNX. Other proxy patterns, such as eip-1167 (utilized by MISO) are unaffected.** **As Kashi is an isolate lending market, only these markets were affected and other markets are completely safe.** In order to rescue the funds, the Sushi Team created a Whitehat Rescue Contract, which rescued the SNX and Synthetix based tokens inside Bentobox and Kashi. While executing the whitehat, one of the transactions got relayed to the public mem pool, and it was frontran by a MEV bot. We requested the MEV bot to return the funds, their response was very quick and they returned the tokens to Sushiswap Operations Multisig. We appreciate and thank them for returning the funds. All the funds were rescued and were sent back to the affected users. SNX Distribution Transaction: https://etherscan.io/tx/0xf6825ce58f2bbee0de1d1df0e7a5cb94b3d0b7b02bc0c69e81dfcd94c6a8bc9d USDC Distribution Transaction: https://etherscan.io/tx/0x1697f7bf07e06f8e716e9d7b18bc48933a3359196642dcf55e2f037a1eff5b2d sUSD Distribution Transaction: https://etherscan.io/tx/0x3635ad5a9f2b4ec6bb81b3e362185a87fd5adf05110da1b8f0ce07090731c143 **NOTE: DO NOT DEPOSIT ANY REBASING TOKENS, SNX OR ANY SYNTHETIX BASED ASSETS ON BENTOBOX. ALL REBASING TOKENS, SNX or SYNTHETIX BASED ASSETS DEPOSITED WILL BE LOST.** We are taking the following steps to mitigate this issue. Firstly, by not allowing the SNX or Synthetix based tokens to be deposited via the Sushiswap UI on Bentobox. Secondly, all the Kashi Pairs with SNX or Synthetix based tokens are also disabled from the Sushiswap UI. Total amount of SNX rescued: 7,150 SNX Total amount of USDC rescued: 14369 USDC Total amount of sUSD rescued: 1083 sUSD All other Kashi Pairs and Sushiswap products are unaffected from this incident. We'd also like to thank Immunefi, Synthetix Team and Vahid from Flipside. Thank You, Sushiswap Team

Import from clipboard

Paste your markdown or webpage here...

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template has been removed or transferred.
Upgrade
All
  • All
  • Team
No template.

Create a template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

Slide Example

API Docs

Edit in VSCode

Install browser extension

Contacts

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Get Full History Access

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

Note content is identical to the latest version.
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully