Smart contracts
Money and items live in six contracts on Ethereum mainnet. The website and the API never hold user funds: transactions go straight from your wallet to the contracts.
Overview
| Contract | What it does | Address |
|---|---|---|
| DacityCoin | The $DCTY ERC-20 token, with the launch reserve logic. | 0x88f6C36028b40aAC445BEbc080667b534d225ff3 (live at launch) |
| DacityItems | The ERC-1155C item collection: fixed copies per item, metadata and transfer rules. | TBA |
| DacityStore | Sells new items at a fixed $DCTY price and sends every payment to the farm treasury. | TBA |
| DacityMarketplace | Item resales in $DCTY, with the minimum fee sent to the farm treasury. Has no owner. | TBA |
| FarmTreasury | Holds the farm's $DCTY and only pays signed farm redemptions, within a daily cap. | TBA |
| DonationVault | Holds each channel's donations and releases them to the wallet linked to the channel. | TBA |
| Streamer boosts | Receives the $DCTY streamers pay for boosts and sends it to the farm treasury. Design TBA. | TBA |
Dacity also relies on public contracts it does not control: the Uniswap V2 router and pair, the Limit Break Creator Token Transfer Validator that enforces the item transfer rules, and Multicall3 for batched reads.
How they connect
- Buying: your wallet pays the Store in $DCTY; the Store forwards the payment to the FarmTreasury and asks DacityItems to mint the copies to you.
- Reselling: the Marketplace moves the item from seller to buyer, pays the seller and sends the fee to the FarmTreasury.
- Boosting: a streamer pays a boost in $DCTY, and the payment goes to the FarmTreasury.
- Donating: the DonationVault pulls the items and $DCTY from the sponsor and records them under the channel.
- Farm redemption: the FarmTreasury checks a signature from the Dacity server and pays the difference between your farmed total and what you already redeemed.
- Leftovers: $DCTY sent to the DonationVault outside of a donation can be forwarded to the FarmTreasury by anyone, so nothing gets stuck.
Off-chain services
| Service | Role |
|---|---|
| Dacity API | Lists live streams, runs the farm accounting (heartbeats, per-minute slices and farm balances) and holds the server key that signs farm redemptions and channel wallet links. It holds no funds and pays no gas. |
| Watcher | An independent process on a separate machine, with its own blockchain access and no keys. It reads contract events and alerts the owner about every wallet link request, signer or owner change and redemptions close to the daily cap. |
| Metadata | Item names and images, served as static files from metadata.dacity.club, separate from the website. |
Technology
| Piece | Choice |
|---|---|
| Language | Solidity 0.8.38, EVM Cancun, optimizer on with via-IR |
| Tooling | Foundry (forge, cast, anvil) |
| Libraries | OpenZeppelin Contracts 5.7, Limit Break Creator Token Standards 5.0 |
| Tests | Unit, fuzz, invariant, differential, security and mainnet-fork tests |
| Review | Internal Security Review before deployment (see Trust and security) |
| Source verification | TBA at launch |