I can't withdraw SIFT token from etherdelta to myetherwallet. I have upped the gas price and made sure I have anough ether in etherdelta and myetherwallet but it still says I'm out of gas. I am losing ether each time I try. https://etherscan.io/tx/0x9b076789f1c0db1c18175b0869f9159ad5f2ade016aad855dcb18cf12de7e6fa


The SIFT Token contract has a bug: if caller's address has zero balance it tries to add it to the list of token holders (removed lines for clarity)

/* Transfer the balance from owner's account to another account */
function transfer(address _to, uint256 _amount) fundSendablePhase onlyPayloadSize(2) returns (bool) {
    /* Do a check to see if they are new, if so we'll want to add it to our array */
    bool isRecipientNew = balances[_to] < 1;
    /* Consolidate arrays if they are new or if sender now has empty balance */
    if (isRecipientNew)

This is bad programming it iterates the current list of token holders to find if the address is already there. If there's a lots of holders it will consume a lot of gas it might cause out of gas if you have too many. It will cause a denial of service attack to the contract.

/* If the specified address is not in our owner list, add them - this can be called by descendents to ensure the database is kept up to date. */
function tokenOwnerAdd(address _addr) internal {
    /* First check if they already exist */
    uint256 tokenHolderCount = allTokenHolders.length;
    for (uint256 i = 0; i < tokenHolderCount; i++)
        if (allTokenHolders[i] == _addr)
            /* Already found so we can abort now */

    /* They don't seem to exist, so let's add them */
    allTokenHolders[allTokenHolders.length - 1] = _addr;

It is not yet a full denial of service because Etherdelta forces a maximum gas of 250k, but it should be possible to send the transaction outside of the Etherdelta interface setting a large gas amount.

But anyways you probably should not trust any important value into that contract until the developers migrate to a new contract.


I wanted to add a formal response from SIFT so this can be found for anybody else seeking help in this issue.

The issue with the contract was identified early on. As there was the potential for confusion among token holders we held a vote for SIFT-holders to determine the course of action they wanted. The community voted overwhelmingly in favour of keeping the current contract. You can view the full details here: https://smartift.com/voting-proposals/SVP001.pdf

In essence when you are transferring SIFT to a new wallet you need to set a higher gas limit – not a higher price. With this you can still withdraw from EtherDelta at a cost of a couple of cents.

If you require further assistance there is generally someone on-hand to help in our Telegram chat room https://t.me/SmartIFT

The following steps should allow you to withdraw from EtherDelta.

These issues exist due to a smart contract defect that SIFT-holders voted not to resolve immediately once the ICO closed. This means that if you do not already hold SIFT the first withdrawal can be difficult. Your first withdrawal to a new address from EtherDelta requires a gas limit of 3,000,000. You can set the gas price to whatever the current "Safe Low" is showing at EthGasStation.info (1Gwei at point of initially writing, but can be higher in congested times). At 1Gwei this will cost 0.003 ETH. At 20Gwei this will cost 0.06 ETH. We recommending using the lowest possible value. Many times this can be as low as 0.1Gwei (0.0003 ETH for the entire transaction)

EtherDelta does not support setting the gas limit directly. The best option for this is to use MyEtherWallet.com to directly access the EtherDelta smart contract to withdraw your SIFT. You can use MyEtherWallet if you have a Trezor, private key, Ledger or recovery seed. You must use the same wallet on MyEtherWallet.com that holds SIFT on EtherDelta – for example if you authenticate at EtherDelta using a private key, enter that key in step 9 below.

Once you have your wallet to deposit SIFT in to follow these instructions. Please note your wallet will need enough ETH to cover the gas cost.

  1. Go to MyEtherWallet.com
  2. Navigate to the Contracts tab
  3. Enter the EtherDelta contract address of 0x8d12A197cB00D4747a1fe03395095ce2A5CC6819
  4. Press “Access”
  5. When “Read/Write Contract” section appears select “WithdrawToken” from the dropdown labelled “Select a function”
  6. In “Token Address” enter 0x8a187d5285d316bcbc9adafc08b51d70a0d8e000 (the address identifying SIFT itself)
  7. In “Amount” enter the balance of SIFT you want to withdraw from Etherdelta
  8. Select how to unlock your wallet (i.e. private key, Ledger, Trezor, etc.)
  9. Complete any actions in the right hand side that appear to unlock your wallet (clicking Connect to TREZOR, Connect to Ledger Wallet, Connect to MetaMask, selecting a wallet file, entering your private key, entering a mnemonic phrase, etc.)
  10. At the top right of the screen there are three drop downs – one o fhtme says “Gas Price: XX Gwei” (where XX is the current number). We recommend changing this to 1 to reduce the transaction cost.
  11. Click “Write”
  12. A popup will appear. When prompted enter “3000000” for the gas limit and leave “Amount to Send” as 0. If the gas limit pre-populates with another more precise number (be it more or less than 3000000) then leave that instead.
  13. Click “Generate Transaction” and the transaction should be generated. You may have extras confirmation steps here with hardware wallets, etc, but if you’re happy with everything confirm any more popups that appear on your hardware wallet / on-screen.
  14. A transaction will be generated – follow the link to EtherScan.io to observe it. Once it’s finished (may take a few minutes or even a couple of hours with 1GWei price) you will be credited SIFT in your wallet.
  15. You can then use MyEtherWallet.com to send the SIFT from your ED address to your normal wallet – or just keep it in this wallet. If you want to send it all to another wallet you’ll need to send it with 3,500,000 gas limit.

Once you’ve made your first SIFT withdrawal from Etherdelta you can withdraw again to the same wallet relatively easily to withdraw further SIFT to. The gas limit drops to 60k withdrawing some SIFT from ED to a wallet that already holds it and therefore it becomes possible to just use the EtherDelta interface for future withrawals.

There is a community-written guide that may help some users further with SIFT transfers: http://www.cryptospikes.com/buying-sift-on-etherdelta-with-ledger.pdf

Please note that if MEW suggests a higher gas limit for the call then use the higher gas limit suggested. This exact value is likely to change as the number of token-holders fluctuates. If there is a strong view among SIFT-holders in the future to change this another vote can be held for redeployment.

  • Does contracts have been audited? Are audits publicly accessible? – Ismael Nov 28 '17 at 20:12
  • Following this guide, MEW generates a transaction hash, the transaction is never picked up by the network though... For example: etherscan.io/tx/… – der_michael Dec 9 '17 at 19:29
  • @der_michael since this post was written a couple of weeks ago "Crypto Kitties" has hit Ethereum and massively clogged the network. If you go to ethgasstation.info the top header has a "safe low" value which is currently 16. You will need to use that instead of the 1gwei recommended or the transaction won't be picked up. This does increase the price. Ethereum congestion is decreasing so if not urgent you may just want to wait a few days. – guytp Dec 10 '17 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.