# Economy

URL: https://zerodev.ca/docs/medusa/paid-modules/economy

> A server currency with wallets, banks, jobs, a daily streak, robbery and a shop.



Economy gives your server its own currency. Members earn it by working, claiming a daily reward and taking risks, keep it in a wallet or a bank, and spend it in your shop. The Games module uses it for casino bets, and Engagement pays winners in it.

## Wallet and Bank

Each member has a wallet and a bank. Wallet money pays for the shop, transfers and bets, but can be stolen with `/economy rob`. Bank money is safe, up to the **Base Bank Capacity**.

New members start with the **Starting Wallet Balance**.

## Earning

| Command               | Wait       | What happens                                                                                                                                           |
| --------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `/economy daily`      | 24 hours   | Pays the **Base Daily Reward** plus 25 for each day in your streak, up to 500 extra.                                                                   |
| `/economy work`       | 30 minutes | Pays your job's salary range. Without a job, pays a smaller random amount.                                                                             |
| `/economy beg`        | 5 minutes  | Pays a small random amount.                                                                                                                            |
| `/economy crime`      | 45 minutes | 60% chance to win 150 to 499. Otherwise you are fined 75 to 274.                                                                                       |
| `/economy rob <user>` | 1 hour     | 45% chance to take 20% to 59% of their wallet. Otherwise you pay them &#x2A;*Robbery Failure Fine (%)** of your wallet. Both wallets need at least 50. |

## Jobs

Jobs pay more the longer you work. Each one unlocks after a number of shifts.

| Job                     | Pay        | Shifts needed |
| ----------------------- | ---------- | ------------- |
| Fast Food Worker        | 60 to 130  | 0             |
| Courier Driver          | 90 to 180  | 5             |
| Artisan Barista         | 120 to 230 | 12            |
| Community Moderator     | 160 to 290 | 22            |
| UI/UX Designer          | 210 to 370 | 35            |
| Software Engineer       | 280 to 480 | 55            |
| Senior Surgeon          | 380 to 650 | 80            |
| Chief Executive Officer | 500 to 900 | 110           |

Use `/economy job action:list` to see them, `apply` to take one and `resign` to quit. You can change jobs once an hour.

## Shop

Set up the shop under **Configs > Economy > Shop**. Each item has:

| Field                  | What it does                                        |
| ---------------------- | --------------------------------------------------- |
| Item ID                | A short unique ID, such as `vip_pass`.              |
| Name                   | Shown in the shop.                                  |
| Description            | Shown in the shop.                                  |
| Price                  | Cost to buy.                                        |
| Sell Price             | What members get back when selling it.              |
| Role Given on Purchase | A role given when the item is bought.               |
| Stock                  | How many can be sold in total. `0` means unlimited. |
| Limit per Member       | How many one member can own. `0` means no limit.    |
| Message When Used      | Shown when a member runs `/economy use`.            |

The shop starts with three example items: VIP Pass, Mystery Box and Custom Title. Edit or remove them.

## Settings

**Economy Settings**

| Setting                  | Default | What it does                                           |
| ------------------------ | ------- | ------------------------------------------------------ |
| Enable Economy System    | On      | Turns the economy on or off.                           |
| Currency Name            | Coins   | Name of the currency.                                  |
| Currency Symbol          | Coin    | Emoji shown next to amounts.                           |
| Starting Wallet Balance  | 250     | Wallet for new members.                                |
| Base Daily Reward        | 250     | Daily reward before the streak bonus.                  |
| Base Bank Capacity       | 10000   | Most a member can keep in the bank.                    |
| Robbery Failure Fine (%) | 25      | Share of the robber's wallet paid on a failed robbery. |

**Balance Card**: the layout of the `/economy balance` image, edited with the canvas editor.

## Commands

| Command                                           | What it does                                                                                      |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| `/economy balance [user]`                         | Show a balance card.                                                                              |
| `/economy pay <user> <amount>`                    | Send wallet money to a member.                                                                    |
| `/economy deposit <amount>`                       | Move money into the bank. Use `all` for everything.                                               |
| `/economy withdraw <amount>`                      | Move money into the wallet. Use `all` for everything.                                             |
| `/economy daily`, `work`, `beg`, `crime`, `rob`   | Earn money, as above.                                                                             |
| `/economy job <action> [position] [user]`         | List, apply for, quit or see a job.                                                               |
| `/economy shop [page]`                            | Browse the shop.                                                                                  |
| `/economy buy <item> [quantity]`                  | Buy an item.                                                                                      |
| `/economy sell <item> [quantity]`                 | Sell an item back.                                                                                |
| `/economy inventory [user]`                       | Show owned items.                                                                                 |
| `/economy use <item>`                             | Use an item.                                                                                      |
| `/economy convert <amount> <from> <to>`           | Convert between real currencies and coins at fixed example rates. It does not change any balance. |
| `/economy manage <action> <user> [amount] [type]` | Add, remove, set or reset a balance. Needs &#x2A;*Economy ( Manage )** or Administrator.          |
| View Balance                                      | Right-click a member, then **Apps > View Balance**. Off by default on the **Commands** page.      |

`/leaderboard` has a board named after your currency and a **Daily Streak** board. The **Economy Events** log records transfers and shop purchases. Automation flows can read and change balances with the Add Coins, Remove Coins, Set Coins and Get Balance blocks.
