-
Notifications
You must be signed in to change notification settings - Fork 12
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
feat(auctions): add auctions api to IO classes #235
Merged
Merged
+1,347
−694
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 tasks
dtfiedler
added a commit
to ar-io/ar-io-network-process
that referenced
this pull request
Oct 23, 2024
Summary: Introduces and `Auction` object class that is used to store auctions on the `NameRegistry`. We should look towards using more of these classes to leverage some better static analysis and type enforcement on functions. The class is responsible for computing prices based on the initialization details (baseFee, demandFactor, etc.). Auctions are stored as instances of this class, and returned as simple table (excluding function) so clients can compute prices themselves. This initial implementation includes handler support for ANTs returning `permabuy` name registrations. In a separate PR we'll introduce Lease-Expiration-Intiated-Auctions where a name will go in to auction after the grace period has ended. Checklist: - [x] business logic (and docs) to create and store auctions in state with pricing information - [x] handler for `Release-Name` that allows integration with ANTs - [x] handler for `Auction-Info` to get auction information of a given name - [x] handler for `Auction-Bid` to submit bid to acquire name in auction and update arns registry - [x] unit tests with >80% coverage - [x] integration tests for all handlers - [x] update ANT source code to support `Release-Name` handler that forwards to this process - PR: ar-io/ar-io-ant-process#23 - [x] update [ar-io-sdk](https://github.com/ar-io/ar-io-sdk) to include auction types and APIs for auctions - PR: ar-io/ar-io-sdk#235 - [ ] add event data for auction creation and auction bids - WILL DO IN A SEPARATE PR ONCE E2E TESTING IN DEVNET HAS BEEN VALIDATED TODOs: - [x] storing prices in auction state impacts the handler response (`Data` ends up being an empty table - not sure if this is a bug in AO or we are hitting a memory limit). it also costs ~600KiB to store those values in state, which could bloat our memory when several auctions are in process. we could consider just storing the settings of the auction pricing in state, and use that to calculate prices when necessary (still have to create the table, but response doesn't need to contain it). need to think more about this and what is necessary for clients to be able to showing pricing charts. - we've modified to store the auction settings on the auction object, and then clients will compute the price with various parameters Here is the sequence diagram for a permabuy initiated auction <img width="794" alt="image" src="https://github.com/user-attachments/assets/8b1699e2-a764-4a7d-ad65-cafddfe66c19">
dtfiedler
force-pushed
the
PE-6656-auctions
branch
from
October 24, 2024 14:02
f6da424
to
90b08b4
Compare
value: intervalMs?.toString() ?? '900000', | ||
}, | ||
].filter( | ||
(tag): tag is { name: string; value: string } => tag.value !== undefined, |
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.
heh, neat
atticusofsparta
approved these changes
Oct 24, 2024
…isplay active auction
The `intervalMs` allows you to provided the space between price intervals.
Permabought names can be released by the ANT owner. They will go into auction and if a bid is received, it will be split between the owner at the time of the release and the protocol balance. Otherwise, the name will be returned and can be reregistered by anyone.
dtfiedler
force-pushed
the
PE-6656-auctions
branch
from
October 24, 2024 15:40
53fa714
to
b0d46d4
Compare
🎉 This PR is included in version 2.4.0-alpha.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated the
examples/vite
to show a chart for auction information using the read APIs.Related process PR - https://github.com/ar-io/ar-io-network-process