Skip to main content

Module perp

Module perp 

Source
Expand description

Deploying and running a HIP-3 perp dex: every perpDeploy variant the docs list, all L1 actions. The deploy auction read is in dexes. The testnet-only HIP-3* star operations are not here.

Re-exports§

pub use asset::DexSchema;
pub use asset::MarginMode;
pub use asset::NewAsset;
pub use margin::MarginTable;
pub use margin::MarginTier;
pub use sub::PerpKind;
pub use sub::SubDeployer;

Modules§

asset
What registering a HIP-3 perp carries: the asset, its margin mode, and the new dex’s schema when the first asset creates the dex.
margin
A margin table a HIP-3 deployer inserts: up to three tiers of position size and the leverage allowed above each.
sub
Sub-deployers: which perpDeploy variant another address may send for a dex (PerpKind), and one address let in to or shut out of it (SubDeployer).

Structs§

DeployerFee
A deployer’s fee setting for one asset: the scale applied to user fees and whether growth mode is on.

Enums§

PerpDeploy
{"type":"perpDeploy",<variant>:..}. The constructors check what the docs rule out and take each per-coin list in any order, refusing a coin given twice; the lists go out sorted by coin, as the venue requires.

Type Aliases§

ByCoin
Values by coin (dex:NAME), kept in the order the venue hashes them: bytewise by coin, so xyz:BTC comes before xyz:abc.