Description

You create leveraged long/short positions through doing the following with lending pools 1. Deposit Token X as collateral 2. Take out a stablecoin loan against token X 3. Swap stablecoin for token X 4. Re Collateralize with Token X Repeating this process gives you lots of exposure to token X, allowing you to effectively long it. Doing the reverse will short it. Phantasm then uses 88mph's Yield Tokens, which earn interest based off of the interest rate of their underlying lending pools, and bundles them with these leveraged positions. So that when a spike in pool borrowing rates threatens liquidation, the Yield Tokens increase in the amount of interest they earn proportionally, allowing the end user to cover their position regardless of market conditions, and instead based on the underlying asset. These positions are then represented as ERC721-NFTs which can be traded on open markets.

Phantasm Finance showcase

How it's made

We used alchemy and truffle. It took a lot of fiddling with ganache to get this to work, and we even had a Polygon version at one point using a Polygon Alchemy node but it kept breaking and was unable to be used in a our final submission. We started out with Compound, but the CERC20 interfaces caused a lot of issues on the custodial end so we ended up going with Aave. The Frontend was done in react and is in javascript, it is setup with web3 js so that it can also make calls to a testnet.