r/civeconomics • u/cbau • Sep 07 '20
r/civeconomics • u/cbau • Nov 24 '17
On whether or not to use obsidian to protect shop chests
Shopkeepers must make an effort to protect their chests from raiders. Two main options are available to them when upgrading defenses: to split their goods across more chests, or to make it take longer to break into existing chests.
For this analysis, I'm going to use numbers from CivClassics, but the calculations are similar across servers. In CivClassics, reinforcing a block with a diamond makes it so that an attacker must break it 2000 times to break the block, and reinforcing a block with iron makes it so an attacker must break it 150 times to break the block.
Given a hardness of 0.15, it takes 75 minutes to break one diamond-reinforced obsidian (DRO) block using a Diamond E5 pick, and 5 minutes to break a diamond-reinforced chest using a Diamond E4 Axe. 1 So if we can use fewer than 15 (75/5) DRO to force an attacker to break one DRO block to access a chest, than it's more economical to use DRO than additional diamond-reinforced chests.
I was able to produce only one design that used fewer than 15 blocks, but it requires a bastion (a special block which disable places new blocks in area) to work: https://imgur.com/e7V6tdk. It uses 14 blocks at ground-level and 13 at bedrock. The basic idea is that if a player pops the chest, the items will just fall inside the container. An attacker can retrieve them if he can place blocks inside the container, which will force them out. However, if the container is protected by a bastion and the attacker can't place blocks, there's no way for them to retrieve the items without also breaking an obsidian block.
Using the same analysis as for diamonds, we can see it's not cost-efficient to defend iron reinforced chests with iron-reinforced obsidian (IRO). It takes 675 seconds to break IRO, and 45 seconds to break an iron-reinforced chests, so it's only economical again if we can use fewer than 15 IRO blocks, but we just showed we can't unless there is a bastion.
Is it economical to use IRO to defend diamond-reinforced chests? An effective IRO cage would add 675 seconds of protection. Since a diamond-reinforced chests takes 300 seconds to break, than as long 2.25 (675/300) diamonds can obtain enough iron for the IRO design, then it does make sense to use an IRO cage. At present, for 2.25 diamonds you should be able to obtain 20-40 iron in most places on the server. (The main consideration of the shopkeeper then will be space efficiency.)
Here's the cross-section of a 22-IRO design to protect a double chest: https://imgur.com/47mRiB6. It has some interesting features. The attacker cannot open the chest because of the two obsidian blocks above it. If they try to break it, the items will fall into the area below. The attacker can't force them out because of the trapdoors (you can also use buttons here). The trapdoors in the front exist to ensure when the chest pops that no items are launched forward, since when a chest pops it shoots item in all directions. An attacker could remove the front trapdoors to have a chance at getting some of the items, but it's still small. You can also make this access tunnel longer with more trapdoors, but each lengthening adds 4 IRO and one iron trapdoor.
Some other design notes:
I have had some difficulty with many designs with items glitching out of the cage instead of falling down when I pop the chest. I don't understand why it happens, so I don't know how to fix it.
I tried using lava in some designs, but it's usually possible to remove with a bucket since chests do not form a solid edge with the blocks they are next to. In the 22-IRO design above you can place lava below the trapdoor and replace them with buttons, but since the attacker will already be removing IRO anyway, if they know there is lava it won't be any help.
I also tried using pistons, but pistons cannot move obsidian. If they could, an interesting design might completely conceal the chest when an attacker is close by, which can be detected by a jukebox. If the server used the CastleGate plugin, this would be possible.
Hay blocks can be reinforced and aren't broken any faster by tools than by hand. They take longer to break than any other block beside obsidian though. Coal blocks are also an interesting choice- they take as long to break as iron doors/bars/trapdoors, but are probably cheaper.
Also, it's important when making chest defense designs that they do not share walls. Otherwise, the attacker only has to pay the cost of breaking the defense once to access all the chests instead of once per chest.
r/civeconomics • u/cbau • Nov 29 '19
I have been installing Vending Machines along the nether highways to earn some shekels. (map art)
r/civeconomics • u/cbau • May 31 '18
How factory recipes hurt trade
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:
Gather it yourself
Trade for it
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:
Recipes that generate a good which is impossible to find on the server (e.g. bastions, XP)
Recipes that provide an alternative to vanilla recipes
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 • u/cbau • Feb 08 '18
Mutlisig vaults
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:
If the courier and merchant agree the job was done correctly, they can unlock the deposit and return it to the courier.
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.
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:
No two adjacent blocks may be reinforced by the same party
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.
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.)
We can generalize our definition like this: To construct an X-of-Y multisig vault, the vault must satisfy the following properties:
All paths from the edge to the center must use at least X colors, ideally in equal proportion.
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.
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 • u/cbau • Jun 01 '18
Blocks that allow for compact shop windows
r/civeconomics • u/cbau • Aug 24 '19
How to implement an orderbook
An orderbook lets people 1) place orders for trades they want to do, and 2) fill any outstanding orders.
For example, Alice may place an order "Buy 1 diamond for 10 iron". Then Bob can come by an hour later, see the order, and think it's a good deal, so he sells 1 diamond for 10 iron. Alice can then come back and collect her 1 diamond.
Using ItemExchange rules, we create chests in-game that let people place orders for pairs of items. See this diagram. X and Y can be any two items. A "TOKEN" is a Secure Note that must not be reused anywhere else.
You can implement an orderbook by creating multiple of these chests for ranges of orders (e.g. 1 Iron -> 1 Diamond, 2 Iron -> 1 Diamond, ..., 50 Iron -> 1 Diamond), and their reverse (e.g. 1 Diamond -> 1 Iron, 1 Diamond -> 2 Iron, ..., 1 Diamond -> 50 Iron).
Why is this useful?
The person who implements the orderbook requires minimal upfront capital (just chests, reinforcement materials, and a printing press)- they don't need to actually sell anything or risk any capital by holding inventory in shop chests. (This is especially nice if you want to facilitate trading of rare resources you don't have in large supply.)
People in the city in which this is implemented will be able to see market prices AND the supply and demand for item pairs.
Traders can place orders without having anyone immediately available to fill that order. This is nice if you only want to buy/sell items at certain prices, and don't mind waiting for the market to reach that price.
This expands the number of opportunities traders can arbitrage. It's risky to buy items in other cities even if they are at good prices if you aren't sure they will sell in your city. But if you can see the demand in your city, you can do so with minimal risk. This means more stuff will get traded. This is good for traders, who have more economic opportunities, and for people who live in a city, because they'll get more cheap items.
Issues:
You need unique each tokens for each type of order. This is time-consuming.
It requires a little knowledge to understand how to use, because many people might not understand why they would want to trade items for tokens.
It would be difficult for people to actually see supply and demand if they have to check every shop chest. It would be valuable to connect each chest to a lamp which turns on when an order is placed and turns off when the order is cancelled or filled.
Other:
You probably want to charge fees to compensate for the investment. There are many ways to do this so I don't describe how here.
I think this would only be worth constructing in a city with a large population and where people enjoy trading. It requires some organization and investment to build on a large enough scale where it would be useful.
ItemExchange lets us implement simple state machines. We might be able to use that to design other useful things.
r/civeconomics • u/cbau • Oct 25 '19
This is real: W.L. Pierce Hospitality, Ltd. offering advanced self propelling minecarts that can run on glass pane at sky block 250d for patent
r/civeconomics • u/cbau • Jan 09 '19
Connect snitches with redstone to quickly spot disruptions
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 • u/cbau • Oct 24 '19
Working Birch Farm Bot (oft requested, rarely seen)
self.civclassicsr/civeconomics • u/cbau • Jun 15 '17
How to set up a bank?
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:
How do you avoid getting robbed? Is an obsidian bunker good enough?
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?
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.
Is there demand for loans? I think if bulk trading takes off, probably.
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.
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 • u/cbau • Mar 24 '18
How to insure goods you want to ship
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 • u/[deleted] • Jun 16 '17
Hiya
I started a valuations firm on Devoted for calculating GDP and the worth of companies but it didn't gather much interest. I'm a bit of an economics-wonk and thought this sub was interesting, I'm hoping civclassics develops some sort of economic system rather than just bartering ores and ingots.
r/civeconomics • u/cbau • May 12 '18
Ender Pearls enable raiders to bypass many obsidian defences
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:
Hopper design 1 and Hopper design 2 in On preventing exchange-chest grief.
Design 1 in On whether or not to use obsidian to protect shop chests. (I've seen variations of this in Mount Augusta.)
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.
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 • u/cbau • May 09 '18
LordofMarzipan's Centre For Children Who Can't Protect Their Stuff Good And Want To Learn To Do Other Stuff Good Too
r/civeconomics • u/cbau • Dec 07 '18
How big is the world supply of diamonds?
r/civeconomics • u/cbau • May 12 '18
Breaking a chest without appearing on snitches
Yesterday, andrewboskovic stole 64 stacks of emerald blocks from Yoahtl at their shop in Shopside.
The method of attack is interesting. He broke the reinforcements using one account (andrewboskovic), and then broke the chest using another account (YeyueMing).
This is pretty concerning. It suggests there may be ways to break a shop chest without appearing on snitches.
In this case, both happened sequentially, so it was simple to link the two accounts. A more sophisticated attacker may damage the reinforcements, wait a couple days, and then attack with an alt.
It's also possible to have no log of any blocks broken. If creeper eggs are available in a server, an attacker can break reinforcements, spawn a creeper, and then have it explode to pop the chest without a snitch log. In servers without creeper eggs, it may be possible to lure a creeper over. Alternatively, if the shop is in an area that is not snitched except by the shop, the attacker could create a small TNT cannon to destroy the shop chest.
This attack can be prevented by checking reinforcements periodically, however that seems time-consuming especially if your shops are distributed across the world.
We still have methods to make this attack impractical. One, we can limit the maximum value we store in shop chests to make it not worth an attacker's time. Two, we can protect the chest with obsidian. Obsidian is blast-resistant, so neither explosion technique will work, though using an alt is still possible.