DeFi Ethereum

New in Ethereum Money Lego: The “Collateral Swap” Via Maker, Aave & Uniswap

The latest money lego innovation making waves this week, the so-called collateral swap, comes courtesy of entrepreneur and developer David Truong.
Pinterest LinkedIn Tumblr

The Ethereum blockchain is becoming increasingly fertile grounds for permissionless innovation, which is no surprise: it’s a computational sandbox where anyone can use smart contracts to link established dApps together toward new ends.

That explains the bustle around the Ethereum ecosystem lately: unprecedented projects are rapidly blooming at the community’s periphery in building off the first waves of decentralized finance dApps.

This combinational activity, referred to by Ethereans as building with “money legos,” in turn creates a larger foundation for new projects to usher in the next waves of DeFi.

The latest money lego innovation making waves this week, the so-called collateral swap, comes courtesy of entrepreneur and developer David Truong.

Examining the Pieces

Truong’s collateral swap construction relies on three DeFi money legos: Maker, Aave, and Uniswap.

Among other things, the Maker team is behind the Dai stablecoin and Maker Vaults. Formerly known as collateralized debt positions, or CDPs, these vaults allow users to collateralize ether (ETH), Basic Attention Token (BAT), and potentially other tokens later in order to draw out Dai loans against such crypto collateral.

Aave is one of the newest DeFi projects on the scene, having had its mainnet launched just last month. However, the crypto lending project has quickly captured imaginations with its novel offerings, for instance a flash loan feature that lets users borrow and payoff a loan within a Ethereum single transaction.

Lastly there’s Uniswap, and it needs the least explanation: it’s a popular decentralized exchange where users can trustlessly trade tokens through a simple interface.

Meet the Collateral Swap

On February 4th, Truong unveiled a working, albeit unaudited, collateral swap mechanism that allows a Maker Vault borrower to use an Aave flash loan and Uniswap to swap from one collateral to another, say ETH to BAT or vice versa, within a single transaction.

Why’s this so cool? It offers Maker Vault users considerably more flexibility.

Previously to make a de facto collateral swap, borrowers would have had to pay off their open vault’s remaining Dai debt entirely, close that vault down, swap the underlying tokens to their other desired type of collateral, and then open a new vault with that new collateral.

In leveraging some of Ethereum’s top money legos then, Truong has given the rest of the ecosystem an avenue to compact those multiple steps into a single transaction, a dynamic that is much more user-friendly. Truong said users might use such swaps to quickly flee to a safer collateral or to take advantage of arbitrage opportunities.

Truong noted that the underlying smart contract doesn’t have a front-end user interface yet, but it’s safe to assume one’s on the horizon, whether from Truong or from other like-minded builders.

Rapid Composability

As an example of how fast things have been moving in the Ethereum ecosystem lately, Truong’s work on a collateral swap system was inspired by a January 17th tweet from Aave founder and chief executive officer Stani Kulechov, in which he said:

“We figured out that you could use [a flash loan] to swap your Vault collateral without closing your Vault. Anyone want to build it?”

Not even three weeks later Truong followed through with a working prototype, and it goes without saying that such speed wouldn’t have been possible if Aave, Maker, or Uniswap were closed-source instead of open-source projects.

Of course, a front end and an audit will go a long way toward making the swap system ready for more casual users, but how fast it was built and the manner in which it was built — by plugging together Ethereum money legos in new ways — is quite impressive indeed.

Important Note: There have been reports of scammers approaching companies via Telegram, LinkedIn and Other Social platforms purporting to represent Blockonomi and offer advertising offers. We will never approach anyone directly. Please always make contact with us via our contact page here.


William M. Peaster is a professional writer and editor who specializes in the Ethereum, Dai, and Bitcoin beats in the cryptoeconomy. He's appeared in Blockonomi, Binance Academy, Bitsonline, and more. He enjoys tracking smart contracts, DAOs, dApps, and the Lightning Network. He's learning Solidity, too! Contact him on Telegram at @wmpeaster

Beanstalk Gaming & NFTs
As Featured In
As Featured In