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

✨ Auction Round Improvements #447

Open
wants to merge 1 commit into
base: 01-27-refactor_cleanup_credentials_serialization
Choose a base branch
from

Conversation

JuaniRios
Copy link
Contributor

@JuaniRios JuaniRios commented Feb 5, 2025

What?

Improve the auction system to achieve the following goals:

  • No limit on the amount of bids per project or per user
  • Early releases of failed bids so they can bid again
  • Make extrinsics as light-weight as possible
  • Avoid limiting min and max tickets

Why?

  • We removed the other funding rounds and were left with only auction.
  • We also were using a bucket system when the initial system was designed for a free pricing auction
  • It was time to go back to the drawing board and see if we could optimize things

How?

Mark I

We achieved infinite bids, but had to bound ticket sizes so the total amount of winning bids was known. We would process only the winning bids in the funding end transition and store the cutoff. Any bids after the cutoff were assumed rejected.
Main problem was that you couldn't release your bid early to bid again if it was rejected.

Mark II

Infinite bids, and less strict bounded ticket sizes. Instead of processing the winning bids at the end of a project, each bidder would need to process the bids they would kick out at the moment of bidding. Any bids not processed were assumed accepted.
Here we now allowed releasing your bid early since the processing was done after each bid and not at the end. But still the ticket sizes were too strict (min 100USD max 100k USD) because we had to limit the total number of bids one had to process when oversubscribed.

Mark III

Here we solved both the ticket sizes (min 10, max unlimited), and the releasing bid early.
Bid extrinsics were now very light weight as well.
We now processed bids that were outbid in a separate extrinsic which has to run during the auction round. This is called either by a user, or by the on-idle hook.

Every new bid made from the second bucket onwards was considered to be outbidding an existing bid, so we stored that amount in storage, and then a new extrinsic would look at this storage and if theres any tokens outbid, start reading the bids in order of rejection.

To know the order, we have a new map storing the bucket price to starting and ending bid id.
The processing goes from lowest to highest bucket price, and inside the bucket from highest bid index to lowest.

Testing?

Several tests written and benchmarks modified.

Copy link
Contributor Author

JuaniRios commented Feb 5, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@JuaniRios JuaniRios force-pushed the 02-05-auction_round_improvements branch from 7414bf9 to 3d334e6 Compare February 5, 2025 16:13
@JuaniRios JuaniRios changed the title Auction Round Improvements ✨ Auction Round Improvements Feb 5, 2025
@JuaniRios JuaniRios self-assigned this Feb 5, 2025
@JuaniRios JuaniRios requested a review from lrazovic February 5, 2025 16:15
@JuaniRios JuaniRios marked this pull request as ready for review February 5, 2025 16:15
@JuaniRios JuaniRios force-pushed the 02-05-auction_round_improvements branch from 3d334e6 to b16a2f1 Compare February 5, 2025 16:29
@JuaniRios JuaniRios changed the base branch from 01-16-funding_rounds_simplification to 01-27-refactor_cleanup_credentials_serialization February 5, 2025 16:29
@JuaniRios JuaniRios force-pushed the 02-05-auction_round_improvements branch from b16a2f1 to ede7645 Compare February 5, 2025 16:38
This was referenced Feb 6, 2025
@lrazovic lrazovic force-pushed the 01-27-refactor_cleanup_credentials_serialization branch from f61a62d to 95583d0 Compare February 11, 2025 10:35
@JuaniRios JuaniRios force-pushed the 02-05-auction_round_improvements branch from ede7645 to 9686d17 Compare February 11, 2025 13:26
@JuaniRios JuaniRios force-pushed the 01-27-refactor_cleanup_credentials_serialization branch from 95583d0 to e3c2999 Compare February 11, 2025 13:27
@lrazovic lrazovic force-pushed the 01-27-refactor_cleanup_credentials_serialization branch from e3c2999 to e46808c Compare February 11, 2025 14:37
@lrazovic lrazovic force-pushed the 02-05-auction_round_improvements branch from 9686d17 to 21220b2 Compare February 11, 2025 14:37
@lrazovic lrazovic force-pushed the 01-27-refactor_cleanup_credentials_serialization branch from e46808c to ecc1d3d Compare February 11, 2025 14:39
@lrazovic lrazovic force-pushed the 02-05-auction_round_improvements branch from 21220b2 to d5880dd Compare February 11, 2025 14:39
@JuaniRios JuaniRios force-pushed the 02-05-auction_round_improvements branch from d5880dd to ec99d8a Compare February 12, 2025 12:15
@JuaniRios JuaniRios force-pushed the 01-27-refactor_cleanup_credentials_serialization branch from ecc1d3d to 2139407 Compare February 12, 2025 12:15
@JuaniRios JuaniRios force-pushed the 02-05-auction_round_improvements branch from ec99d8a to e499ad2 Compare February 13, 2025 14:50
@JuaniRios JuaniRios force-pushed the 02-05-auction_round_improvements branch 2 times, most recently from 18720a2 to b44dd90 Compare February 17, 2025 09:46
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.

2 participants