Skip to content
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

solana: deprecate auction history #207

Merged

Conversation

a5-pickle
Copy link
Contributor

Instead of writing auction data to an auction history account, solvers can call the close auction instruction to write the auction data as instruction data (via Anchor's event CPI). Then solvers can completely reclaim all rent from the auction account.

Verified

This commit was signed with the committer’s verified signature.
a5-pickle A5 Pickle
solana: deprecate history ixs

Verified

This commit was signed with the committer’s verified signature.
a5-pickle A5 Pickle
@a5-pickle a5-pickle requested a review from gator-boi January 28, 2025 21:23

Verified

This commit was signed with the committer’s verified signature.
a5-pickle A5 Pickle
);
let expiration =
i64::from(auction.vaa_timestamp).saturating_add(crate::VAA_AUCTION_EXPIRATION_TIME);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to wait 2 hours before we're able to close the auction account? Isn't the fact that it has been Settled sufficient?

It would be nice if we were able to close auctions in the same transaction where we settle them. In order to do that with the current implementation, we would need to wait for almost two hours which we cannot afford to do as we want to get our funds back as soon as possible to optimize their utilization.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This window exists so an auction cannot start using the same VAA within that arbitrarily long window. This duration can be tightened up in the future with a matching engine upgrade, though.

Reference:

// Check to see if the deadline has expired.
let deadline = order.deadline();
let expiration =
i64::from(fast_vaa.timestamp()).saturating_add(crate::VAA_AUCTION_EXPIRATION_TIME);
require!(
(deadline == 0 || curr_time < deadline.into()) && curr_time < expiration,
MatchingEngineError::FastMarketOrderExpired,
);

@a5-pickle a5-pickle merged commit 3ddcbdd into wormhole-foundation:main Feb 4, 2025
6 checks passed
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.

None yet

3 participants