Skip to content
Access control Audit finding Intermediate

`LiquidationAccountant.claim()` can be called by anyone causing vault insolvency

The claim function in LiquidationAccountant had no access control, so anyone could call it repeatedly after finalAuctionEnd. This allowed an attacker to manipulate the vault's yIntercept, potentially causing vault insolvency.

0xRajeev Follow with TurnipBoy, obront and 1 other

Originally disclosed on Sherlock

Source: https://github.com/sherlock-audit/2022-10-astaria-judging/issues/188

Found by

0xRajeev, TurnipBoy, obront, rvierdiiev

Summary

LiquidationAccountant.claim() can be called by anyone to reduce the implied value of a public vault.

Vulnerability Detail

LiquidationAccountant.claim() is called by the PublicVault as part of the processEpoch() flow. But it has no access control and can be called by anyone and any number of times. If called after finalAuctionEnd, one will be able to trigger decreaseYIntercept() on the vault even if they cannot affect fund transfer to withdrawing liquidity providers and the PublicVault.

Impact

This allows anyone to manipulate the yIntercept of a public vault by triggering the claim() flow after liquidations resulting in vault insolvency.

Code Snippet

  1. https://github.com/sherlock-audit/2022-10-astaria/blob/main/src/LiquidationAccountant.sol#L65-L97

Tool used

Manual Review

Recommendation

Allow only vault to call claim() by requiring authorizations.

Discussion

SantiagoGregory

Our updated LiquidationAccountant implementation (now moved to WithdrawProxy) tracks a hasClaimed bool to make sure claim() is only called once (we also now block claim() from being called until after finalAuctionEnd).

IAmTurnipBoy

Escalate for 1 USDC

Abuse can cause vault to implode and cause loss of funds to all depositors. Should be high

sherlock-admin

Escalate for 1 USDC

Abuse can cause vault to implode and cause loss of funds to all depositors. Should be high

You've created a valid escalation for 1 USDC!

To remove the escalation from consideration: Delete your comment. To change the amount you've staked on this escalation: Edit your comment (do not create a new comment).

You may delete or edit your escalation comment anytime before the 48-hour escalation window closes. After that, the escalation becomes final.

Evert0x

Escalation accepted.

sherlock-admin

Escalation accepted.

This issue's escalations have been accepted!

Contestants' payouts and scores will be updated according to the changes made on this issue.

The original report as published on Sherlock, by 0xRajeev. Images and videos are our own copies; raw HTML is shown as text. View it on Sherlock.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

The claim() function lacked access control, allowing any caller to invoke it multiple times.

Impact

Anyone could manipulate the yIntercept of a public vault, potentially causing vault insolvency, though fund transfer to withdrawing liquidity providers and the PublicVault may not be directly affected.

What the attacker needed

Liquidation has occurred; finalAuctionEnd has passed

The fix

The updated implementation tracks a hasClaimed bool to ensure claim() is only called once and blocks claim() until after finalAuctionEnd.

How it was found

  1. Wait until after finalAuctionEnd.
  2. Call LiquidationAccountant.claim() directly.
  3. Repeat the call multiple times to trigger decreaseYIntercept() on the vault.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

A smart contract function that should only be run by the vault itself could be run by anyone. By calling it repeatedly, an attacker could change an internal number that affects how much money the vault appears to have, which could make the vault unable to pay everyone back.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by 0xRajeev

View all

61 more disclosed reports, best first.

More from Astaria

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.