All Collections
Buying and Selling a Set
How does buying and selling a Set on TokenSets work under the hood?
How does buying and selling a Set on TokenSets work under the hood?

Learn about issuing and redeeming

Richard avatar
Written by Richard
Updated over a week ago

What goes on under the hood when I buy and sell?

When you acquire or dispose of a Set, you are minting (issuing) and burning (redeeming) the supply of that Set by interacting directly with the smart contract. Sets are always 100% collateralized by their underlying tokens and are issuable and redeemable anytime as long as a rebalance is not taking place for that Set.

Under the hood, buying and selling are simply issuing and redeeming a Set with its underlying components. Issuing a Set requires 100% of its required collateral to be supplied to the protocol in return for a Set token, and redeeming works by taking Set tokens and unwrapping them for their component tokens. For example, directly issuing a BTC ETH Equal Weight Set requires you to deposit WBTC and WETH. 

TokenSets abstracts away the complexity of you having to acquire all the components of a Set through native integrations with Kyber. In the BTC ETH Equal Weight example, you only need to provide ETH to the smart contract which will automatically exchange half of your ETH to WBTC and wrap the other half of your ETH to WETH and mint the Set for you. 

In the order details screenshot below, the user supplies 1 ETH in which a portion is exchanged for 0.014 WBTC and other portion is wrapped into 0.438 WETH. These components are the exact amounts needed and is deposited to mint 0.758 BTCETH5050

Did this answer your question?