-
Notifications
You must be signed in to change notification settings - Fork 50
History
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.
/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.
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() |
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).
The TokenTraderFactory.sol and TokenSellerFactory.sol contracts have been update with the following changes:
- Added
indexed
to theaddress
parameters of theTradeListing
andOwnerWithdrewERC20Token
events for both contracts as suggested by JonnyLatte. - Renamed the
tokens
parameter oftakerSellAsset(...)
toetherValueOfTokensToSell
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:
- TestERC20Token.sol to 0x8d569cc1632da880b5fce4766c499e68a50eff0f.
- TokenTraderFactory.sol to 0x8960e7fa06538bd96eb3138d4e043a911dcb07d1.
- TokenSellerFactory.sol to 0xb11638f30653533fe91658a59c06c6ad5d0be593.
Deployed the following to Mainnet:
- TokenTraderFactory.sol to 0x21139f0a1afc136989de119d75534e1eeae4f9ef.
- TokenSellerFactory.sol to 0x39239803c79940d7c2dca4259dfacbe763835d6b.
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
andTokenSellerFactory
.
Deployed the following to Testnet:
- TestERC20Token.sol to 0x8d569cc1632da880b5fce4766c499e68a50eff0f.
- TokenTraderFactory.sol to 0xc6f2afa746447f62f90042e95e49ce31dc7dcea1.
- TokenSellerFactory.sol to 0xad2b88af8f0bba78c47de71b994324b11227827b.
Deployed the following to Mainnet:
- TokenTraderFactory.sol to 0x03563574b3839e2cdd6281d8741497ba82fd6739.
- TokenSellerFactory.sol to 0x49ecdc2ca8052a73f2d785b635db0ea711da9423.
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
andTokenSellerFactory
Deployed the following to Mainnet:
- TokenTraderFactory.sol to 0xa9fba193140acb3dbae1da75d4a466cdd314d036
- TokenSellerFactory.sol to 0x8a628e600c9e170a73cc140b5f5770bd05f102e3
Deployed the following to Testnet:
-
TestERC20Token.sol to 0x583cbbb8a8443b38abcc0c956bece47340ea1367:
- Name: BokkyPooBah Test Token
- Symbol: BOKKY
- Decimals: 18
- Send Testnet ETHs to the contract address and receive the equivalent numbers of Testnet BOKKIES
- TokenTraderFactory.sol to 0x17ffa2733ed84daacb340016c9ae2feeff196308
- TokenSellerFactory.sol to 0xa7c2a6647649f4b54d1d1e5e16aa1015eaff13f7
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
andTokenSellerFactory
Deployed the following to Mainnet:
- TokenTraderFactory.sol v0.9 to 0x21ca8ee818f008692d3a6abd1a1beda5aaecf0e3
- TokenSellerFactory.sol v1.0 to 0xb1eb96f752c624dc784d80961a1accfaf348c923
Deployed the following to Testnet:
- TokenTraderFactory.sol v0.9 to 0xbc5424cbef24d71b955c6a714bf8720e762d09ca
- TokenSellerFactory.sol v1.0 to 0x2b8ce19465f35419e757e4458defc1c3fd0ffb40
The TokenTraderFactory.sol v1.0 have been updated with the following changes:
- Change in
takerSellAsset(...)
parameter frometherValueOfTokensToSell
toamountOfTokensToSell
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 anallowance(...)
function. - Here are diff1 and diff2 in
TokenTraderFactory
Deployed the following to Mainnet:
Deployed the following to Testnet:
The contracts supported by https://cryptoderivatives.market/ are:
-
TokenTraderFactory.sol v0.9 at 0x21ca8ee818f008692d3a6abd1a1beda5aaecf0e3
- Makers, please move these contracts to TokenTraderFactory v1.0 below when convenient.
-
GNTTokenTraderFactory.sol v0.9 at 0xc4af56cd5254aef959d4bce2f75874007808b701
- Makers, please move these contracts to TokenSellerFactory v1.0 below when convenient
- TokenTraderFactory.sol v1.0 at 0xa9f801f160fe6a866dd3404599350abbcaa95274
- TokenSellerFactory.sol v1.0 at 0xb1eb96f752c624dc784d80961a1accfaf348c923
Most of this wiki is currently work in progress. GNTTokenTrader & Factory, GNT ‐ Golem Network Token and Bug Bounty are complete.
- 1ST ‐ First Blood
- AMIS ‐ AMIS
- ARC ‐ Arcade City
- BARF ‐ BARF (discontinued)
- BERP ‐ BokkyPooBah´s Ether Refundable Prize
- DAO ‐ The DAO
- DGD ‐ Digix DAO
- DGDb ‐ Digix DAO Badge
- DICE ‐ Etheroll
- EDG ‐ Edgeless
- EMV ‐ Ethereum Movie Venture
- ETB ‐ Ethbits
- GNO ‐ Gnosis Token
- GNT ‐ Golem Network Token
- GNTW ‐ Wrapped Golem Network Token
- GUP ‐ Matchpool Guppy
- HKG ‐ Hacker Gold
- HMQ ‐ Humaniq
- ICN ‐ Iconomi
- INC ‐ Incent
- LOVE - I Love You
- LUN ‐ Lunyr-Token
- MKR ‐ Maker DAO
- MLN ‐ Melon Token
- PLU ‐ Pluton
- RBX ‐ Ripto Bux
- REP ‐ Augur
- RLC ‐ iEx.ec Network Token
- SNGLS ‐ SingularDTV
- SWT ‐ Swarm City
- TAAS ‐ Token-as-a-Service
- TIME ‐ Chronobank
- TKN ‐ TokenCard
- TRST ‐ WeTrust
- UNI - Unicorn 🦄
- VSL - vSlice
- WAV ‐ Waves Token
- WBC ‐ Waves Bitcoin Token
- WCT ‐ Waves Community Token
- WINGS ‐ WINGS
- XAUR ‐ Xaurum