Bitcoin Forum
July 27, 2024, 10:39:39 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Enabling a liquidity layer of ERC20 Token Baskets using the Basket protocol  (Read 97 times)
wandino (OP)
Newbie
*
Offline Offline

Activity: 112
Merit: 0


View Profile
April 09, 2018, 06:47:01 AM
 #1

We have built a protocol that enables users to create and trade ERC20 Token Baskets entirely through smart contracts. A Token basket is a group of ERC20 Tokens bundled together, for example this could be 10GNT+ 10GNO+ 10WAND. This basket is created by a user who owns the above Tokens, and wants to manage the basket on a smart contract. Creation of a Basket means that the user now holds the ownership of the smart contract that contains these Tokens.


Architecture to create and trade in ERC20 Token Baskets.
As a second step, the user can now post this Basket for trade by quoting an ask price for the Basket. This ask price is quoted on the smart contract; for example if the user quotes 0.2ETH for this Basket, then any address from any wallet that sends 0.2ETH to this Basket gains ownership of the Token basket. This enables a truly decentralized way of creating and trading in ERC20 Token baskets. The order book is now only a list of smart contract addresses, Tokens, ask prices. Each order is a smart contract and is owned by the user who places the order. This “order book” can be hosted anywhere, and orders can be executed from any wallet.

These Token baskets can be integrated into any exchange or wallet that allows signing with a users’ private key (Metamask, Mist, MEW, Ledger). These Token basket orders can be executed by any wallet or exchange. The first few transactions with the WandX Basket protocol were done here:

Exchange used to create the Basket contract: https://ropsten.etherscan.io/address/0x384d7b36c7124a0a664a5a70ca60cf851f775aa8

Basket contract: https://ropsten.etherscan.io/address/0x5c10f4982b8883943c354e2f981205f32d54f0a2

Flow: Owner/Seller publishes the Basket -> Deposits the underlying Tokens -> Buyer can buy the Basket using Ether -> Buyer gets the Basketand seller gets the Ether -> Buyer Liquidates the Basket if he/she wishes -> Buyer gets the underlying Tokens and the Basket is dead forever.

Basket summary:

Assets — 0x7354b4cea1cb8188a290b857132cd1214bd1cbbc, 0xc8f0c992660666b64596c452fc0e7e6b07a448c2

Volumes — 3 tokens each

Asking price — 2 ether

Seller — 0xf3E9b2e4bE5010fa7F4c1356417e3D43Be488df7

Buyer — 0xa371d9329C2b7e37104b006525c66c38541f82f8

Transactions:

1. Creating the Basket contract —

https://ropsten.etherscan.io/tx/0x1415278477f4ed032ab1436eede5921cf0fd0f354b3b87677d4c46b81a7ab5a1

It creates the dummy exchange. The exchange in turn creates a Basket contract.

2. Seller publishes the Basket and enables it for trade —

https://ropsten.etherscan.io/tx/0xad23f8e7985840643849d26c1f9652ccd50021236d53728b0f3c91d2c3bbd17c

3. Seller deposits the Tokens —

https://ropsten.etherscan.io/tx/0xbe5d757457f58d540a55254c21137f159b3387ad9d272537e1f77f64748c4675

https://ropsten.etherscan.io/tx/0xc07f02ce06078f6280825ee551cbda3f5c457f4a046bb630894c65f85ab2c45c

4. Buyer buys the Basket by transferring Ether to the contract —

https://ropsten.etherscan.io/tx/0x76943419a9c11b6b1b51599493872c47448dc835aee3df41c92b99a57eb7f2fd

after this transaction, buyer becomes the owner and he can withdraw or liquidate the underlying Tokens.

5. New Owner (Buyer), liquidating the Basket —

https://ropsten.etherscan.io/tx/0xb3cf3604b0006980898f0a4775a8e64d3b83306830efed5c9224b6878c402f87


Read the full update here - https://blog.wandx.co/development-update-enabling-a-liquidity-layer-of-erc20-token-baskets-using-the-wandx-basket-ae19a2f9fab5
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!