project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4
project screenshot 5

TrailMix Loop

Automated risk management vaults for assets on the superchain

TrailMix Loop

Created At

ETHOnline 2024

Winner of

trophy

Connect the World with Chainlink

Project Description

Tired of rountripping your hard earned gains? Me too. Managing a crypto portfolio can be a 24/7 job. You’re constantly cutting losses and taking profits, trying to beat the market as it tumbles or soars. Either you stare at candlestick charts for hours, or you inevitably check your portfolio one day only to realize half of it is gone.

I built TrailMix for two reasons. First, TrailMix protects my most valuable asset: my time. By automating the management process (cutting losses and taking profits), I can go back to the fun parts of crypto: minting base colors, playing fantasy.top, and listening to the newest Rehash minihash episode.

Second, TrailMix removes the emotional labor of trading crypto. When the market swings, hope, fear, and greed can come into play and interrupt even a carefully thought out investing plan. TrailMix takes this off your hands, giving you the best chance at success.

TrailMix acts as a safety net for your assets, catching them (selling them) when they fall and following them as they rise. This ensures you take profits before your asset fully crashes, ending the cycle of roundtripping. With entirely onchain logic powered by Uniswap and Gelato, TrailMix uses trailing stop losses to safely and securely trade assets based on market conditions. By utilizing smart contracts that plug into Uniswap pools, we’ve made TrailMix usable on any asset on the superchain without having you give up custody of your funds.

TrailMix both manages to both sell assets to cut losses as well as buying back in when the market recovers. This makes TrailMix an entirely hands off solution for managing risk.

How it's Made

TrailMix deploys individual vaults for each user strategy. These vaults use Uniswap pools as a time weighted average price (TWAP) price oracle. Chainlink's Ethereum price feed on enables TrailMix to calculate prices relative to USD instead of WETH (so pools against WETH still can be managed relative to prices in USD). Gelato network manages the upkeep of each vault, telling it when to buy, sell, or update a sell threshold.

Since integration testing would involve forking Optimism, writing tests, and managing dependencies, I decided to test manually with optimistic etherscan!

The front end is built in NextJs. The project was scaffolded with scaffold eth 2.

background image mobile

Join the mailing list

Get the latest news and updates