Should we allow only sender and recipient to call withdraw? #260
Replies: 5 comments 15 replies
-
I'm against this. It's not just a matter of inconsistency with the Lockup; all the cool benefits of public withdraw are lost. Are you saying that the precision issue cannot be resolved, in principle? That it's inevitable? It's unclear from your statement how bad the situation is.
|
Beta Was this translation helpful? Give feedback.
-
i understand, this is why i asked about the dune query, they may be "cool" but if in practice it is not actually used at all, what to do with them? it is not about "what is wrong" with the current solution, it is about "what could be wrong and we didn't find" and then -->
fundamentally it can't be fixed 100%, it is about how rational numbers work, if you want to stream 10 token per day, you would need to have: so, with a 18 decimals format, you would have to wait 1 day + 1 second to get that 10 token "streamed" --> 1 second delay of the desired amount over 1 day
IMO, this whole situation isn't "bad" , as it doesn’t lead to a loss of funds, only to a delay of 1 unit of the token (in the case of USDC, $0.000001) over a certain period of time, depending on what the rate per second is
we can release the current version without allowing public withdrawals, and after we have made enough tests and we are sure we can make the change |
Beta Was this translation helpful? Give feedback.
-
I am happy to vote for it if everyone agrees with the proposal. However, I have a few points to make:
|
Beta Was this translation helpful? Give feedback.
-
Here you go @andreivladbrg: https://dune.com/queries/4093543 There have essentially been 27 withdrawal transactions where the caller was not the recipient, nor the sender, in Sablier v2.2 on Ethereum. This represents about 2.68% of withdrawals in v2.2 on Ethereum. Only made this analysis for Ethereum as it would be time-consuming to do it for all chains we support, but please definitely let me know if you need data for those other networks as well. |
Beta Was this translation helpful? Give feedback.
-
UpdateWe've decided to go with previous implementation ( @andreivladbrg should we close this discussion now? |
Beta Was this translation helpful? Give feedback.
-
In the past two weeks, there has been a lot of back-and-forth between @smol-ninja and me regarding how to minimize the precision issue in withdraw, which ultimately only creates a delay problem. It’s becoming overwhelming—every time we think we’ve figured it out, something new comes up.
The major concern here is that an external attacker could exploit this by running a loop to withdraw tokens on behalf of the recipient, causing constant delay. For tokens with a lower value compared to USD (unlike BTC), this wouldn’t be practical from a gas cost perspective, as it would be too expensive.
The quickest solution to the attacker scenario from above, without adding extra complexity to withdraw, is to restrict the function so that only the sender or recipient can call it.
Cons:
Pros:
block.timestamp
).Since we need to make a quick decision with the audit approaching, I would appreciate fast feedback from @sablier-labs/engineers.
Also, @maxdesalle, do we have a dune query that searches for the percentage of
withdraw
calls in lockup wheremsg.sender != recipient
,msg.sender != sender
ormsg.sender != approved operator
?Beta Was this translation helpful? Give feedback.
All reactions