function tokenPrice() public view returns (uint256)
Calculates the average price of each token from all commitments.
function priceFunction() public view returns (uint256)
Returns auction price in any time.
function clearingPrice() public view returns (uint256)
Returns the current price of the token. The current price is proportional to the total period of the auction and the current time elapsed.
function totalTokensCommitted() public view returns (uint256)
Calculates total amount of tokens committed at current auction price.
function calculateCommitment(uint256 _commitment) public view returns (uint256)
Calculates the amount able to be committed during an auction.
function auctionSuccessful() public view returns (bool)
Returns True if token price is greater or equal to the clearing price.
function auctionEnded() public view returns (bool)
Returns True if auction is successful or auction time has ended.
function finalized() public view returns (bool)
Returns True if auction is finalized.
function finalizeTimeExpired() public view returns (bool)
Returns true if 14 days have passed since the end of the auction.
function tokensClaimable(address _user) public view returns (uint256)
Returns number of tokens user is able to claim.
function getBaseInformation() external view returns(address token,uint64 startTime,uint64 endTime,bool finalized)
Returns basic information: auction token, auction start time, auction end time, auction status
Init functions can only be called once
function initAuction(address _funder,address _token,uint256 _totalTokens,uint256 _startTime,uint256 _endTime,address _paymentCurrency,uint256 _factor,uint256 _minimumPrice,address _operator,address _pointList,address payable _wallet) public
The address that funds the auction
The address of the token to be auctioned
The total number of tokens for auction
Auction start time
Auction end time
The currency the hyperbolic auction accepts as payment. Can be ETH or token
Inflection point of the auction
The minimum auction price
Address that can finalize auction
Address that will manage auction approvals
Address where collected funds will be forwarded to
function commitEth(address payable _beneficiary,bool readAndAgreedToMarketParticipationAgreement) public payable
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.
function commitTokens(uint256 _amount,bool readAndAgreedToMarketParticipationAgreement) public
Buy Tokens by committing approved ERC20 tokens to this contract address. Requires Market Participation Agreement.
function finalizeAuction() public
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.
function withdrawTokens() public
If the auction was successful it transfers the claimed tokens to the buyer. If not successful sends the funds back to the buyer.
function cancelAuction() public
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.