Consensys / Token-Factory

Basic Token Factory dapp.
478 stars 308 forks source link

Add basic token buy/sell escrow orders #12

Open simondlr opened 8 years ago

simondlr commented 8 years ago

EtherEx has a more complicated order matching system. For starters, one can build simple buy/order systems for tokens buy making an buy/sell escrow contract.

It's quite simple.

1) Create a contract with order filling functionality and setting a price someone else will pay per unit. 2) Approve a certain amount of tokens one wants to sell to this contract. 3) Someone else can then come in, send ether to it and then approved tokens are transferred to person buying the tokens.

Piper Merriam has built a simple version of this here: https://gist.github.com/pipermerriam/68ab56ad47358193a4d4ecf367f2e683

A variant of this was built by avsa. See here: https://ethereum.org/token#automatic-selling-and-buying

simondlr commented 8 years ago

Maker has already built a simple OTC. https://github.com/makerdao/maker-otc. http://makerdao.github.io/maker-otc/