Sablier

Sablier
DeFiFoundry
53,440 USDC
View results
Submission Details
Severity: low
Invalid

A decrease in the supply of rebase tokens has an unfair impact on beneficiaries' streaming payments.

Summary

The Sablier protocol allows streaming payments using rebasing tokens (such as Ampleforth (AMPL)). If the rebase token increases during the period the yield generated with these tokens inside the Sablier contracts will be lost. This is a known and accepted behaviour by the Sablier team.

But if the rebase token decreases during the stream period the protocol distributes unequal amounts of tokens to recipients (early withdrawals benefit at the expense of later ones).

Vulnerability Details

The Sablier protocol allows streaming payments using rebasing tokens. Rebasing tokens periodically adjust their circulating supply to achieve price stability, with positive rebases increasing the supply and negative rebases decreasing it.

During periods of negative rebase, the overall supply of the token decreases, reducing the amount of tokens held by the smart contract. The contract's logic does not account for these supply changes, so early withdrawals can deplete a disproportionate amount of the contract's holdings, leaving subsequent withdrawals with less than anticipated.

Impact

The Sablier protocol deploy the single Lockup contract (for example a LockupLinear) so everyone that wants to create a LockupLinear stream would call this single contract that have been deployed by Sablier and the contract will create a stream for them (basically a struct data structure) with the details of stream. This contract deployed by Sablier (in our example the LockupLinear contract) will be the one to manage every Linear stream and keeps all of the token that are being streamed.

Now let's say:

  • Alice creates a 10 AMPL stream for Bob with a duration of 1 month.

  • Alice creates another 10 AMPL stream for Steve with a duration of 1 month.

The LockupLinear smart contract has a balance of 20 AMPL.
During the month the AMPL decreases. The balance of the smart contract reduce consequently to (let's say) 18 AMPL.

The LockupLinear smart contract streams 10AMPL to Alice and 10AMPL to Bob.
If Bob withdraws their stream for first he receives 10AMPL (The first person to withdraw gets to withdraw fully). When Steve will go to withdraw his stream he will receive only 8AMPL.

So instead of being able to withdraw 9 AMPL each, Bob receives 10 and Steve receive only 8. The stream distribution is unfair.

Tools Used

Manual review

Recommendations

Implement logic within the smart contract to dynamically adjust withdrawal amounts based on the current token supply, ensuring fair distribution regardless of rebase events.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

Known - Contest Details

https://www.codehawks.com/contests/clvb9njmy00012dqjyaavpl44

kiteweb3 Submitter
about 1 year ago
inallhonesty Lead Judge
about 1 year ago
engrpips Submitter
about 1 year ago
inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue
Assigned finding tags:

Known - Contest Details

https://www.codehawks.com/contests/clvb9njmy00012dqjyaavpl44

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.