Code Monkey home page Code Monkey logo

chainswap-nft's Introduction

Antimatter – Does it matter?

I do not need to tell you what defi means. For developers, it means a series of codes that turns traditional finance into automation. For investors, it means financial freedom and free money to grab. For outsiders, it means WTF. For me, it means simplicity and useability.

Let’s start with a question: Do you prefer complexity or simplicity?

To be honest, many people in this space prefer complexity. When someone throws you a whitepaper with many complicated equations, you will appraise it even though you do not understand anything and you will put your money in it. In defi, many people came up with so-called better solutions for DEXes, derivatives, borrowing and lending, and they added complexity. Guess what: most of these platforms would have no users except for the boring liquidity mining. The king of each defi sector is quite simple. Look at Uniswap, it is only a few simple equations and it dominates the DEX division in defi. Finance is already a complex subject and defi is here to break the complexity.

So why Antimatter matters?

I have read and learnt through defi protocols for options, and all of them are just rocket science. I mean it is good, but I think I learnt more about options by searching on Investopedia. In short, it is just two forces competing against each other, and two forces should be responsible for their decision making, just like marriage. What if we create an option mechanism that is very simple to adopt and easy to understand? What if we abandon the time factor of options and make it easy to trade and hold? Here comes Antimatter which is a simple but abnormal option mechanism for decentralized finance.

Firstly, an option product consists of two forces: positive (call) and negative (put) forces. For the sake of the law of physics, the two forces should always balance each other out, so the sum of them should equal a constant C. Let’s take ETH as an example: if we have two tokens one representing long put option and the other representing short put option, then the sum of the value of long and short should always equal the constant C value. The demand and supply of the creation and burn of pairs of option tokens should make sure the C is always maintained (BTW, this is first lesion microeconomics) So now what? Now we can use this principle to build a very simple but abnormal option product for defi with simple lines of codes.

Secondly, a defi product should be very easy to use. I had experience in building defi and I know that people in defi dislike learning and like quick money. So, under this social environment, the best way to let people use your defi product is to make it simple. So as mentioned above, it is very simple. You think ETH price will drop? Just buy tokenized put option and hold. You want to supply the option market? Just deposit C value of stablecoin and you will get a pair of put option polarized tokens.

Timing

Firstly, I want to discuss why we decided to launch Antimatter now. My philosophy has always been based on building things that people have the demand for, so the future development of this product will be largely driven by its future users.

Defi started to become mainstream in early 2020, and that was the start of the bull market we are currently riding. The positive market condition helps and energizes defi platforms such as Uniswap, 1inch because people trade more actively during the bull market and like to take risks to participate in liquidity mining.

However, the prosperous and robust defi ecosystem has not yet gone through the bear market. Have you ever thought about what will happen when the bear market comes, which will definitely happen? People will not trade altcoins very often and most will play with derivatives, longing and shorting major assets such as BTC and ETH. If you experienced the last bear market, you should remember 95% of crypto tweets were about making money or getting liquidated on BITMEX lol.

Now, is there a defi platform which people use on a daily basis to long and short crypto? The answer is no. Most people do not use defi to execute their strategies. People use Uniswap to trade because it is so easy and simple to use. The current defi derivatives platforms are more complicated than centralized exchanges and definitely cannot be used for the mass adoption.

So, there is a gap to be filled in defi: a simple platform for people to execute their derivatives strategies. The creation of such a platform will fulfill many people’s needs when the bear market comes. A complete defi ecosystem is not only for bulls, but also for the bear market.

Our production line

I want to emphasize that Antimatter is a cross-chain simple, light-weighted derivative protocol. It means that we will start by building a full product on Ethereum, which is the hub for the most demanded defi. Then I will extend to Binance Smart Chain and Polkadot.

The design for Antimatter is elegant and simple, and that means I will launch the main net product very soon — we are not talking about next quarter or next year. The first product will put options for crypto assets. If it works out, I will extend the product in another derivative spectrum.

Decentralized perpetual put option

Since this design is to maximize user experience, we need to abandon the traditional option model. To build a potential financial product for mass users, we should consider normalization and standardization as the priority. This means we should abandon factors that add complexity and reduce unity.

In my design, I abandon the time factor in order to make the system flexible and easy to use. This means the Antimatter put option is a perpetual option. This fits with defi spirits, since in defi people like automation and infinity. In other words, you do not need to worry about your on-chain positions. Without time factor, we can build a series of standardized put options for anyone to contribute and participate. Market makers funds can collectively enhance the liquidity and depth.

Secondly, since crypto is already very risky to play with, the on-chain crypto option adds another layer of risk. To de-risk, we need to find a solution that lets users have minimum exposure to the complicated backend system. To make it happen, I came up with the notion of Polarized tokens. An option product consists of two forces: positive (call) and negative (put) forces. Users only need to purchase and sell two polarized tokens to get exposure to call and put. A pair of polarized put option tokens consists of a long put option token and a short put option token. The monetary value of a pair of polarized option tokens should always equal to a constant value C.

With the two points mentioned above, let’s go through the system together. For the sake of law of physics, the two forces should always balance each other out, so the sum of them should equal to a constant C. Let’s take ETH as an example: if we have two tokens, one representing long put option and the other representing short put option, then the sum of the aggregate value equal the constant C value. The demand and supply of the creation and burn of long put and short put should make sure the C is always maintained (BTW, this is first lesion microeconomics).

We use -ETH to represent put option since it is a put option and the token symbol for the pair will become:

-ETH($C) for long put option and -ETH($C)s for short put option (I add a small s to represent short).

The first principle in the Antimatter system is The value of a pair of polarized put option tokens should always equal to a constant:

(-ETH($C))+(-ETH($C)s)=C

To start the engine, market creators need to deposit C amount of USDT or stable coins to generate a pair of tokens: -ETH($C) and -ETH($C)s. A deposit of multiple of C amount will generate multiple pairs of tokens. Note that the amount of -ETH($C)s is always equal to the amount of -ETH($C) in the market. Conversely, to exit the Antimatter market, anyone can use a pair of -ETH($C)s and -ETH($C) to redeem C amount of USDT anytime. Once the market creators supply the market with -ETH($C)s and -ETH($C), traders can speculate ETH price by trading -ETH($C)s and -ETH($C)s. The -ETH($C)s value should always equal the market price of ETH, while holding -ETH($C)s gets funding fees generated from the other side -ETH($C). It is important to point out that the roles -ETH($C)s holders play are different from the role of -ETH($C) holders. Philosophically, holders of -ETH($C) have the power and rights because they are longing to put option. The holders of -ETH($C)s have the choice of just holding ETH in the general market, but they chose to hold -ETH($C)s as an obligation to match the two sides of the market and get arbitrage opportunities. As a result, the holding of -ETH($C)s will get some benefits from the other side in the form of fees.

For a long-put strategy, the trader can just purchase long put option tokens from the market. For example, if the market price of -ETH($C)s is 1800 USDT and the constant C is 3000 USDT, the current price of -ETH($C) will be 1200 USDT. A trader purchases an -ETH($C) at 1200 USDT, then the price of -ETH($C)s appreciates to 2000USDT, then the -ETH($C) will be at 1000 USDT. Conversely, if the price of -ETH($C)s depreciates to 1000USDT, then the -ETH($C) will be at 2000 USDT. In an extreme market condition, it is possible that the value of -ETH($C)s exceeds constant C, this means the value of long put option token should equal to 0. You may think this is liquidation, but if you keep holding long put, it always represents the rights to redeem in the future under perpetual swap condition. This further improves user experience through perpetual trading.

So, what if the first principle equation does not hold? Let’s assume that the addition of the value of -ETH($C)s and -ETH($C) exceeds the constant C value, then there arises an arbitrage opportunity for people to deposit C value to generate a pair of -ETH($C)s and -ETH($C) and sell for more value than C. In contrast, if the addition of the value of -ETH($C)s and -ETH($C) is less than constant C value, then there arises another arbitrage opportunity for people to purchase a pair of -ETH($C)s and -ETH($C) and redeem for C value. In an efficient market, the first principle should always be to hold.

Due to the complexity of this concept, there is a lot of work to be done at the backend to bring this product to life. I will explain token economics in detail in the following posts. Stay tuned! More details will be shared in the form of codes. The first version will be live before April 1st. We will start with build perpetual put option product and then build call option product.

Community Feedback

Since we released the design of our option mechanism, we have received some feedback from the community, including:

  1. The logic is too complicated, involving two layers such as long and short together with call and put.
  2. The market demand always has two sides. If you launch the put option first, how are you going to fulfill the needs of the call option?
  3. If the funding fee is always going from long token holders to short token holders, it puts long token holders into a long term disadvantage. Thus the incentive to hold long tokens reduces dramatically.

This feedback is valuable for our backend design. In the process of product development, we decided to adjust our model to improve the design of our option.

Rethinking two forces: Call and Put

Firstly, the launch of ETH option will have both call and put options. In our previous design, we separated the call option from put options and designed two tokens for each call and put options. The flaw was the short put option token and the short call option token have bare demand in nature so that one side of the market will always have less incentive than the other. To merge together call and put options, we bring more integrity and less complexity to the product and user experience.

A more generalized and simplistic option token model

There will only be two tokens for each option: the token representing CALL and the other token representing PUT. Holding call tokens means you are positive about the underlying asset price, holding PUT tokens mean you are negative about the underlying asset price. (We eliminate long and short tokens to further simplify the model)

Each option product has one underlying asset and two parameters. The asset can be any crypto asset with liquidity and volume such as ETH. Two parameters mean option price floor and option price ceiling. Let’s take ETH as an example: we can create an option with parameters of 1000 USD and 2000 USD. The call token for this option always has the right to purchase ETH at 1000 USD, and the put token for this option always has the right to sell ETH at 2000 USD. If the market price for ETH is currently at 1500, then the call token holders can use the call token right to purchase ETH at 1000 and sell for 1500, making 500 USD profit.

Conversely, the put token holders can use the put token right to sell ETH at 2000 purchase back ETH at 1500, making 500 USD profit. In an efficient market, the sum of call token value and the put token value equal to the difference between floor and ceiling (in our example 1000). If ETH price increases, the call token price increases as well, since the underlying right for call becomes more valuable and vice versa.

The value of call option token and put option token have restraints. Both token prices cannot exceed 1000 USD in our example because that is the maximum benefit the underlying asset profit can go.

Option creation and redemption

To generate an option token pair, you only need to deposit 1000 USD and you will get a call token and a put token. To redeem an option token pair, you need to deposit a call and a put token to receive 1000 USD back at any time.

Arbitrage opportunities will make sure the creation and redemption balance equation always holds. If the aggregate price of call and put tokens exceeds the balance amount, then market makers will create more option tokens to supply the market, and vice versa.

Unlike our previous model, the new model supports redemption of only one token. You can deposit the call token and 1000 USD to receive 1 ETH from the underlying pool asset. The call token will be burned. You can also deposit the put token and 1 ETH to receive 2000 USD from the underlying option pool asset. The put token will be burned. This means the amount of call and put tokens could be unequal if one side burn is more frequent than the other.

Price peg and maintenance

The issue now is if the underlying assets for the put and call tokens are not the option assets, the put and call tokens prices might not be pegged with optioned assets. For instance, if we only use USDT to generate and redeem for ETH option, then put and call tokens might not follow ETH price movement. So we need to bring in option assets as the underlying asset. For the ETH option, the underlying asset needs to partially be ETH.

The underlying asset pool consists of both stable coins and ETH (for ETH option). The ratio between these two assets is based on the number of call and put tokens. If the call to put tokens number is 2:1, then the ETH to stablecoin ratio in the underlying assets pool is 2:1.

The ratio will always be maintained so that the call and put token prices will be pegged with underlying assets and reflect ETH price movement.

The underlying assets in the option pool will be purchased and sold into each other to maintain the ratio. But the total value of the underlying assets is maintained (Just like Uniswap’s LP pool)

Underlying asset pool

The underlying asset pool consists of the native option asset and stablecoins. The native option asset is different for each type of option. For example, the underlying asset for ETH option will be partially ETH. We will support as many stablecoins as we could and that includes DAI, USDC, USDT, PAX, USDT, 3CRV, USD5, UU, UP etc. The option creator can choose to deposit one or more assets together and the Antimatter container will sort out the assets with the correct underlying ratio.

Funding fees

In this model, both call option token holders and put option token holders have the same rights and use the same amount of resources in the environment. So the fair level ground means there is no funding fees going from one to the other. The funding fee is 0 for both sides forever.

Liquidation

In this model, the minimum price each token can go to is 0. But this does not mean you are liquidated. If the price of underlying assets drops back to the option capture range, a token holder still has rights to buy or sell the asset at the range and make profit. So our model does not have liquidation.

What is next

We will start building with this newly adjusted model.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.