Skip to content

Conversation

@pxrl
Copy link
Contributor

@pxrl pxrl commented Sep 19, 2023

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

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.
@pxrl pxrl requested review from mrice32 and nicholaspai September 19, 2023 13:32
@linear
Copy link

linear bot commented Sep 19, 2023

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(
Copy link
Member

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

Copy link
Contributor Author

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.

Copy link
Member

@nicholaspai nicholaspai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@mrice32 mrice32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pxrl pxrl merged commit 6001222 into master Sep 29, 2023
@pxrl pxrl deleted the pxrl/depositNow branch September 29, 2023 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants