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

Create auction contract for exchange contract family #9

Open
cmickeyb opened this issue Oct 4, 2023 · 0 comments
Open

Create auction contract for exchange contract family #9

cmickeyb opened this issue Oct 4, 2023 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@cmickeyb
Copy link
Contributor

cmickeyb commented Oct 4, 2023

We have a fair exchange contract that provides two-party, well-defined asset exchanges. The old Gipsy exchange contract family also supported a multi-party auction.

The Gipsy auction API is described here:

Auction Contract

The auction contract handles a multi-party auction for transfer of
ownership of assets between ledgers. For example, Alice offers three
blue marbles in exchange for the highest possible number of red
marbles.

State Update Methods

  • (cancel-auction)
    Cancel the offer, must be invoked by the auction creator. May not be
    invoked once the auction is closed.

  • (cancel-bid)
    Cancel a bid, must be invoked by the object creator. May not be invoked
    by the auction winner once the auction is closed.

  • (close-auction)
    Close the auction to further bidding. Commits the highest bidder to the
    result of the auction. Must be invoked by the auction creator.

  • (confirm-close)
    Confirm that the auction is closed. Must be invoked by the highest bidder.

  • (initialize _serialized-asset-request _root-authority-key)
    Initialize the object, must be invoked by the object creator.

  • (offer-asset _serialized-authoritative-asset)
    Offer an asset, must be invoked by the object creator.

    • _serialized-authoritative-asset -- the
      serialized asset that will be offered for exchange
  • (submit-bid _serialized-authoritative-asset)
    Submit a bid to the auction with an escrowed assets, the offered asset
    must match the asset request including the minimum bid.

    • _serialized-authoritative-asset -- the
      serialized asset that is offered in response to the
      auction

Immutable Methods

  • (get-verifying-key)
    Get the verifying key for the contract object.

    • RETURNS -- an ECDSA verifying key
  • (cancel-auction-attestation)
    Get an attestation from the contract object that allows for release from escrow of offered assets.

    • RETURNS -- (dependencies signature)
  • (cancel-bid-attestation)
    Get an attestation from the contract object that allows for release from escrow of bid assets.

    • RETURNS -- (dependencies signature)
  • (check-bid)
    Get information about the bid submitted by the requestor.

  • (claim-bid)
    Create a claim that can be given to the issuer of the bid assets to
    claim ownership. Must be invoked by the auction creator.

    • RETURNS -- (old-owner-identity dependencies signature)
  • (claim-offer)
    Create a claim that can be given to the issuer of the offered assets to
    claim ownership. Must be invoked by the winning bidder.

    • RETURNS -- (old-owner-identity dependencies signature)
  • (examine-offered-asset)
    Get information about the asset that is offered for exchange.

  • (examine-requested-asset)
    Get information about the asset that is requested.

  • (max-bid)
    Get information about the current maximum bid.

    • RETURNS -- (asset-type-id amount)

auction.md

This would be a good first contract to develop.

@cmickeyb cmickeyb added enhancement New feature or request good first issue Good for newcomers labels Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant