Hyperbolic Auction Smart Contract
Address
Read-Only Functions
Calculates the average price of each token from all commitments.
Returns auction price in any time.
Returns the current price of the token. The current price is proportional to the total period of the auction and the current time elapsed.
Calculates total amount of tokens committed at current auction price.
Calculates the amount able to be committed during an auction.
Returns True if token price is greater or equal to the clearing price.
Returns True if auction is successful or auction time has ended.
Returns True if auction is finalized.
Returns true if 14 days have passed since the end of the auction.
Returns number of tokens user is able to claim.
Returns basic information: auction token, auction start time, auction end time, auction status
init function
Init functions can only be called once
Name
Description
_funder
The address that funds the auction
_token
The address of the token to be auctioned
_totalTokens
The total number of tokens for auction
_startTime
Auction start time
_endTime
Auction end time
_paymentCurrency
The currency the hyperbolic auction accepts as payment. Can be ETH or token
_factor
Inflection point of the auction
_minimumPrice
The minimum auction price
_operator
Address that can finalize auction
_pointList
Address that will manage auction approvals
_wallet
Address where collected funds will be forwarded to
Buy a token
Use ETH to buy tokens. Checks the amount of ETH to commit and adds the commitment. Refunds the buyer if commit is too high. Requires Market Participation Agreement.
Buy Tokens by committing approved ERC20 tokens to this contract address. Requires Market Participation Agreement.
Finalize Auction
We can finalize the market auction if we have the required role or the time for auction has expired. If the auction is successfully finalized, the payment is forwarded to the specified wallet. If the auction is not successful, all the auction token is sent back to the wallet.
If the auction was successful it transfers the claimed tokens to the buyer. If not successful sends the funds back to the buyer.
Can call this function to cancel the auction if need be. Only the admin can cancel the auction. If the auction is finalized or fund is already raised, the auction can not be cancelled.
Last updated