Governance and admins
Two kinds of authority act on chain markets.
Governance
Governance is Cosmos SDK's x/gov: a proposal carries messages signed by the gov module account
(dydx10d07y265gmmuvt4z0w9aw880jnsr700jnmapky), and they execute if the vote passes.
On the testnet one validator holds all the stake, so its vote decides every proposal:
x/gov parameter | Testnet |
|---|---|
voting_period | 120 s |
expedited_voting_period | 60 s |
min_deposit / expedited_min_deposit | 10,000,000 / 50,000,000 adv4tnt |
quorum, threshold, expedited_threshold | 33.4%, 50%, 75% |
Only governance can:
- list markets:
MsgCreateBinaryMarket,MsgCreateEvent,MsgAddEventStrikes,MsgCreateCompany; - change them:
MsgUpdateStrikeParams,MsgUpdateImpliedPriceParams,MsgUpdateCompanyParams; - settle a company perpetual outside an IPO, or at a value outside the admin's band:
MsgSettleCompanyPerp; - change chain-wide parameters: fee tiers, rate limits, liquidity tiers (within the reserved tiers' bounds), the liquidation configuration.
Governance can also do everything an admin can, with no resolve delay: halt, resolve from the block after the halt, and replace the admin.
Governance can't use dYdX's own perpetual and book messages on chain markets: it can't create or edit a chain market's perpetual, move its book's status, or give it vault quotes.
Admins
Each binary market, event and company names an admin address: the operator that halts and resolves it.
| Admin may | Message | Limits |
|---|---|---|
| Halt | MsgHaltBinaryMarket, MsgHaltEvent | Any time while trading; can't be undone |
| Resolve Yes | MsgResolveBinaryMarket, MsgResolveEvent | From the block after the halt and after the resolve delay; for an IPO that settles the company perpetual, after x/gov's expedited voting period + 1 hour, and only within the admin's band of M |
| Resolve No | the same | Only from the deadline |
| Hand on the role | MsgUpdateBinaryMarketAdmin, MsgUpdateEventAdmin, MsgUpdateCompanyAdmin | Until resolved; a company's handover takes every unresolved expiry with it |
A company's admin is its expiries' admin. Halting a company expiry before its deadline is the company's IPO: it halts the perpetual and every trading expiry, and can't be undone (settlement).
A lost or stolen admin key
Governance replaces the admin. Submit one expedited proposal with, in order:
MsgUpdate*Adminto a new key;- if the market still trades,
MsgHalt*(a halt on its own would start the resolve delay for whoever holds the old key).
If the thief has already halted, submit it at once: the thief can resolve only after the resolve
delay (at least 5 minutes for a binary, at least an hour for a company expiry, and 25 hours on a
production genesis for an IPO Yes that settles a perpetual). A mistaken or stolen IPO halt is
unwound by settling the perpetual at the index (MsgSettleCompanyPerp with use_index_value:
u = M, nothing changes hands).
Submitting a proposal
dydxprotocold tx gov submit-proposal proposal.json --from KEY \
--chain-id firstaccess-testnet-1 --node https://rpc.testnet.firstaccess.exchange:443 \
--gas auto --gas-adjustment 1.5 --gas-prices 25000000000adv4tnt{
"messages": [
{
"@type": "/dydxprotocol.binary.MsgUpdateCompanyParams",
"authority": "dydx10d07y265gmmuvt4z0w9aw880jnsr700jnmapky",
"company_id": 1,
"perp_oi_cap": "200000"
}
],
"deposit": "50000000adv4tnt",
"title": "Raise TESTCO's open interest cap",
"summary": "Raise TESTCOPERP-USD's open interest cap to 200,000 contracts.",
"expedited": true
}The testnet's operators list and settle markets with the scripts in tools/binary and
tools/company, which build these proposals, show what they will do and ask for confirmation.
Every field's default and bounds are in the parameter reference.