GedhoMarket
What one market trades and which limits it has. It holds no money, has no permission and never changes.
Read
terms
function terms() external view returns (MarketTerms memory);
| Returns | Type |
|---|---|
- | MarketTerms |
usdg
function usdg() external view returns (address);
| Returns | Type |
|---|---|
- | address |
label
function label() external view returns (string memory);
| Returns | Type |
|---|---|
- | string |
valueScale
function valueScale() external view returns (uint256);
USDG (6) = asset * price (8) / valueScale.
| Returns | Type |
|---|---|
- | uint256 |
shortLot
function shortLot() external view returns (uint256);
Short sizes are multiples of this. Less of the asset counts as none.
| Returns | Type |
|---|---|
- | uint256 |
maxValue
function maxValue() external view returns (uint256);
Largest value of the vault and its waiting deposits, USDG. Up to it, one order closes the whole short at twice the price, which is the largest order that Lighter takes.
| Returns | Type |
|---|---|
- | uint256 |
Errors
BadLabel
error BadLabel();
The label is not made of 1 to 8 capital letters or digits.
BadAddress
error BadAddress();
The asset, the price feed or the pool does not fit the market.
BadDecimals
error BadDecimals();
The decimals of the asset, the price feed or the Lighter market are not supported.
BadRises
error BadRises();
The maintenance margin leaves no room, or the rises are not in order, too close to each other or to the liquidation.
BadLiquidationMargin
error BadLiquidationMargin();
Liquidations are believed too early, or only after they are over.
BadFundingLimit
error BadFundingLimit();
A funding limit is zero, too high, or never reached before the shorter one.
BadTolerance
error BadTolerance();
A tolerance is zero, too high, or does not fit the others or the pool.
BadAmount
error BadAmount();
A deposit does not fit the others, or Lighter.
BadPrice
error BadPrice();
There is no price now, or Lighter cannot express the prices of the market.
LotTooLarge
error LotTooLarge();
One step of the short is too large for the seed or the smallest deposit.