At Delphi Labs, we've thought a lot about oracles in the context of our contributions to @mars_protocol and @astroport_fi

In this report, we summarise our key learnings and propose a new framework to set TWAP parameters based on the cost of attack

members.delphidigital.io/reports/attack…
Oracles are key crypto infrastructure, lying at the core of all debt-based protocols such as money markets, derivatives, perps, etc. They're also one of DeFi's biggest attack vectors

This article by @samczsun provides an excellent summary of the issues

samczsun.com/so-you-want-to…
At the highest level, money market oracle manipulation attacks can be broken down into two main categories:

(1) False collateral value increase

(2) False collateral value decrease / debt asset value increase
In (1) the goal is to pump the price of a collateral asset, enabling the attacker to borrow > than the collateral's real value

In (2) the goal is to dump the price of a collateral / pump the price of a debt asset to 'falsely' liquidate another user (i.e. buy collateral cheaply)
While there are various kinds of oracle solutions, for this article we focus primarily on the on-chain TWAP oracle initially pioneered by @Uniswap and used by @astroport_fi

This will also be the primary oracle used by @mars_protocol's Fields of Mars
We analyse the costs of various attacks and use this to derive optimal TWAP parameters

This research has informed design choices on @mars_protocol TWAPs. We hope it can also be useful for others in the space

If you want to talk about this, our DMs are always open
All credit goes to the Delphi Labs risk team, specifically @ayana_eltai and @JonathanErlichL who crushed this research

A special thank you to @euler_mab, @Mudit__Gupta, and many others who provided feedback and helped refine our thinking on this

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with José Maria Macedo

José Maria Macedo Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @ZeMariaMacedo

Feb 7
Mars isn't just another money market

It’s a generalised credit protocol enabling both peer-to-smart contract AND smart contract-to-smart contract lending 🔴

The latter is the real breakthrough and what I’m most excited about.

Thread about why 👇

1/ Many say DeFi is inefficient because all lending must be overcollateralised – you have to lock up more than what you borrow

They then argue the solution is moving to some form of trust-based "uncollateralised" lending

We agree with the problem, but not with the solution
2/ Rather than porting concepts directly from TradFi, we believe in using crypto’s inherent advantages to create new, better primitives

In order to understand these advantages, we must first examine how credit works in TradFi and how this differs from crypto
Read 32 tweets
Jan 24
Prediction markets are one of the OG crypto use cases that most excite people's imagination

And yet all attempts at building them so far have failed

Thread on why I think this is and why we're so pumped about @azuroprotocol's approach

2/ In terms of mech design, most PMs have used P2P architectures

In these designs, not only do LPs have to bootstrap each individual betting market but also the "yes" and "no" side of each market, effectively setting the odds and taking all the betting risk related to that mkt
3/ This means users' ability to bet on one side of a market is constrained by liquidity on the other side of that market

This has led to low liquidity, terrible odds and hardly any bet volume
Read 11 tweets
Oct 27, 2021
Alpha leak: @astroport_fi is in audit and will be launching in mid November

DEXes are the core building block of any DeFi ecosystem. The launch of Astroport means @terra_money will now have a best-in-class AMM

Thread on why I think this and why it matters 👇
1/ As I see it, @astroport_fi provides two fundamental improvements to existing AMMs:

✦ Flexible pool model
✦ Token econ & governance

I'll cover each of them in turn
2/ Flexible pool model

Different AMMs use different algorithms (also referred to as "pool types") to price assets, with each one being appropriate for certain kinds of assets

For instance, Uniswap's xyk pool is appropriate for volatile assets but inefficient for stable assets
Read 27 tweets
Sep 20, 2021
Delphi Labs is expanding 📈

We're looking for a few key people to join our team and help us build out the future of france

You'll be surrounded by world-class talent working on some of the most interesting problems in the space

More below 👇 Image
COO

@lukedelphi and I are entrepreneurs at heart and we like to move fast. We need a detail-oriented operations exec to complement our skill-set, bringing a bit of structure/discipline to our workflows

This is a key role for a Wags like character to take ownership of
Games Economist

We've been intimately involved with the P2E space from the get-go, designing the token econ and leading seed rounds for @AxieInfinity, @YieldGuild, and others. We're now looking to leverage these learnings and build a FT gaming econ team
Read 9 tweets
Sep 8, 2021
Few realise it, but #TerraAutumn is coming 🌖🍂

The pieces will start falling into place once Columbus 5 goes live in late September

In this thread, I share my mental model for @terra_money and guide to the end of year setup as I see it 👇
1/ Before we begin, it’s important to realise what Terra is

Terra’s product is often misunderstood as an L1

In reality, Terra’s only product is $UST. Everything else, including the L1, simply exists to help make $UST the most useful and decentralised form of money there is
3/ The decentralisation mechanisms are well-covered, so I’ll focus mostly on utility. What makes money useful?

Money can either be spent or held/invested (deferred spending)

Terra aims to make $UST useful for both
Read 23 tweets
Jul 19, 2021
1/ Delphi Labs is excited to announce that @lex_node has joined us as General Counsel

Gabe is a crypto law OG and widely respected as one of the top legal minds in the space having worked with projects like Metacartel, Lido, Yearn, Sushi, among many others
2/ Our goal at Delphi Labs is to push the crypto space forwards by helping projects with whatever they need to be successful

We already have exceptional talent in economic design, product, UX and strategy, but all projects grapple with the legal challenges crypto presents
3/ Unlike some in the space, Gabe applies existing regulations as they actually are rather than an idealised version of what they should be

He’s also written some of the best research out there on the implications of securities laws for token projects: github.com/lex-node
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

:(