Re introduce the amount
param in withdraw
#223
Closed
andreivladbrg
started this conversation in
Ideas
Replies: 3 comments 7 replies
-
Also, @smol-ninja, wouldn't this fix the precision issue from here? |
Beta Was this translation helpful? Give feedback.
7 replies
-
Great idea (and teamwork!). Nothing against it. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Great, closing since we all agree |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
After a private discussion with @gavriliumircea, he came up with a good idea to reintroduce the
amount
parameter inwithdraw
, which was initially removed due to the explanation provided here. In the meantime, we have introduced the storage variablesnapshotDebt
, which changes how things work.So, the proposed change in
withdraw
would be:time
-->amount
coveredDebt
to the current block (block.timestamp
)coveredDebt
coveredDebt - withdrawAmount
block.timestamp
Actual implementation
This change is going to be helpful for the app, as well as for the users, due to a more concise API (and consistent with
lockup
contracts).One more thing: this change would allow us to enable the withdrawal of an amount less than what has been snapshot in the case of
adjustRps
, which was not possible with atime
parameter.wdyt @sablier-labs/solidity ?
@gavriliumircea lmk if i missed something
Beta Was this translation helpful? Give feedback.
All reactions