Y

Yogen

Create and trade future swaps on Ethereum

The problem Yogen solves

Yogen always anyone to create "future swaps": swap that are scheduled to happen in the future, at a specific date. The idea behind this concept is to be able to speculate on the change of value between a pair of tokens.
For example, let's take the COMP / AAVE pair with a current price of 1 COMP = 1 AAVE. Alice thinks the value of AAVE is going to increase a lot in the future, so she creates a future swap proposal from 100 COMP to 100 AAVE with a delivery date on the 2021/07/31. On the other side, Bob is more bullish on COMP and is looking to dump his AAVE tokens, so he decides to accept this proposal.

On the 2021/07/31, two scenarios are possible:

  1. The value of AAVE went up and now 2 COMP = 1 AAVE, Alice is happy, she receives 100 AAVE for the price of 100 COMP (2 times cheaper than the actual market price). On the other hand Bob is disappointed by this trade, he's going to receive 100 COMP for 100 AAVE (2 times more expensive than the current market price).
  2. The other scenario is when the value of COMP increases more than the value of AAVE. Let's say that 1 COMP = 2 AAVE, Alice made a bad call, because she'll be receiving 2 times less tokens than the actual market price (100 AAVE instead of 200). Bob is happy in this scenario, because his 100 AAVE tokens are swapped against 100 COMP (instead of 50 COMP at the actual market price).

Additionally, every time a user is going to take a position on a future swap, they will be receiving an NFT token representing their side of the swap (initiator or counterparty). This feature allows a bunch of additional scenarios, such as:

  • Selling their position when benefits can be made: instead of waiting for the delivery date and the execution of the swap, a user can sell his position to another user.
  • Limit the loss by selling a negative position: if a position is negative (the other token has its value increasing), a user can sell his position to another user to limit their loss.

Challenges I ran into

The hardest part for me during this virtual hackathon was to work on all the stack at the same time by myself (contracts, front-end, etc...).
On top of that, the integration of many different techs was complicated: new project such as Textile, or multi-chain supports using Arbitrum, etc...
I tried to overcome these issues by focusing on the most important parts of the project and go straight to the point on the available features.

Discussion