-
Notifications
You must be signed in to change notification settings - Fork 75
feat: deposit() wrapper with current quoteTimestamp #357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
depositNow() is a new deposit() wrapper that removes the need for the caller to supply a quoteTimestamp. Instead, the value of getCurrentTime() is used. This is introduced to address the issue of multisig depositors having only a narrow window to collect the necessary signatures for a deposit. Instead, LP fee certainty is traded for flexibility around when the deposit is able to be submitted. The depositor is still able to query the expected LP fee via the Across API, so the chance of paying more fees than anticipated is fairly low.
ACX-1544 contracts: deposit() wrapper that uses current time for quoteTimestamp
Discussed during the Monday Across sync. This makes it easier for multisig signers to successfully deposit, without a sharp time constraint between generating the deposit and submitting it. It's low priority, but also a simple change to make in the contracts. |
| bytes memory message, | ||
| uint256 maxCount | ||
| ) public payable { | ||
| deposit( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you'll need to pass through the msg.value to deposit
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
msg.value propagates because the call to deposit() is internal, but I've added tests to verify this: 9499d4e.
nicholaspai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but one change required I think https://github.com/across-protocol/contracts-v2/pull/357/files#r1330205507
mrice32
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
depositNow() is a new deposit() wrapper that removes the need for the caller to supply a quoteTimestamp. Instead, the value of getCurrentTime() is used.
This is introduced to address the issue of multisig depositors having only a narrow window to collect the necessary signatures for a deposit. Instead, LP fee certainty is traded for flexibility around when the deposit is able to be submitted. The depositor is still able to query the expected LP fee via the Across API, so the chance of paying more fees than anticipated is fairly low.
Ref ACX-1544