Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Before we use 0x contract, create our own Smart Contract with some fees eliminated #6

Closed
JonathonDunford opened this issue Jan 23, 2018 · 6 comments

Comments

@JonathonDunford
Copy link

JonathonDunford commented Jan 23, 2018

I believe that the end goal is to use 0x as our trading contract. However, I believe that, in the interim, we can make some slight changes to ED's original contract that could make it much cheaper. This would be a temporary solution, but could be a really quick fix to about half of the fees currently on the system and would help us start having our own order book.

I copied this from Reddit, so I haven't verified its' contents:

"I suggest that you rewrite the contract to eliminate the fees. Eliminating the fees will also lower the gas cost by half. Looking at the source code, make these changes:

proposed changes to https://etherscan.io/address/0x8d12a197cb00d4747a1fe03395095ce2a5cc6819#code

eliminate lines 131 to line 149 because all accounts are equal and none should pay a fee

eliminate lines 155, 156, 157
all lines with the word 'fee'

line 168 to 175...i think this can be eliminated, but I am not sure what the function of admin is

not sure what the purpose of line 177 to 179 is

I think lines 181 to 212 can be eliminated, but I am not sure

line 252, I don't understand how signatures work (that is, the r and the s)

line 265 to 279, I think much of this can be eliminated, but not sure. Also, I am not entirely clear on the distinction between private and public functions

line 281 to 287, I am not sure on this. I don't know why there is a 'testTrade' function. Perhaps this tests to see if a trade is allowable before executing it. This would prevent malformed orders"

@zaptrem
Copy link

zaptrem commented Jan 23, 2018

I think 0x, with its easy-to-use JS api and support from other exchanges, is the better and easier to implement solution here. Even if we modify this contract (requiring extensive Solidity work and security auditing) we will still need to create volume through this new system for it to be useful (the same problem applies to all exchanges). However, FD's solution to this is to create a second layer of trades on top of ED's order book and volume, and to make the transition back and forth between the two as seamless as possible.

@JonathonDunford
Copy link
Author

I'm not sure how writing a 0x contract from scratch would be easier than removing some fee lines from the original contract?

@freeatnet
Copy link
Contributor

I would not want to abandon fees. I feel that fees are a great way to validate the project's value proposition, as well as a viable way to fund its development and operation.

However, if we are looking to reduce transaction costs, I would love to see if we can eliminate the need to deposit tokens on the contract.

@JonathonDunford
Copy link
Author

Well, at the very least, we should be getting the fees, not ED cronies.

@zaptrem
Copy link

zaptrem commented Jan 23, 2018

@JonathonDunford Importantly, 0x has already done all of the risky Solidity work for us, all we need to do is implement their JavaScript API.

@JonathonDunford
Copy link
Author

JonathonDunford commented Mar 11, 2018

We have decided on moving forward with new smart contract creation as well as keeping fees in order to facilitate user growth, community support, development, and updates.

The smart contract repo is here: https://github.com/forkdelta/smart_contract

I will close this as the original intent of my proposal (developing a new smart contract) is being fulfilled.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants