buy(minAmount,maxAmount,destination,expiryEpoch):amount,cost
Allows any user to purchase POWER token inflation of inactive participants.
Reverts if currentEpoch>expiryEpoch
Reverts if minAmount OR maxAmount are equal to 0
Calculates the amount for purchase as max(available,maxAmount)
Reverts if the available amount is less than minAmount
Calculatescost for purchase
Transferscost of CASH tokens from msg.sender to Vault
Mintsamount of POWER tokens to msg.sender
Returns(amount,cost).
markNextVotingEpochAsActive()
Reverts if not called by StandardGovernor
Sets target inflated supply for a next voting epoch.
markParticipation()
Reverts if not called by StandardGovernor
If msg.sender voted on all proposals in the current epoch:
- Inflate their voting power
- Add inflation to totalSupply of POWER token.
setNextCashToken(amount)
Reverts if not called by StandardGovernor
Saves value of next cash token for starting next Auction with new Cash token.
amountToAuction()
Returns the total amount of tokens available for the auction:
- If epoch is Voting epoch, return 0
- If epoch is Transfer epoch, return targetSupplyātotalSupply.
getCost(amount)
Returns cost in CashToken per amount in POWER token.
targetSupply(amount)
Returns target supply of POWER token if all POWER inflation is minted (i.e. was auctioned of).