Surplus auction
A surplus auction can be triggered whenever the BYC balance of the treasury exceeds the treasury maximum plus the surplus auction lot amount, and it will auction a BYC amount equal to the lot balance. The amount of CRT offered in the winning bid gets melted, and the BYC is returned to the bidder who won the bid.
Operations
The following operations can be performed on the surplus auction:
Keeper operations. For the start-auction operation, to start the surplus auction, a keeper executes the start operation on a surplus auction coin in eve state. At the same time, a payout coin and one or several treasury coins must be spent to transfer an amount of BYC equal to the surplus auction lot amount from the treasury to the payout coin. For the bid operation, bidding occurs by spending the surplus auction coin using the bid operation. A bid involves the bidder increasing the amount of CRT offered, specifying a target puzzle hash to which they wish to receive the BYC amount and supplying the current timestamp. If this bid is outbid by another user, the previous user is repaid their CRT amount. For the win operation, when the auction concludes, the surplus auction coin is melted, reducing the supply of CRT in existence, and in return, the winner receives the surplus auction lot amount from the payout coin.
Condition filtering and solution-parameters verification
The REMARK
, ANNOUNCEMENTS
, MESSAGE
, and CREATE_COIN
conditions should not be allowed to be directly passed via solution and returned without filtering. The function filter-conditions
is responsible for filtering out these conditions. It does not allow the CREATE_COIN
condition, which could lead to incorrect lineage.
The solution parameters are verified via the announcement assertions from the statutes coin.
Test coverage
Intended branches
Negative behavior