Skip to content

History

BokkyPooBah edited this page Feb 8, 2017 · 18 revisions

Oct 07 2016

The original REP TokenTraderFactory was deployed to 0x3398080b81a1cff1429af347ce2b17fc28de3937 by /u/JonnyLatte. Here is a copy of the source code.

Note there is a bug in this contract that could lead to a loss in ethers and it should not be used.



Nov 12 2016

/u/Cintix deployed a SellOnly TokenTraderFactory to 0xc4af56cd5254aef959d4bce2f75874007808b701 for the Golem Network Token (GNT). The difference in this contract from the original REP TokenTraderFactory is that the sell(...) method has been removed as the partial ERC20 GNT does not support the selling of these tokens. Here is a copy of the source code (which I have renamed as TokenSellerFactory.sol).

The bug from the original REP TokenTraderFactory does not exist in this contract. There are however some logic errors in this contract that prevent the UpdateEvent() from being logged correctly.



Dec 19 2016

I have deployed a new TokenTraderFactory and TokenSellerFactory to Mainnet at the addresses 0x5a4fc44325aa235b81ad60c60444f515fd418436 and 0x74c2a14172cf17e8e9afcb32bb1517c4d8f3bb43 respectively. The source code for this version is at TokenTraderFactory.sol and TokenSellerFactory.sol respectively.

The methods, variables and events have been renamed to clarify the uses by the Market Maker and the Market Taker. The bug from the original REP TokenTraderFactory (see Oct 07 2016 above) has been fixed. The events are now logged correctly.

This version should not be used as it has been superseded with a newer version (see below).

Here are the methods renamed in the TokenTrader and TokenSeller contracts:

TokenTrader TokenSeller
New Old New Old
activate() activate() activate() activate()
makerDepositEther() deposit() n/a n/a
makerWithdrawAsset() withdrawAsset() makerWithdrawAsset() withdrawAsset()
makerWithdrawERC20Token() withdrawToken() makerWithdrawERC20Token() withdrawToken()
makerWithdrawEther() withdraw() n/a n/a
takerBuyTokens() buy() takerBuyTokens() buy()
takerSellTokens() sell() n/a n/a
default () calls buy() default () calls buy() default () calls buy() default () calls buy()

And here are the methods renamed in the TokenTraderFactory and TokenSellerFactory contracts:

TokenTraderFactory TokenSellerFactory
New Old New Old
verify() verify() verify() verify()
createTradeContract() createTradeContract() createTradeContract() createSaleContract()


Dec 22 2016

I have deployed a test ERC20 token and TokenTraderFactory and TokenSellerFactory to Testnet at 0x04afa8d058beffce172843827ac0106408b7c3bf, 0x0495634a8f22a6f321ab39ef05060a075542287e and 0x0afacbd203b89acbae9271a71a06530bea68646c respectively.

The TokenTraderFactory and TokenSellerFactory contracts are the same as the ones deployed to Mainnet on Dec 19 2016 (see above).

This version should not be used as it has been superseded with a newer version (see below).



Jan 10 2016

The TokenTraderFactory.sol and TokenSellerFactory.sol contracts have been update with the following changes:

  • Added indexed to the address parameters of the TradeListing and OwnerWithdrewERC20Token events for both contracts as suggested by JonnyLatte.
  • Renamed the tokens parameter of takerSellAsset(...) to etherValueOfTokensToSell as suggested by JonnyLatte, as this parameter represents the value of the asset tokens in ethers rather than the number of tokens.
  • Changed a few > to >= and < to <= for the conditional checks.
  • Here are the diffs in TokenTraderFactory and TokenSellerFactory.

Deployed the following to Testnet:

Deployed the following to Mainnet:



Jan 15 2016

The TokenTraderFactory.sol and TokenSellerFactory.sol contracts have been updated with the following changes:

  • Added check for null asset address for createTradeContract(...).
  • Added comments to note variables being used in divisions have been validated as being non-zero.
  • Here are the diffs in TokenTraderFactory and TokenSellerFactory.

Deployed the following to Testnet:

Deployed the following to Mainnet:



Jan 25 2016

The TokenTraderFactory.sol and TokenSellerFactory.sol contracts have been updated with the following changes:

  • Methods for a safer transfer of tokens (makerTransferAsset(...)) and ethers (makerTransferEther(...)) from one TokenTrader contract to another
  • Method for a safer transfer of tokens (makerTransferAsset(...)) from one TokenSeller contract to another
  • Here are the diffs in TokenTraderFactory and TokenSellerFactory

Deployed the following to Mainnet:

Deployed the following to Testnet:



Feb 05 2016

The TokenTraderFactory.sol v0.9 and TokenSellerFactory.sol v1.0 contracts have been updated with the following changes:

  • Bug fix in the change calculation for the Unicorn token with natural number 1
  • Here are the diffs in TokenTraderFactory and TokenSellerFactory

Deployed the following to Mainnet:

Deployed the following to Testnet:



Feb 08 2016

The TokenTraderFactory.sol v1.0 have been updated with the following changes:

  • Change in takerSellAsset(...) parameter from etherValueOfTokensToSell to amountOfTokensToSell to better describe the parameter, as suggested by JonnyLatte
  • Additional check in createTradeContract(...) to prevent GNTs from being used with this contract. The asset token will need to have an allowance(...) function.
  • Here are diff1 and diff2 in TokenTraderFactory

Deployed the following to Mainnet:

Deployed the following to Testnet:



Supported Contracts

The contracts supported by https://cryptoderivatives.market/ are:

Clone this wiki locally