r/civeconomics • • Oct 24 '18

On Citadel & Redstone

9 Upvotes

The interaction between Citadel and redstone is often misunderstood, but how they interact can be described simply.

  1. Reinforced buttons do not send a signal unless someone on the group the button is reinforced to is within a certain range.

  2. Reinforced container blocks (e.g. chests, droppers) will not power redstone comparators

  3. Reinforced hoppers and droppers will not insert items into a container unless the container is reinforced to the same group

  4. You cannot attach any blocks (e.g. buttons, levers, cobble) to redstone component blocks (e.g. droppers, dispensers) reinforced to a group you are not part of. (The server will instantly remove them.) However, you can place blocks next to them.

  5. Doors, trapdoors, and fence gates, when reinforced to group G, will respond to redstone signals if and only if a person in group G is within 7 blocks of the block. All other redstone components, e.g. droppers, dispensers, hoppers, pistons, will respond to redstone power regardless of whether or not they are reinforced.

We can describe the behavior of reinforced blocks in a table (blocks which I haven't explicitly tested have question marks):

Item nameResponds to redstone power (group member in range)Responds to redstone power (no group member in range)
Activator RailYesYes
DispenserYesYes
DoorYesNo
DropperYesYes
Fence gateYesNo
HopperYesYes
Note block??
PistonYesYes
Redstone torchYesYes
Redstone lamp??
TrapdoorYesNo
TNT??

You can test the range in which doors open by creating a line of redstone connected to a reinforced door. Attach a button at the end and see how far you can go until the door no longer opens. According to Crimeo, the range is 8 blocks.

This behavior may at first seem undesirable. But without it, many inventions would not be possible or would require more complicated designs. For example:

  • Potato/stick dispensers

  • Public activator rails in rail stations

  • Traps

The downsides are the following:

  • Hard to construct droppers for potions or brewed drinks

  • Secure vending machines are more expensive to build (require a secure bastion)

  • Impossible or complicated to build a remote control gate (would require pistons instead of doors since doors cannot be remotely opened)

  • If you AFK in your house near your door, a person can place a button next to your door to enter and kill you

Securing non-door redstone components

A simple way to stop people from activating redstone components you don't want them to is to use a bastion. The bastion will prevent attackers from placing buttons or redstone dust placed next to your components.

In some cases, you can also limit who can activate non-door redstone components by physically blocking off any sources of redstone power.

Possible modifications

One possible idea to improve this might be to create a NameLayer permission where only people who are on a group can power reinforced redstone components. But this is at best impractical to implement. For a simple example, consider an AND gate where a person on the group and a person not on the group, both send a signal to the gate. Then ownership of the resulting signal would be ambiguous. Another simple example would be a system that uses a NOT gate which feeds into another NOT gate. The second NOT gate would have no way of knowing if the original signal was owned.

Another change might be to make all redstone components behave like doors, where, when reinforced, they only respond to redstone power when a person on the group is within range. However, that would make all the currently possible inventions using redstone impossible (e.g. public activator rails).

Thanks to Crimeo /u/crimeo for discussing this with me.


r/civeconomics • • Nov 21 '18

Securely managing wealth on behalf of a group

8 Upvotes

Consider Alice and Bob are the managers of a large store of wealth. Maybe they manage a state treasury or the deposits of a bank. Alice and Bob have three requirements for their store:

  1. To protect the wealth from raiders

  2. To prove to their stakeholders that the wealth is there

  3. To protect the wealth from each other

Putting the diamonds in a vault or dropchest doesn't work. While both methods reduce the threat of raiders, it fails (3) because either Alice and Bob could access the chest and run away with all the wealth. It also fails (2) because stakeholders have no way of seeing if Alice and Bob have all the wealth they claim to be holding, or if Alice and Bob are secretly moving it.

A better way to store the wealth would be as a mass of diamond-reinforced blocks (e.g. obsidian, hay bales, or wool). [1][2] This completely eliminates the threat of raiders (since reinforcements do not drop when the block is broken, and most blocks are not worth breaking 2000 times just to spite someone). It also lets stakeholders see that the wealth is there. However, it still fails (3) because either Alice or Bob could quickly destroy the blocks and run away with the wealth.

A simple method to satisfy all three requirements is to create a cube of diamond-reinforced blocks where every other block is reinforced to a group exclusively controlled by the other person, like so. Given this structure, Alice and Bob can only individually disassemble 50% of the surface layer of the cube. This means, except for trivially small cubes, Alice and Bob can only individually access less than 50% of wealth; to disassemble the entire cube, they must work together.

Consider for example a cube of 64 blocks- 4 blocks wide and tall. If Alice tried to disassemble the cube without Bob, she would only be able to break 28 blocks (44%):

= (4^3 - 2^3) / 2
= (64 - 8) / 2
= 28

However, as the cube grows, the percent of the total that anyone can access quickly decreases. For example, consider a cube of 512 blocks (8 wide and tall). A single person could access only 148/512 = 29% of the total.

= (8^3 - 6^3) / 2
= (512 - 216) / 2
= 148

A table of selected values follows below, showing the amount of blocks on the edge relative to the volume.

LengthVolumeInner volumeDifferenceDifference / Volume
1101100.00%
2808100.00%
46485687.50%
851221629657.81%
10100051248848.80%
1640962744135233.01%

Of course, if the cube is built at bedrock so that one face of the cube is hidden, the total accessible relative to the volume will be even smaller. (In addition, it will be protected against acid blocks.)

Conclusion

I've presented a method for cities or corporations to securely manage treasuries with minimal trust. While managers can run away with some wealth, the percent of the total is small, and shrinks as the amount of wealth grows.

At the same time, the managers of the wealth can easily access a reasonable portion of the total without needing to ask for permission from the other manager. We might call this sum a "hot wallet" (and the part that only be accessed by both people the "cold wallet"). If for some reason managers needed large hot wallets, you could always build multiple cubes.

Managers can prove the structure is built correctly by making stakeholders Members of the NameLayer group and giving them permission to query reinforcements without being able to modify them.

Some issues remain:

  • Either person can still run off with anywhere between near 50% and realistically 16% of the total wealth.

  • Stakeholders still need to trust the two managers to not conspire and run off with 100% of the total wealth.

  • Either person could burn (but not steal) half the wealth by simply refusing to give anyone access to it. (The other half can be recovered by acid-blocking the burned blocks.)

Still, this greatly reduces the amount of trust compared to storing diamonds in a dropchest or vault.

Future work

  • Can we build a cube with more than two people? The more people involved, the harder it is to commit a conspiracy. It may also present an alternative to multi-signature vaults.

  • Can we prove that a cube is the optimal shape?


[1] This only works because diamond is both useful as money and as reinforcement. In other servers where reinforcements are different from money, this technique would not be possible.

[2] Diamond reinforced wool takes 500 seconds (8 minutes) to break using shears. It's faster to break than obsidian (0.25 seconds vs. 9.4), and also doesn't damage an expensive tool. Diamond reinforced hay bales are similar, but can only be broken efficiently by hand, and take a whole 25 minutes to break.


r/civeconomics • • Sep 10 '19

A Minimal Secure Obsidian Shop Design

7 Upvotes

Introduction

In "On whether or not to use obsidian to protect shop chests", I argued that because it takes an attacker 15x longer to break a block of Obsidian than a Chest (using the best enchanted diamond tools), it's more cost efficient to store items in multiple reinforced Chests than to protect a single Chest with Obsidian blocks (that is, in such a way that an attacker must break 1 DRO) unless the shopkeeper can use 15 or fewer DRO.

In the same essay, I was able to come up with only one design that used less than 15 DRO. However it had two serious issues:

  1. Using an Ender Pearl, a player could attack the Chest without breaking any DRO. (See "Ender Pearls enable raiders to bypass many obsidian defences")

  2. The attacker could attack the Chest until it was no longer reinforced, and then open the Chest normally, since there were no DRO blocks above the Chest that prevented it from being opened once the reinforcement was removed

  3. The attacker could avoid breaking any DRO by breaking the chest, and then fish items out by using Sand to force the items out.

(In the wild, people tend to build shops in a sort of bunker shape encasing a chest in obsidian with a tunnel. This is more secure than the design above, but requires more DRO.)

In this essay, I show a new, simple, design that solves each issue and that uses only 13 DRO.

Design

The basic design uses a double chest and 13 blocks in a "tent" shape.

It exploits three facts:

  1. The shape of the structure make it impossible to view half of the double Chest from any angle

  2. If a double chest is broken, only items in the bottom half of the inventory drop to the floor

  3. Chests cannot be opened if a solid block is above them

For ease of description, let's call the part of the double chest closest to the opening the Outer Chest and the part farther from the opening the Inner Chest.

In this design, players interact with the Shop Chest by tapping the Outer Chest, which the player can view through the opening.

If an attacker destroys the Outer Chest, the Inner Chest remains untouchable and retains its inventory. Attackers can view the Inner Chest by stepping away from the structure, but they cannot interact it with from that distance. If they move closer, they cannot see the chest, and so they still can't interact with it. As long as only the Inner Chest contains items, the attacker gains nothing by breaking the Outer Chest.

Because of this, technically the Shop Chest is still secure even if it's not reinforced. However, to avoid getting griefed it's best to secure the Shop Chest anyway.

The design can be extended to work above bedrock with an additional 8 DRO (total 21 DRO). (In both cases, the design requires a Bastion and regular monitoring to protect against Acid blocks, but above ground it's easier to clean grief if the Bastion does get destroyed.) This is less cost-efficient, but may be worth it to some shopkeepers anyway.

Tradeoffs

Benefits:

  • Attackers cannot attack the chest without breaking DRO.

  • Can securely store 15x the value of a regular diamond-reinforced chest, or 7.5x the value of a regular diamond-reinforced double chest. Under CivClassic mechanics (Diamond = 2000 breaks), an attacker needs to spend 1 hour + 15 minutes using a Diamond E5 pickaxe to access the shop.

  • If the Shop Chest is reinforced as well, that adds another 2x. (In CivClassics, adds another 10 minutes if the attacker uses a Diamond E4/E5 Axe.)

  • Some high-value items cannot safely be sold in an exposed Chest. (See "On the maximum value to store in a shop chest".) This design enables them these items to be sold safely.

  • There is no need to worry about catching items that drop when the chest pops with a hopper or otherwise. (See "On preventing exchange-chest grief" for some example designs, which never really worked anyway because of a glitch with item positioning.)

Plus the benefits of using DRO:

  • If the shop is attacked and successfully broken into, you lose only 1 diamond (used in the reinforcement) versus 15.

  • Deters petty raiders who would spend 10 minutes and run off with a small amount of loot. Makes it more dangerous to steal from since you need to stay in the same place for over an hour.

Disadvantages:

  • Because it's built at bedrock, it absolutely requires Bastions. Without, an attacker can grief the shop by placing reinforced obsidian on the bedrock near the shop, which cannot be removed by acid blocks. This effectively forces you to have to rebuild the shop.

  • If the server allows acid blocks, an attacker can place them in the opening. This can be mitigated by using Stone Buttons attached to the bedrock. (Stone Buttons don't break more quickly when attacked by tools, making them effectively the strongest see-through block in the game.) However, it still requires the active monitoring of the structure.

  • The design is somewhat bulky (bounding box of 2x3x5 at bedrock and 3x3x7 above bedrock).

Misc:

  • There's no simple way to extend the design to have two layers of DRO, since making the tunnel any longer makes it impossible to interact with the Shop Chest.

  • In shops which generate profits automatically (such as iron-diamond exchange chests), a simple way to ensure outer chests never contain valuables would be to fill them with useless items such as Seeds.

Conclusion

The principle of storing items in only half of a double Chest and ensuring that the "Inner Chest" cannot even be attacked is a useful one for designing secure shops. It can be used to implement a cost-efficient 13 DRO shop at bedrock (or 21 DRO shop above bedrock) that requires an attacker to break at least 1 DRO to successfully steal from the shop.


r/civeconomics • • Dec 01 '19

Retraction: A Minimal Secure Shop Design

6 Upvotes

An attacker discovered and exploited a vulnerability that reduced the effectiveness of the design described in "A Minimal Secure Shop Design" so that they do not need to break any obsidian.

Image of the design: https://imgur.com/2380hqG

PLEASE UPDATE ANY SHOPS USING THIS DESIGN! I suggest using multiple diamond-reinforced chests.

I will post an explanation of the vulnerability in three or more days when I believe everyone has has time to update their shop.


r/civeconomics • • Oct 31 '18

Use promo codes to measure effectiveness of marketing campaigns

6 Upvotes

Quick thought to measure the effectiveness of marketing campaigns:

Using ItemExchange, it's possible to restrict trades to people on certain groups.

/ies group (or g) [group name] restricts an exchange to members of the specified Citadel group. If no group name is given, it removes the group restriction. This only works on input rules.

People often use this to offer better deals to friends or fellow citizens.

However, you could create a password-protected group, and use it to offer discounts to people who saw the code. Then you could measure two things:

  1. How many people saw the code and joined the group

  2. How people who saw the code actually purchased something (by counting exchanges done by these people tracked on your snitches)

Without a way to measure the effectiveness of marketing campaigns, it's hard to come up with a valuation for advertising offers. Is 1d a fair price to pay someone to mention your shop in their newspaper? Now you can actually know.

You can share promo codes across different mediums: billboards, maps, videos, SoundCloud interviews (e.g. BOX news, CivCraft radio), in-game newspapers, or reddit posts.


r/civeconomics • • Feb 08 '18

Mutlisig vaults

6 Upvotes

Use case

Consider that you, a merchant, want to hire a courier to transport goods from your location to another. You're concerned that the courier might run away with the goods, so you ask for a security deposit. But the courier won't directly give it you because the person he's delivering to might not actually buy the goods from him. You both consider using leaving having the courier leave a security deposit with a trusted mediator, but then there's a chance that 1) the mediator runs away with the security deposit or 2) the mediator loses the deposit to raiders.

The ideal solution here would be a multisignature (multisig) lock around the security deposit, such that if at least two parties agree, they can unlock the security deposit. That is:

  1. If the courier and merchant agree the job was done correctly, they can unlock the deposit and return it to the courier.

  2. If the courier runs away with or loses the goods and the merchant and mediator agree about this, the two of them can access the security deposit and make the merchant whole.

  3. If the merchant refuses to take back goods which failed to sell, the mediator can help the courier retrieve his security deposit.

In short, trustless escrow.

Construction of a mutlisig vault

The question then is how do we build multisig lock? The solution is to construct a vault where:

  1. No two adjacent blocks may be reinforced by the same party

  2. For every combination of parties, there must be a path from the edge to the center where only N = 2 parties have reinforced blocks, ideally in equal proportion.

https://imgur.com/aS0XOhl

https://imgur.com/Ylhy55V

https://imgur.com/0JzL2ON

In the above image, each block of wool represents a DRO block, and the color represents a party. (For example, green may be the mediator, red may be the merchant, and blue may be the courier.) It's clear that if any two parties agree to unlock the vault, the can remove blocks in such a way that they can access the chest.

Because each party has a path where only half the blocks are reinforced by some other party, if any party tries to defect and access the multisig vault alone, the will have to break L / 2 layers of DRO, where L is the total number of layers of DRO.

Generalization

The above vault is a "2-of-3" vault because it requires the consent of 2 of 3 parties to access the chest. It's simple to reduce this to a 2-of-2 vault, where the two owners of the vault must work together to access the chest by alternating who reinforces each block. One can build a 2-of-4 vault by adhering to the same properties, but I don't think it's possible to build a 2-of-5 vault because of the four-column theorem. (EDIT: It is possible, see image below.)

https://imgur.com/0l6HL10

https://imgur.com/a/Ycted

We can generalize our definition like this: To construct an X-of-Y multisig vault, the vault must satisfy the following properties:

  1. All paths from the edge to the center must use at least X colors, ideally in equal proportion.

  2. For every combination of X colors, there must be a path from the edge to the center consisting of only those X colors, ideally in equal proportion.

If any party tries to access the multisig vault alone, they will have to break L * (X - 1) / X layers of DRO to access the chest, where L is the total number of layers of DRO.

https://imgur.com/a/C6CED

Additional applications

  • Consider you start a business or town with a person who you don't yet trust, or you worry that even if things are good now, you may fight in the future. You both acquire many valuable resources, and both worry that the other may defect and run away with all of them, so sharing chests and doors isn't enough. You can build a 2-of-2 vault where both of you must be present to access the resources.

  • Anti-embezzlement. For a large town or business, you may build a 3-of-5 or 5-of-9 vault to prevent individuals from using resources inappropriately.

Future work

  • This can be used for any sort of contract where someone says they'll do something and you want to fine them if they don't hold up their end.

  • Because of the four-color theorem, it may be possible to prove there are only a range of X-of-Y vaults that are possible.

  • I intentionally omitted the condition that each party use an equal number of blocks, but this would be a useful property. There may be an additional constraint we can add that makes such multisig vaults simple to design.


r/civeconomics • • Aug 07 '20

Everyone knows about secret painting doors, but here are some simple designs that will make them harder to find

5 Upvotes

r/civeconomics • • Jan 19 '20

Railway Tunnel Styles and Features

Thumbnail
imgur.com
5 Upvotes

r/civeconomics • • Jan 15 '20

How to grow cocoa.

Thumbnail
imgur.com
5 Upvotes

r/civeconomics • • Dec 04 '19

Subway map via SignPicture mod

Post image
5 Upvotes

r/civeconomics • • Jan 09 '19

Connect snitches with redstone to quickly spot disruptions

5 Upvotes

Via https://www.reddit.com/r/civclassics/comments/adxqnq/how_to_properly_install_snitches/edli6hq/

Coventhia connects all of their snitches with redstone (powering snitches with a repeater) in a loop. If any of the snitches are broken, the circuit will break, and a light in their base will go out, indicating they need to investigate the source of the disruption.


r/civeconomics • • Oct 17 '18

Lessons from the CivClassics CME

5 Upvotes

The (CivClassics) Civ Mercantile Exchange is a commodity exchange that buys and sell commodities at different prices. This enables players to trade asynchronously and semi-anonymously. It also enables price discovery of the goods traded, since anyone can buy items they think are undervalued or sell items they think are overvalued. The result is a shop that is always stocked with fair prices.

In the post, I want to share some thoughts on what I thought went well and what didn't go well. I apologize in advance for the length, but I wanted to cover everything I ever considered so that anyone looking to expand on the concept can get a boost.

Value creation

The CME seems to have created a lot of value. It's hard to collect metrics on a civ server so I can't offer quantities. But people referenced the prices when making economics decisions, and it basically ended questions over what the diamond-iron exchange rate.

Many people also bought and sold from the exchange which implies they thought they were getting a deal, and meant that they were able to trades they otherwise could not have done.

I also spent some time every weekend for several weeks documenting the price of every good I was trading, which I posted to /r/CivCME. I don't know how valuable that actually was, but I think there is obviously value in a regular update on prices. Over time, this lets people see how prices are trending, and for people who are are distant from the exchange, it lets them see what market prices are at all.

One area I think I could have done better in was providing liquidity. By week 6, I was offering 21 different items, but I didn't have much to trade of any of them except arguably diamonds. (My original mission with the CME was to eliminate price checks for every item.) I think my effort would have been better spent reinvesting profits into a smaller set of say 5 items, but in larger quantities. Probably the most valuable people to attract are the power players, but they are only interested in trading if they can trade large quantities at a time. Additionally, people are only willing to travel if they can trade large quantities at a time.

(In fact, I think it would be interesting if we saw more specialized shops on the server that single single items in massive quantities. For example, a copy of the CME, but the only item it trades is sand. And it has a huge number of stacks of sand to trade, so that anyone interested in buying or selling sand knows there is one place they can go to get all the sand they'd need for months, and that that that place would be worth a 15 minute trip to.)

Another area I could have possibly done better is in encouraging people to set up chests with me. I had originally intended for anyone to be able to set up chests in the CME, and invited people to do so. The idea is that it would be easier to build up liquidity if multiple people were stocking chests. That would make it more valuable to traders, and so we'd all profit. Nobody took me up on the offer. I'm not sure why people were disinterested, but my main guess is that people just found other things more interesting rather than the idea being bad.

Value capture

I think I did a poor job capturing value.

The CME made money by capturing a spread on the goods it traded. A chest might buy diamonds at 10i and sell them for 11i. So every time we connected a buyer and seller, we'd make 1 iron.

This is great, because it requires no labor besides the initial set up to build wealth. It's one of the few, if only ways, you can invest wealth.

The problem is that the spread is sometimes too large for people to want to trade. Maybe someone would be interested in selling only to the CME only for 10.25i instead of 10i, or buying only for 10.75i instead of 11i. I made an effort to account this by selling 4 diamonds at time, offering 4 diamonds -> 41i or 43i -> 4 diamonds. However, by doing this I decreased the spread to 0.5i, which how much value I capture when I connect a buyer and a seller, and decreases the rate of return on capital.

Also, often times if someone thought 1 diamond was worth buying at 10i, they thought all diamonds were worth buying at 10i. That mean the CME often had a spread of 2i rather than one-- you had 11i -> 1 diamond or 1 diamond -> 9i, rather than 10i -> 1 diamond or 1 diamond -> 9 diamond.

In retrospect, I think the mistakes is that I was capturing value in an arbitrary way, rather than capturing based on the value I created.

If I were to do it again, I would do the following:

  • Buy and sell all goods in a "CME Token" which only I can produce

  • Sell CME tokens for iron, and charge a fee. e.g. Sell 98 tokens for 100 iron. And buy CME tokens 1 iron for 1 token.

This enables me to capture 2% of all volume that goes through the exchange.

One advantage of this is that this makes it easy to measure how much profit the exchange is generating. That in turn would make it easier to attract investors if I ever wanted to grow it.

One issue with this pricing structure is that someone could never redeem their CME tokens for iron and just use it to trade without fees. While possible, I don't think it's a serious issue since the only people who would do this would be people who actively traded on the exchange, and those people are creating value though by updating prices to reflect the best possible information.

A second issue with this pricing structure is that it makes it harder to open up the CME to people who might want to set up their own chests, since they would have to use CME tokens, but don't get a share of the profits. They would need to profit by using spreads, but I already showed that's not useful. This might be less of an issue if this other person was a large shareholder.

A third issue is that printing out enough tokens to make this work is extremely tedious. Once I realized that this was a better way to price things, I still put it off because sourcing enough paper to print all the tokens takes a long time, and then I have to update all the chests anyway.

One point to think about: you could combine spreads with this fee structure, or you can not. The two have advantages and disadvantages. If you remove spreads, the prices in the shop will be more fair and closer to the market value, since each chest would exchanges like: 10i -> 1X or 1X -> 10i. That means people can reverse trades if they regret their decision and would probably increase volume. If you keep spreads, you'd make slightly more profit, and you can also see which particular chests and prices are generating the most value by counting the profit in each chest. It's unclear to me which of the two is better.

Finally, there was an opportunity to monetize information about the prices on the exchange by selling books in-game containing the data. /u/Higgenbottoms published a weekly "MTA Price Guide" which actually sold pretty well proving the concept.

Security

The CME has been running for 5 months. In that time, the shop never lost any items or had any break-ins. A person tried to acid block the snitches once, but I was able to remove the acid blocks before any damage was done.

This can be partly attributed to the server doing a good job policing itself and removing the most dangerous players before I set up shop. So thanks everyone who took down Lexington!

I think this can be partly attributed to the design of the shop though. I calculated how much value per hour a person could generate diamond mining, and made sure the time spent cracking the chests was well below that value. If my calculation said a person could generate 100 diamonds per hours diamond mining, I aimed to reward an attacker with only 50 diamonds if they spent an hour cracking my shop. Unless someone had a personal vendetta against me specifically, they would be spending their time better elsewhere. (The downside to this is that it consumed a lot of diamonds in reinforcements. But there is no more secure approach than this.)

Marketing

Getting information out about the CME was important because it's a little confusing how it works, and people didn't always know it existed.

The location was less than ideal. I built the CME above a mall in the center of the city. The idea was that it would be convenient to travel to and easy to discover. I had talked with several other people when trying to select a location, but either they were unwilling to make a deal, or the location they could offer was worse than offer to build above the mall.

I also worked with Gobblin, an architect in the Maesters' Alliance, to design the structure to be made of glass so people could see that there were many chests inside, and to have the outside labeled with the letters "CME".

I also tried marketing the CME through the Weekly Updates, which I crossposted from /r/civCME into /r/civclassics.

Many people failed to discover the CME despite this effort. Shops on the ground floor of the mall selling the same items at worse prices got more traffic than the CME at times. Some people even complained they had checked all the shops in the city for items I sold and failed to find them, which meant even interested people were missing it.

I'm not certain how I could have done better given the circumstances, but if I had a second chance I might have pushed harder to have integrated it with the rail station or factory building.

Architecture

I had three goals for the physical building of the CME:

  1. It needs to be vertically repeatable (in case I filled up the building and needed more space)

  2. It should be reasonable secure. Most of the security comes from the chests, but it should also have a place to securely keep snitches.

  3. It should use affordable and easy-to-gather building materials. (Especially if we need to vertically scale.)

Gobblin, of the Maester's Alliance, helped me construct the current iteration which accomplished all of these goals. The final design is here.

Gobblin also did a good job using the outside walls to advertise the CME, and making the walls out of glass so that players could see there were chests inside to interact with. I really was impressed! (Also shoutout to DarkJesus who built the first iteration with a cool Etherium-influenced design.)

Fun creation

Had I completely succeeded, I think the CME would have made the server a lot more fun, at least for some players.

Hauling

Most people know the CME in MTA, but there is actually a smaller diamond-iron + XP-iron exchange in the heart of Yoahtl as well.

I didn't succeed here, but if the two exchanges had enough liquidity, it would have enabled people to earn wealth by moving goods between the two whenever the prices for a good diverged.

For example, the cheapest source of wool was sold by a player in Yoahtl. Nobody sold wool in MTA though. So if the CME traded wool in both cities, then whenever wool became more expensive in MTA than it was in Yoahtl, someone could go to Yoahtl, buy a bunch of wool, and resell it for a higher price in MTA.

This only works though if the expected profit is greater than or equal to the profit someone would have gotten by spending that time mining for diamonds. And it's only possible for someone to make that amount of profit if there is a massive amount of wool they can buy cheap in Yoahtl and sell high in MTA.

I think this would have been tremendous fun if it ever became possible. But the amount of resources required to make this work is enormous. It might become possible if the server population grows, and if it's possible to take out a loan. Alternatively, if cities saw the value in building exchanges, they might be able to raise money from their citizens.

Short selling

Assuming the CME had massive liquidity and that it were possible to take out loans, we could also see short selling emerge. If you think the price of diamonds will decrease you can borrow a bunch of diamonds and buy iron, and then when the price drops, buy back the diamonds with some extra profit.

Front-running

If someone announces they are building a vault, you know they will need large quantities of diamonds. You could buy them before they do for a cheap price. Then if they buy enough to drive the price up, you can sell the diamonds you bought at a higher price and make a profit.

History

The CME originally started out as a a diamond exchange underneath a general store I built the city of Aquila in Devoted 2.0. When I realized what I had built, I expanded it into an "ore exchange" trading every type of ore. The idea worked, but I only used rows of 5 chests at most, and did not have much stock. (There were also inklings of the idea back in Civ 3.0 which preceded Devoted. I had tried to establish a log/coal trade route between a city that had a lot of coal and a city that had a log of wood by using chests that both bought and sold the same item.)

When CivClassics came out, I repeated the idea and constructed an exchange in Commonwealth next to their factory building, but expanded the length of the exchange to use some ~20 chests instead of 5. That ensured that the price always stayed within bounds, so the exchange would always be buying and selling at useful market prices. (Sometimes if someone buys out all of an item, then people can only sell which is no good.) During the Western Alliance - Lexington war, I stopped playing for a while. When I came back, many players in Commonwealth had left or relocated out of the city where I had built the exchange. MTA was the new most active city on the server, so I rebuilt the exchange there with the help of Romec, who owned the mall.


r/civeconomics • • May 12 '18

Ender Pearls enable raiders to bypass many obsidian defences

5 Upvotes

Credit to /u/HiggenBottoms for pointing this out.

In the past several months I've presented several designs to improve the physical safety of shop chests. Many of them rely on the attacker being unable to access the dropped contents of a chest even if he breaks the chest, to force him to break a reinforced obsidian block to access the contents. However, with ender pearls most of these design are easily subverted.

Specifically, the designs in these posts should not be used:

  1. Hopper design 1 and Hopper design 2 in On preventing exchange-chest grief.

  2. Design 1 in On whether or not to use obsidian to protect shop chests. (I've seen variations of this in Mount Augusta.)

  3. The NOR-gate pulse limiter "L" shaped tunnel in Three designs to protect a shop chest using a pulse limiter. It must be modified to be an L in two directions.

  4. "ATMs"

Design 2 in On whether or not to use obsidian to protect shop chests can technically fail, but remains practical because the ender pearl is hard to get straight through the tunnel. If the attacker messes up, he will suffocate in the obby.

If possible, existing designs should try to add an obby tunnel. It may also be possible to use half-slabs to make pearling into a design more difficult.

The main take-away here is that when designing defenses we need to remember to consider pearls.


r/civeconomics • • Nov 25 '20

Small Brewing Shop.

Post image
4 Upvotes

r/civeconomics • • Aug 21 '20

"walls"

4 Upvotes

r/civeconomics • • Dec 03 '19

Use Cactus + Hopper at the end of a rail line to force people to rent Minecarts

Post image
4 Upvotes

r/civeconomics • • Jun 06 '19

So What's With Iron?

Thumbnail
self.civclassics
4 Upvotes

r/civeconomics • • Mar 13 '19

Discussion thread on paper currency

Thumbnail
self.civcraft
4 Upvotes

r/civeconomics • • Nov 21 '18

On using tokens in a shop

4 Upvotes

One interesting idea for advanced shop is to tokens, Secure Notes that can be bought and redeemed for money. For example, you might exchange 1 diamond for 100 "arcade tokens" or "MYSHOP dollars" that people can spend only in your shop, and that they can cash out later.

Tokens present some interesting possibilities and advantages:

  • You can sell items in smaller quantities. If you only want your shop to trade in diamonds, you can create more divisible tokens that people can use in your shop.

  • They simplify accounting. If everything in your shop is priced in tokens, and people have to buy tokens through one central chest, you can measure profits by just checking one chest rather than N.

  • You can charge exact fees/markups. For example, you could create an exchange chest that buys 1 diamonds for 100 tokens and sells 1 diamond for 100 tokens, and then charge a fee to purchase tokens (e.g. sell 99 tokens for 100 iron and sell 1 iron for 1 token-- this will get you 1% on all volume of the shop).

  • You can use tokens to increase sales if you don't mind being unsavory. For example, you can make it so that people can only buy tokens and can never sell them back- and then make them buy large quantities of tokens at once. If they have extra tokens, they will need to buy more stuff or let them go to waste.

  • You could combine tokens with promo codes to launch marketing campaigns and measure their effectiveness, without having to change every chest in your shop.

Tokens also have some pretty important disadvantages:

  • They are expensive to produce. They require Sugar Cane to make the Paper, and Logs for the Charcoal. On CivClassics, the total market cost at the time of this writing is about 100 per Diamond.

  • They create a single point of failure in the security of your shop. If you lose the Printing Plate, you need to reprint all the tokens. If the Printing Plate is stolen, you need to disable your shop before the thief can print tokens to spend in your shop, and then reprint all the tokens. And if you happen to get robbed while transporting tokens to your shop, you either need to accept the loss which is as good as money, or reprint all the tokens. (Most of these issues could be mitigated by simply putting the printing press factory in a secure room adjacent to your shop however.)

  • They confuse some people, and those people will just refuse to use them.

  • They double the amount of chests your shop needs. If you believe you can safely store say 10 diamonds worth of material in your shop chests, now you need your shop chest which sells the items (holding up to 10 diamonds worth of material), and a corresponding token chest (which holds tokens redeemable for 10 diamonds worth of material). If you don't have tokens chests holding enough tokens to buy everything in your shop, then you can't sell everything in your shop. So you need at least twice as many chests if you want to use tokens. That decreases the efficiency of capital since it requires more reinforcements, and also takes up more physical space.

My take is that tokens are not worth it. The disadvantages are large. And many of the benefits they provide can be solved by just trading items in larger quantities, which most people prefer anyway.


Many of these cons would go away if they didn't require Secure Notes. A "Debt" plugin could solve the issue, if you could for interact with virtual ledgers (associated with NameLayer groups) in the game through ItemExchange.


r/civeconomics • • Oct 08 '18

Create advertisement videos

Thumbnail
reddit.com
4 Upvotes

r/civeconomics • • May 31 '18

How factory recipes hurt trade

4 Upvotes

Transaction cost economics

Since skill only minimally affects how efficiently people gather resources, specialization is not a useful model for understanding why people trade. A better model is to compare transaction costs. If there are two ways to obtain a resource and one takes less effort than the other, then people choose the ones that takes less effort.

There are really only three ways to get things in the game:

  1. Gather it yourself

  2. Trade for it

  3. Use a factory recipe to produce it

Again, people will do whatever is the least effort.

Some resources are trivial to gather yourself. Dirt and cobble come to mind. It's always easier to supply yourself than to trade for it, unless you need them in very large amounts. So we never see these traded in markets.

Other resources are hard to gather yourself. The city of Etherium has used this to their advantage in botting obsidian. They sell it in shops at low prices, so it's always a better use of time to buy it than make it yourself. And obsidian we see traded in every major marketplace. And people who want obsidian will travel long distances to buy it, because it's so much easier than mining it by hand.

We also see this with Silk Touch picks. People can either buy a bunch of picks and XP and gamble with a spellbook for 20 minutes, or they can go to a shop and just buy one. Even if the price is high, it's still a deal because you directly get what you want without also paying for a lot of stuff you don't want.

How recipes affect transaction costs, and therefore trade

I'm going to distinguish between three types of FactoryMod recipes:

  1. Recipes that generate a good which is impossible to find on the server (e.g. bastions, XP)

  2. Recipes that provide an alternative to vanilla recipes

  3. Recipes that improve vanilla recipes

Recipes that generate a good which is impossible to find on the server create trade if and only if the effort of using that recipe is harder than trading for the generated resource. For example, in CivClassics Quartz blocks can be made by combining 64 smooth stone and 1 bonemeal, both of which are abundant, so you never see it in shops. On other hand, XP requires many different types of ingredients and making them efficiently is hard unless you know a lot about farming, have invested time into a farm, and have access to multiple biomes. So for most people it's easier to trade, and you see XP in shops in every major marketplace.

Recipes that provide an alternative to vanilla recipes always hurt trade, unless they are so expensive to use that nobody uses them. Consider a recipe that turns some number of X into some number of Y. If you have access to Y, you don't need the recipe, so it does nothing. If you have access to neither X or Y, you need to trade, so the recipe does nothing. But if you have access to X, you no longer need to trade, where if the recipe did exist you would have.

Recipes that improve vanilla recipes usually hurt trade. To see why, consider the following: If no recipe existed for X, there would be some boundary around each marketplace where people who live on that boundary would find gathering X and trading for X equally costly. Everyone within that boundary would find trading easier, and so trade for X, and everyone outside of that boundary would find gathering easier, and so gather X. If you then add a recipe which makes X easier to gather, then you shrink that boundary, so fewer people trade and more people gather.

I say "usually", because these recipes can improve trade if the cost of producing the factory or the cost of running them is high. For example, diamond pick factories are expensive, and so for most people, barring the factory being publicly accessible, they would prefer to trade for pics than make one themselves. Similarly, markets for hoppers, because the cost of running the recipe is high (256 iron for 16 hoppers) and people often need only one or two, but someone who runs the recipe can set the price so that transaction costs are lower if people buy than if they run the recipe and have to sell the excess. However, in practice, the admins of CivClassics set the config for most items so that it just makes things easier.


r/civeconomics • • Mar 24 '18

How to insure goods you want to ship

4 Upvotes

Traditionally, if Alice wants to ship goods with Bob, she gives her goods to Bob and threatens to hire bounty hunters if Bob steals them. But this is expensive for Alice. There's a chance she'll lose the goods forever if the bounty hunters can't find Bob, and if they do she still has to pay them the bounty. Or she could lose them if Bob dies or killed by a rogue. Unless she trusts Bob not to steal and to take adequate care to avoid accidents, most times this transaction can't happen and Alice has to transport all her goods herself, even if she'd prefer to do other things.

One solution to this is to ask the courier to put up money if he fails to deliver (that is, collateral). For example, say Alice want to ship 100D worth of goods. Bob is a courier and offers to transport them. Alice doesn't trust Bob, so Alice wants Bob to put up 100D in escrow. (They'll build a 2-of-3 multisig vault and give the third key to a mediator who they both trust).

If Bob has 100D, this works great. But if he doesn't, the transaction doesn't happen. (This might happen say if Bob is new, or if he is trying to group shipments together.)

Charlie is rich, trusts Bob, and likes to gamble. He hears about this, and offers to put up 100D as escrow for Alice, but tells Alice and Bob he wants a fee (say 2D) for assuming the risk, which they can split however they like. Alice really wants to do this deal, so she agrees to cover the fee. Alice and Charlie both find a mediator, Daniel, that they both trust and build a 2-of-3 vault around Charlie's 100D. The transaction happens.

Insurance fees

Calculating Charlie's fee is an interesting problem. The maximum fee is the profit Alice will make off the transaction. The minimum fee is based on how much Charlie trusts Bob. If Charlie really trusts Bob and thinks there is a 1% chance that he'll run away, then Charlie would be happy with 1D to take this bet. But if Charlie only partly trusts Bob and thinks there's a 10% chance Bob will run off, then he needs a minimum fee of 10D for this bet. (Of course, Charlie might charge more for the hassle or the value he provides.)

There could actually be a market for this. Alice could run a reverse auction for someone to insure her cargo carried by Bob. She asks all the bettors she knows what their fee would be, and works with whoever offers the lowest fee. Maybe the bettors create a chat room where they all hang out so that they can attract business.

Further thoughts

  • There is a risk here that Alice and Bob conspire against Charlie. Bob could pretend he lost the goods and force Charlie to pay out. Charlie needs to be aware of this risk.

  • I left this out, but Alice should not pay Bob immediately or promise to pay Bob. She should put the payment in escrow.

  • There is a risk that Bob transports the goods but the buyer, say Emily, refuses to pay on delivery. Alice should require Emily to put payment in escrow. Obviously Alice and Emily live far apart if Alice is paying for goods to be transported, so Alice will need a business partner near Emily to secure Emily's payment.

  • It's trivial to extend this so that goods are delivered by a certain date: you make a separate bet.

  • As a bettor, you would be interested in learning how trustworthy all the couriers are.

  • As a courier, you want to establish a trustworthy reputation, since you want bettors to charge lower fees to insure goods carried by you than the fees they charge for your competitors.

  • Couriers might want to partner with bettors in order to get more business for both.

  • There is an opportunity to make money as a mediator if you have or can build a lot of trust in your community and with merchants. (Not sure how you would do this though.)

Other examples of using escrow

What is described is only one particular example of what can be insured. You can use a similar technique for insuring other things. Here are some examples:

  • Someone wants you to dig a trench, so you make them put up the payment as escrow.

  • You want someone to build you a house with materials your provide. You make them put up collateral for the materials you provide, and you put the payment in escrow.

  • Someone wants to rent a Silk Touch pick without buying one. They pay you and put up collateral for the value of the pick.

  • You have no iron, but you think the value of iron will go down next week, but aren't 100% confident. You put up some diamonds as collateral to borrow iron for a week from a stranger and sell it. If the price goes down, you buy it back and return the iron plus a fee to the stranger. If it goes up you buy it back and lose the difference plus the fee. (If you think the price of iron would go up, you'd buy the iron instead.)

  • You want someone pearled and want to hire bounty hunters. You put up the bounty in escrow (so they know you're serious) and they put up some amount of money if they fail (so you know they're serious).

Again, any of these can be insured by a third party.


Admittedly, this all seems like a lot of work. I think there might be yet another business around this making this easy for people, for people who want to be "escrow agents". Instead of doing this all yourself, you give their payment/collateral to an agent you trust, and they handle the rest: finding a mediator, building the vault, working with the other person.


r/civeconomics • • Nov 28 '17

Three designs to protect a shop chest using a pulse limiter

4 Upvotes

It is possible to design a redstone circuit so that a shop chest only holds one item at any time. When a customer makes a purchase, a new item is dispensed from a second "stock chest". This limits the downside if the front-facing shop chest is broken, and also hides information about how many items are available for sale.

OR-gate off-pulse limiter

http://i.imgur.com/ZxdBf98.png

/u/adeadhead submitted a redstone circuit design a year ago that achieves this goal.

The way it works is simple. A redstone signal is sent to the hopper directly underneath the chest where the shop stock is held, preventing the hopper from pulling items from the chest above it. When a player makes an exchange with the shop chest, if there is a block behind the front face of the chest with a button on it, ItemExchange will send a redstone signal as if the button was pressed. The button feeds into a an OR-Gate Off-Pulse Limiter, which converts the 10-tick redstone signal from the button press into a 1-tick signal. That signal is inverted, so that the hopper is enabled for one tick, and can pull one item from the chest above it. A second hopper moves this item into the shop chest.

(This design can be combined with another redstone module by the same designer to move the profits from the shop chest into a more secure chest.)

This design is a great proof-of-concept, but it has three serious flaws:

  1. If an attacker breaks any part of the circuit that powers the hopper, the signal to the hopper will die, which will cause the hopper to transfer all items in the stock chest to the shop chest.

  2. The stock chest is in an awkward to position to defend with obsidian, which is important if you want to stock the chest with many expensive items.

  3. Because the redstone pulse essentially activates a button, it will be on for 10 ticks. However, the item will be dispensed on tick 1 and will be in the chest on tick 2. That leaves 8 ticks where if the user buys the newly dispensed item, no pulse will be sent to the hopper, and no replacement item will be dispensed, which breaks the machine.

Dropper-hopper pulse limiter

https://imgur.com/A5WhkMP

A simple fix is to use the above design, which uses a dropper-hopper pulse limiter. When the ItemExchange button activates, it sends a signal to the dropper which pushes an item into the hopper. On tick 1, the comparator will be off, allowing the hopper to pull an item from the chest above and push it into the shop chest. On tick 2, the hopper above the dropper returns the item to the dropper which ignores the remaining 8-ticks of signal.

This also has a more defensible position for the shop chest, which can be surrounded by obsidian blocks. By forming an "L" shape, the attacker cannot break the stock chest without first breaking an obsidian block. However, we must also defend the comparator since if it's broken, the hopper will transfer all the items from the stock chest to less defensible shop chest. That requires many additional blocks of obsidian around the other redstone components.

This design also does not solve the third issue, and it will break if a customer buys items too quickly.

NOR-gate pulse limiter

https://imgur.com/BKyG8Nq

A design which solves all three issues is shown above. It puts the stock chest at the top of an "L" shaped tunnel and encases it in obsidian (black glass), with hoppers connecting it to the shop chest. A redstone torch behind the top hopper ensures no items are transferred to the shop chest unless either the torch is destroyed or the block behind the torch is powered. Breaking any other part of the circuit will have no effect on the behavior of the hoppers. The torch is placed on an obsidian block, which protects it and the stock chest from attack.

https://imgur.com/KvVEWJQ

The redstone design to send a 1-tick pulse to the torch is simple and cheaply made. It uses a NOR-Gate pulse limiter which feeds into two redstone repeaters. These repeaters delay the pulse by 7 ticks. Combined with the three hoppers, it takes 10 ticks before an item is dispensed into the shop chest for purchase again, which ensures it will never malfunction.

Future work

One problem with this design is that customers can only buy one item at a time. If you want to sell stacks of items, there is no way to do that with this design. It would be useful if this design could be generalized to activate the hopper for N-ticks.

A further improvement on this would make it so that the hopper is enabled while the chest holds fewer than N-items. This would allow you to sell at multiple prices, e.g. 1 Diamond for 15 Iron or 2 Diamonds for 20 Iron. However, this is complicated by the fact that if an attacker ever got access to the shop chest they could drain the stock chest of items by removing items from the shop chest and waiting for the rest to transfer. (Assuming comparators can measure chests not on the same group and that hoppers can push items into a chest not in the same group.)

This design is also fairly large. I am not an expert on redstone, so there may be a way to optimize it to conserve space.


r/civeconomics • • Jun 15 '17

How to set up a bank?

4 Upvotes

I'm sure all of us have thought about how to set up a bank, but I've not seen any in 3.0 or Devoted 3. Has anyone thought about what it would take to make one work?

It seems like a number of issues would need to be solved before it could be viable:

  1. How do you avoid getting robbed? Is an obsidian bunker good enough?

  2. How do you avoid an inside job? Assuming you run the bank with other people, how can you put safeguards in place so nobody can run off the money without getting caught?

  3. How do you convince people to deposit money in your bank? Interest is probably worth it for many. It would be nice if there was a way to insure bank accounts too, similar to the FDIC, so people didn't need to worry about you running off with the money. Also, spending a lot of resources on the physical building can help reassure people that you're there to stay.

  4. Is there demand for loans? I think if bulk trading takes off, probably.

  5. Can we secure loans? With factories or land, probably. The state or bounty hunters needs to help with enforcing contracts. It may not be possible for personal loans, in which case we need a credit score.

  6. How do you set interest rates for borrowers and lenders?

I'm sure there are other issues I'm missing. Curious if anyone has seen a player run bank work before (I'm interested in exploring the ones in EVE), or anyone knows the history of financial services who could provide insight.


r/civeconomics • • Jan 28 '21

Automated crop harvesting with pipes

3 Upvotes