Skip to content

Create auction contract for exchange contract family #9

Open
@cmickeyb

Description

@cmickeyb

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions