GCPH can't create order

GoldenHand / GCPH cant make a buy/sell order. contract address of your exchanger fail to transfer

1 Like

Hello @GoldenHand2019 thanks for the report. What Dapp browser are you using? And what do you mean

contract address of your exchanger fail to transfer

Your transactions fail? Is that when you try to sell or buy? Because if we look at the GCPH order book there is orders that have been created:

https://www.saturn.network/exchange/ETH/order-book/0x1ec52a7a6048c1ca8b8afd8ef97051acfe755e35

Thanks!

1 Like

here the fail. check this what the cause of problem.
https://etherscan.io/tx/0x2bec5170868ae693c4356be48651d2e54591a20092ca36378fd9fbb165082aaa

1 Like

What kind of order are you trying to create? Did you submit an ERC20 Approve transaction.

Could you please try again and document your steps?

Thanks

1 Like

i was trying to put sell. but i got error after approve then transaction fail. because of the contract address on the exchanger

1 Like

Could you try again and document your steps? Also make sure you set the correct gas price when you submit an erc20 approve, maybe that is why your transaction failed: https://ethgasstation.info/

1 Like

your contract address not accepting my tokens.
check this still fail. i tried to send GCPH for sell order but failed again
https://etherscan.io/tx/0xf9b36d22cbf6105f8268dc947f90f87af5c901c3107bccebac45b41dd3e39ca0

1 Like

Can you provide a screenshot of your order details (the form where you fill in the order amount and token price) before you submit the transaction please?

1 Like

https://drive.google.com/file/d/1xV1KbNRYQX2ZQyXhfVPZLjrlPcqQaMM1/view?usp=drivesdk
https://drive.google.com/file/d/1xahpN8yKfmp5jAB4-8z6BiJiBE2p_98P/view?usp=drivesdk

1 Like

@GoldenHand2019 please just upload screenshot to forum or use https://imgur.com/ your google drive is set to private. If you prefer you can private message me the screenshot.


That is not what i asked for, I mean when you click Create Order what are you filling into the order form?

Step 1

Step 2

Step 3

I want to know what you are setting in Amount of Tokens and Price Per Token field, as you say it fails.


Okay and this fails? I think we will need a small amount of tokens to check and investigate further, I have sent you a direct message. Thanks

Investigation summary

You have an issue with your token smart contract that will most likely cause it to break for plenty of other DEXs. Since your token is only 10 days old I suggest you start over, make a new token and a new distribution under the same name. Maybe follow this guide (this could be outdated, but if it does work it makes you a ERC223 token that is guaranteed to work with Saturn DEX).

Details

The issue is on line 65 of your smart contract.

function transferFrom(address _from, address _to, uint256 _value) public {
  require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value && _value > 0);
  balances[_to] += _value;
  balances[_from] -= _value;
  allowed[_from][msg.sender] -= _value;
  emit Transfer(_from, _to, _value);
}

Compare to reference implementaiton, e.g. LINK token, line 122

function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
  var _allowance = allowed[_from][msg.sender];

  // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
  // require (_value <= _allowance);

  balances[_from] = balances[_from].sub(_value);
  balances[_to] = balances[_to].add(_value);
  allowed[_from][msg.sender] = _allowance.sub(_value);
  Transfer(_from, _to, _value);
  return true;
}

According to ERC20 spec, transferFrom method must return true upon success. Your smart contract doesn’t do it, that’s why creating sell order breaks.

If you want to be 100% sure your token works before you make a new one you can purchase a smart contract audit.

Happy Trading!

1 Like

good here old saturn.network i got error on new saturn.network

1 Like

Feel free to use old. for the time being, as that runs off of an old smart contract that doesn’t support upcoming atomic arbitrage. I do warn you that we will not keep old UI running forever!

I highly recommend you fix the bug and make your token either ERC223 or ERC20 100% compatible, unlike freestyle that you have right now. It’s much easier to make such changes when you token is 10 days old, rather than 10 months old.

2 Likes

i tried to make transaction in bamboorelay no failed. so please my issue.

As Neuron has explained to you, we are following the standardized way to check for ERC20 compatibility. We are building Saturn Network to interact with multiple DEXs, if we don’t follow the standard it will never work.

If bamboorelay are not checking for ERC20 compatibility correctly then great you can trade GCPH there. If you want to trade on Saturn then, we recommend you fix your token contract. There is over 400 tokens listed on our DEX and they are trading fine, so nothing is broken.

If you used a tool to generate your token or paid a developer, please feel free to share it, I will happily forward this conversation onwards and explain they have not created a vaild ERC20 token for you.

theres a way to chance my contract address?