Skip to content

Instantly share code, notes, and snippets.

@0xngmi
0xngmi / lending-idea.md
Last active July 11, 2024 14:51
Lending protocol optimized for redeemable assets

Optimized lending protocol for redeemable assets

Currently a significant portion of usage across all lending markets comes from carry trades between an asset and their derivatives.

To explain how this works let's assume that on AAVE borrowing ETH costs 1%, but stETH yields 3%. This opens up a trade where you deposit stETH, borrow ETH, swap it for stETH and repeat the trade again, looping the position and arbing the rates. In this position you earn 3% but pay only 1%, so you're earning 2% net.

Some examples of these trades in the wild are:

  • Flux finance, a compound fork purely focused on borrowing stablecoins against treasuries for carry trades
  • AAVE, which has a 5.8bn stETH and ~1bn weETH, both used for looping against ETH. Together, these account for ~45% of aave's TVL
  • Morpho, which hosts users looping sUSDe against DAI
  • Compound, which hosted large arb trades against cbETH
@otrack
otrack / stake.md
Last active January 31, 2024 18:07

Investigating stake-based dissemination in CometBFT

Context

Blockchain is a decade-old technology to construct decentralized trusted storage and applications. At core, this technology relies on replication protocols that connect hundreds to thousands of geo-distributed processes. Participating processes disseminate transactions (such as operations of a smart contract) across the system. They also continously agree on the next block of transactions to add to the chain. At each process, transactions in the chain are executed in order against a local copy of the application.