Universal Exchange - Reldeam/Idle-Inc GitHub Wiki

Overview

The Universal Exchange (UE) allows players to trade resources and deeds using credit. Each offer (buy and sell) made to the UE incurs a small fee which is a percentage of the offer.

Selling Resources

A player can sell resources by choosing a resource to sell and setting both an amount of that resource to sell and a sell price per unit of that resource. The player must have enough of the selected resource to match the amount chosen to sell. Upon making the offer the resources are removed from the player's stockpile and the offer is placed on the UE.

The UE will automatically try to fulfil the offer by matching any buy offers for the same resource that are offering at or above the specified price. Sell offers may be partially completed this way if a suitable buy offer requests less units then the amount placed in the sell offer. Sell orders are priorities buy price first and then the time the offer was made second (with lower prices and older offers being priorities higher).

A player may cancel a sell offer at any time. If the sell offer is partially completed the player will receive the and credit (minus the fee) made along with the remaining resources that did not sell. Otherwise the player receive all the resources offered at no cost.

Buying Resources

A player can buy resources in a similar fashion to selling them. The player specifies which resource, how much, and at what price per unit of resource they would like to buy. The player must have enough credit to complete the offer when making it. Upon creating a buy offer the corresponding credit is debited from the player (which includes a fee equalling a percentage of the buy offer value).

The UE will automatically try to fulfil the buy offer by matching corresponding sell offers that are selling at or below the specified buy price. Buy offers are matched to sell offers from lowest sell price to highest. Buy offers may be partially completed this way if a suitable sell offer has less resources than the buy offer requires. Buy offers are priorities by the time the offer was made with older offers being priorities higher than newer offers.

When an offer is completed the buyer may also receive excess credit that was not required to complete the offer (this happens if there a sell offer that was matched with a price below the buy price).

A player may cancel a buy offer at any time. If the buy offer is partially completed then the player will receive any bought resources along with the remaining unused credit. Otherwise the player simply receives the unused credit (minus the fee).

Selling Deeds

If a player has more than one deed they may sell any inactive deeds they have on the UE. The player makes a sell offer by choosing an inactive deed and a price to sell it at. The offer is then made available on the UE. There is a percentage-based fee for selling a deed. The fee is added to the sell price and is simply deducted on a successful sale.

A player may cancel a sell offer at any time without inuring any fee.

While a deed is for sale it can not be activated.

Buying Deeds

A player may buy any deed that is for sale as long as they have less than three deeds and they have enough credit to make the purchase. Upon purchasing a deed the player can activate the deed and activate any facilities that were on the deed at the time of sale, even if the player has not researched the required technologies to build the facility themselves.