Aave v2/v3 security incident 04/11/2023

May I suggest an alternative because I will very much miss the stable rate?

For Aave, the stable rate is determined via a rough 2x calculation of the variable rate. Even Aave’s stable rate won’t stay the same in some outlier situations: Borrowing - FAQ . But if the lender stipulates upfront how much they are willing to accept no matter what the utilization rate is, then that works great for the borrower. And it is fantastic for shorting. To do it, Aave uses a behind-the-scenes orderbook.

Same interface as currently exists in Aave, just with extra functionality for this order book that happens after you click the “Supply” or “Borrow” button. Just like the Borrow pop-up right now has an option on top for Stable and Variable, Supply too has Stable and Variable options.

Example: Alice, Bob, and Charles.

Alice has MEMESHT and she really believes in it, she’s in it for the long term.

Bob has MEMESHT but not as bullish.

Charles wants to short MEMESHT.

Alice sees MEMESHT under “Assets to supply,” clicks “Supply.”

In pop-up, clicks the “Stable” option on top.

She puts in the amount of MEMESHT tokens of “100.”

She slides the 0% to 100% slider, with 5% increments, to “10%”.

She slides the 6 months to 48 months slider, with 6 month increments, to “12 months.”

Clicks “Submit.”

This means Alice will accept 10% or more borrow rate with a lock of 1 year or more on 100 MEMESHT tokens.

Bob sees MEMESHT under “Assets to supply,” clicks Supply.

In pop-up, clicks the “Stable” option on top.

He puts in the amount of MEMESHT tokens of “200.”

He slides the 0% to 100% slider, with 5% increments, to “50%”.

He slides the 6 months to 48 months slider, with 6 month increments, to “48 months.”

Clicks “Submit.”

This means Bob will accept 50% or more borrow rate with a lock of 4 years (the max) on 200 MEMESHT tokens.

Charles sees ETH under “Assets to supply,” clicks Supply.

In pop-up, clicks the “Stable” option on top.

He puts in the amount of ETH tokens of “0.1.”

He slides the 0% to 100% slider, with 5% increments, to “5%”.

He slides the 6 months to 48 months slider, with 6 month increments, to “48 months.”

Clicks “Submit.”

This means Bob will accept 5% or more borrow rate with a lock of 4 years (the max) on 0.1 ETH tokens.

Charles sees MEMESHT under “Assets to borrow,” clicks Borrow.

In pop-up, clicks the “Stable” option on top.

He sees below the amount field for MEMESHT tokens the text: “Max 300.”

He puts in the amount of MEMESHT tokens of “100.”

The 0% to 100% slider, with 5% increments, defaults the best option of “10%”.

The range between 0% and 10% and 50% and 100% are deactivated.

The 6 months to 48 months slider, with 6 month increments, defaults to the best option of “12 months.”

The range between 6 months and 12 months is deactivated.

He knows he can increase the amounts of rate and lock but has no incentive to.

This means Charles can accept 10% or more borrow rate with a lock of 1 year or more on 100 MEMESHT tokens.

Charles, though, wonders what would happen if he borrowed 200 MEMESHT.

Charles puts in the amount of MEMESHT tokens of “200.”

The 0% to 100% slider, with 5% increments, defaults the best option of “45%”.

Directly below the 45% slider the text: “10% for 12 months, then 50% for 36 months.”

The range between 0% and 45% and 50% and 100% are deactivated.

The 6 months to 48 months slider, with 6 month increments, defaults to the only option of “48 months.”

The range between 6 months and 48 months is deactivated.

He knows he can increase the amounts of rate and lock but has no incentive to.

Clicks “Submit.”

This means Charles will pay 45% or less borrow rate with a lock of 4 years or more on 200 MEMESHT tokens.

Charles knows this because he borrows half of the MEMESHT from Alice at a cheap rate and the rest from Bob at a higher rate. Someone can undercut Alice or Bob, like Daniel might offer 5% for 1 year, and thus his rate would go down, but it can never go over 45%.

EDIT: 11/4/23 - Originally wrote Max 400. 400 is how much he could borrow with his ETH. However, I changed the Max to 300. Because that’s the total amount of liquidity in the books. The max is the minimum of either values.

If he selected 100 MEMESHT, then 0.025 ETH would immediately get locked. But since he selects 200 MEMESHT, the 0.05 ETH gets immediately locked. He won’t get any supply rate from that 0.05 until/unless someone actually borrows from it. The other 0.05 ETH he can withdraw whenever he wants until/unless someone borrows from it. If he repays the 200 MEMESHT with interest, e.g. 290 MEMESHT at any point, then he can withdraw all 0.1 ETH.

Also, the entire order book would be visible on info.aave.com.

1 Like