This change adds asteroid-level auction behavior for expired prepaid lot leases, focused on lots that contain buildings. Empty lots, and lots whose LotUse is a ship rather than a building, are treated as ordinary expired/available lots and do not enter the auction flow.
Each asteroid has PrepaidAgreementAuctionSettings keyed to the asteroid, not to individual lots. The settings are:
mode: MANUAL or AUTOgrace_period: seconds before the descending auction beginsDefaults:
MANUAL07 days168 hourly steps1,000,000,000,000 SWAY1 SWAYThe auction price uses a precomputed hourly table, not a continuous formula. This keeps the on-chain value exactly reproducible by the JavaScript SDK. The table starts at 1 trillion SWAY, descends over 168 hourly steps, and remains at 1 SWAY after the 7-day decline completes.
Manual mode is the default. When a lease expires on a lot with a building, the lot effectively remains in an indefinite grace state until the asteroid controller manually starts an auction.
The asteroid controller can call StartPrepaidAgreementAuction for an expired building lot. This creates a PrepaidAgreementAuction on that lot with a start_time. The auction price is then based on time elapsed since that manual auction start.
The asteroid controller may cancel an active explicit auction with CancelPrepaidAgreementAuction.
In auto mode, expired building-lot leases do not require an explicit auction component to be created. The auction is implicit once the lease expires.
Pricing is based on elapsed time since the expired lease’s end_time, plus the asteroid’s configured grace_period. During the grace period, the auction remains at the maximum price. After that, it descends according to the fixed hourly table.
The existing ExtendPrepaidAgreement flow now handles expired lease renewal rather than adding a separate renewal system.
After expiry, the former lessee or current building controller may renew the lease. If renewing after a lapse, the payer must cover both:
Renewal clears any active auction for that lot and updates UseLot to the renewing crew.
A third party can create a new prepaid lease on an expired building lot only through the auction flow when auction conditions apply.
Auction proceeds are split as follows:
The lapse cost is calculated from the expired lease’s rate and the time since expiry, rounded up by hour.
The asteroid controller may repossess a building on an expired target lot. RepossessBuilding transfers building control and clears UseLot when the asteroid controller performs the repossession. If there is an explicit active auction, the client can include CancelPrepaidAgreementAuction in the same multicall.
The implementation includes tests for:
Please find initial discussion here: https://discord.com/channels/814990637178290177/1479315199541383390