Inspiration

Started scrypto/Radix less than a week ago and thought it would be fun to try and see if I can make a full dapp before the submission deadline (started on Sunday)

In terms of the design, it's I suppose partially inspired by another experimental version of a perp swaps that had two pools betting against one another but fundamentally a lot remained the same.

I've taken an even more radical approach with the idea of liquidity cups, making it into a truly unique system.

What it does

The system balances two liquidity pools, betting long and short on the movement of a data feed, that is optionally leveraged for higher volatility.

It allows betting with any asset, not just stables. It has a non-linear payoff structure, based on the balance of the cups, encouraging liquidity to be equal on both sides without making use of a funding rate

How we built it

Very quickly. Due to time constraints given the data feed had to be made a freely-set variable. In a fully-production-ready dapp, the variable is to be replaced by a fully-fledged oracle solution.

I've taken the example website, the gumball full-stack example and built upon it to create my own frontend to the cotract.

Challenges we ran into

Some breaking changes between library versions, slightly underdocumented code and beta-version software that wasn't working perfectly all the time.

Overall very little challenges

Accomplishments that we're proud of

Completing what I've set out to do in the allotted time, fully end-to-end.

Designing a new type of perpetual swap.

Validating my thesis that Radix is looking quite boolish

What we learned

Basically everything about Scrypto/Radix to get this shipped. Not to mess with divisibility, to think in terms of assets. To leverage shadow tokens in a different project.

What's next for Cup Perps

We plan to create a different protocol first. May come back to Cup Perps and build them out as a fully-fledged project. We've a lot of time before Babylon.

Built With

Share this project:

Updates