Submitted by evan
By calling buyoutLien before transferWithdrawReserve() is invoked (front-run if necessary), Public vault owner (strategist) can indefinitely prevent liquidity providers from withdrawing. He now effectively owns all the fund in the public vault.
https://github.com/code-423n4/2023-01-astaria/blob/main/src/VaultImplementation.sol#L295
https://github.com/code-423n4/2023-01-astaria/blob/main/src/PublicVault.sol#L421
Before commitLien, transferWithdrawReserve() is invoked to transfer available funds from the public vault to the withdrawProxy of the previous epoch. However, this is not the case for buyoutLien.
https://github.com/code-423n4/2023-01-astaria/blob/main/src/PublicVault.sol#L372-L382
As soon as theres fund is available in the vault, the strategist can call buyoutLien before any calls to transferWithdrawReserve(), and the withdrawProxy will need to continue to wait for available fund.
The only thing that can break this cycle is a liquidation, but the strategist can prevent this from happening by only buying out liens from vaults he control where he only lends out to himself.
Consider the following test. Even though there is enough fund in the vault for the liquidity providers withdrawal (60 ether), only less than 20 ethers ended up in the withdrawProxy when transferWithdrawReserve() is preceeded by buyoutLien().
VSCode, Foundry
Enforce a call to transferWithdrawReserve() before a buyout executes (similar to commitLien).
SantiagoGregory (Astaria) confirmed and commented:
SantiagoGregory (Astaria) disagreed with severity and commented:
Picodes (judge) decreased severity to Medium and commented:
