Contracts
Links and information about deployed CityCoin contracts.
Last updated
Links and information about deployed CityCoin contracts.
Last updated
More content will be added here following the mainnet deployments of the protocol outlined in CCIP-013.
The CityCoins DAO implementation is based on the Executor DAO, Ecosystem DAO, and other similar implementations on the Stacks blockchain.
The core concepts that make this possible are:
proposals are smart contracts that execute the described changes
the core (base-dao) executes proposals, the extensions define additional actions
ownership control happens via sending context
In order to achieve the structure and goals laid out by CCIP-013, the following DAO extensions provide functionality for each part of the CityCoins protocol.
Name | Summary | Description |
---|---|---|
The new DAO protocol will still utilize some of the legacy CityCoin protocol contracts, listed below.
In order to facilitate testing of the legacy CityCoins protocol migration to the new structure outlined in CCIP-013, the legacy CityCoins protocol is now deployed to testnet and activated for mining and stacking.
If you need testnet STX, MIA, or NYC for testing, reach out in the #path-forward
channel on Discord.
The accounts for MIA, NYC, and the DAO deployments are the same for mainnet and testnet, with each address version linked above.
The traits for the MIA/NYC protocol were deployed to SPSCW...DYQ11
on mainnet and the separate account/address ST1XQ...85ES6
on testnet.
The traits for the CityCoins DAO will be deployed on mainnet by the same deployer as the DAO: SP355...V4MW8
.
To facilitate faster testing, the list of approvers for the DAO's ccd001-direct-execute module all come from the same account and are noted below. On mainnet this will be a distributed group of signers.
The following accounts represent the city wallet in the legacy version of the protocol on testnet, which will be retired in favor of the ccd002-treasury equivalents.
The following contracts are deployed on testnet for the legacy CityCoins protocol.
These contracts will be migrated to the CityCoins DAO protocol per CCIP-013 on testnet prior to the same migration on mainnet.
This section contains information that relates to an older version of the CityCoins protocol. See the section CityCoins Protocol above for the most up-to-date information.
The VRF is a single contract used by all mining contracts, which takes a given Stacks block height and returns a random uint
calculated by accessing the on-chain VRF.
V1: includes a read-only function that calculates the value and returns it
V2: includes a public function that will set the value to a map before returning it, and both the public and read-only function check the map for a value before calculating it
The core trait defines the functions in a citycoin-core-*
contract around activation, mining, and stacking.
The token trait defines the functions in a citycoin-token-*
contract around token utilities and a send-many function.
Clarity traits allow creating generalized functions where the contract to use within the function is provided as a parameter. This requires extra security considerations.
The auth, core, and token contract are created to interact with each other such that:
The core
contract enables activation/mining/stacking
The token
contract enables the CityCoin token operations
The auth
contract enables administrative utilities
The Miami Wallet Address is used by the contract for MiamiCoin protocol distribution.
The auth, core, and token contract are created to interact with each other such that:
The core
contract enables activation/mining/stacking
The token
contract enables the CityCoin token operations
The auth
contract enables administrative utilities
The New York City Wallet Address is used by the contract for NewYorkCityCoin protocol distribution.
Contract Name | Description |
---|---|
Deployer Type | Mainnet Address | Testnet Address |
---|---|---|
General | MIA | NYC |
---|---|---|
V1 | V2 |
---|---|
V1 | V2 |
---|---|
V1 | V2 |
---|---|
base-dao
An ExecutorDAO implementation for CityCoins inspired by the one DAO to rule them all.
ccd001-direct-execute
Allows a small number of very trusted principals to immediately execute a proposal once a super majority is reached.
An extension meant for the bootstrapping period of a DAO. It temporarily gives trusted principals the ability to perform a "direct execution"; meaning, they can immediately execute a proposal with the required signals. The Direct Execute extension is set with a sunset period of ~6 months from deployment. Approvers, the parameters, and sunset period may be changed by means of a future proposal.
ccd002-treasury
A treasury contract that can manage STX, SIP-009 NFTs, and SIP-010 FTs.
An extension contract that holds assets on behalf of the DAO. SIP-009 and SIP-010 assets must be allowed before they are supported. Deposits can be made by anyone either by transferring to the contract or using a deposit function below. Withdrawals are restricted to the DAO through either extensions or proposals.
ccd003-user-registry
A central user registry for the CityCoins protocol.
An extension contract that associates an address (principal) with an ID (uint) for use in other CityCoins extensions.
ccd004-city-registry
A central city registry for the CityCoins protocol.
An extension contract that associates a city name (string-ascii 10) with an ID (uint) for use in other CityCoins extensions.
ccd005-city-data
A datastore for city information in the CityCoins protocol.
An extension contract that uses the city ID as the key for storing city information. This contract is used by other CityCoins extensions to store and retrieve city information.
ccd006-city-mining
A central city mining contract for the CityCoins protocol.
An extension that provides a mining interface per city, in which each mining participant spends STX per block for a weighted chance to mint new CityCoins per the issuance schedule.
ccd007-city-stacking
A central city stacking contract for the CityCoins protocol.
An extension that provides a stacking interface per city, in which a user can lock their CityCoins for a specified number of cycles, in return for a proportion of the stacking rewards accrued by the related city wallet.
ccd008-city-activation
This extension allows anyone to vote on activating a city once it's been added to CCD005 City Data.
An extension contract that handles the voting process for activating a city and setting the related data.
ccd009-auth-v2-adapter
Connects to the auth v2 contract in the CityCoins legacy protocol as an approver.
An extension contract that allows the DAO to access protected contract functions in the legacy protocol as part of CCIP-010.
a single contract used by all mining contracts, which takes a given Stacks block height and returns a random uint
calculated by accessing the on-chain VRF
defines the functions in a citycoin-core-*
contract around activation, mining, and stacking
defines the functions in a citycoin-token-*
contract around token utilities and a send-many function
The currently deployed MiamiCoin fungible token contract
The currently deployed NewYorkCityCoin fungible token contract
MIA
SP1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8Y634C7R (link)
ST1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8WRH7C6H (link)
NYC
SPSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1F4DYQ11 (link)
STSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1D64KKHQ (link)
DAO
SP355N8734E5PVX9538H2QGMFP38RE211D9KV4MW8 (link)
ST355N8734E5PVX9538H2QGMFP38RE211D9E2B4X5 (link)
Traits
SPSCWDV3RKV5ZRN1FQD84YE1NQFEDJ9R1F4DYQ11 (link)
ST1XQXW9JNQ1W4A7PYTN3HCHPEY7SHM6KPA085ES6 (link)