sherlock-audit / 2024-06-makerdao-endgame-judging

1 stars 1 forks source link

JuggerNaut63 - Reentrancy Exploit in Yield Accumulation Mechanism of SNst Contract #86

Closed sherlock-admin3 closed 1 month ago

sherlock-admin3 commented 1 month ago

JuggerNaut63

High

Reentrancy Exploit in Yield Accumulation Mechanism of SNst Contract

Summary

The drip function in the SNst is vulnerable to reentrancy attacks due to external calls to vat.suck and nstJoin.exit before updating critical state variables. This could allow an attacker to manipulate the state and drain funds.

Vulnerability Detail

  1. Initial Call:
  2. Reentrant Call:

Impact

Code Snippet

https://github.com/sherlock-audit/2024-06-makerdao-endgame/blob/main/sdai/src/SNst.sol#L214-L229

Tool used

Manual Review

Recommendation

telome commented 1 month ago

Not an issue. vat and nstJoin do not call snst back.