Skip to main content

GedhoVault

Holds the money, owns the Lighter account, keeps the books and is the FV token. One address, with all functions of the three contracts of its code.

Inherits ERC20Metadata, ERC20Permit, Upgradeable base.

Anyone​

swapForCommand​

function swapForCommand(
uint256 commandId,
uint256 amountIn,
uint256 minOut
) external returns (uint256 amountOut);

Trades the asset for a command, within its limit and near the Chainlink price. For an entry or exit that is reported as done, anyone can trade what its fill needs and no more.

An operator can trade for any command. Anyone else only for an entry or exit that is reported as done.

ParameterType
commandIduint256
amountInuint256
minOutuint256
ReturnsType
amountOutuint256

finishCommand​

function finishCommand(uint256 commandId) external;

Closes the books of a reported command and charges its cost. A command without an order counts as reported when its asset trade is complete, after its deadline, or for an operator.

ParameterType
commandIduint256

depositCollateral​

function depositCollateral() external returns (uint256 amount);

Sends waiting capital to Lighter, and what the Funding Box owes Lighter. Money kept for a reset or for an open command that buys the asset stays. Less than Lighter takes waits for more.

ReturnsType
amountuint256

sweepFunding​

function sweepFunding() external returns (uint256 ticketId);

Asks Lighter for the part of the Funding Box that was not asked for yet.

ReturnsType
ticketIduint256

retryWithdrawal​

function retryWithdrawal(uint256 amount) external;

Asks again for withdrawals that Lighter did not execute, all of them or a part. Lighter ignores an amount above the free balance, so one call asks for at most half of what is missing.

ParameterType
amountuint256

collect​

function collect() external returns (uint256 amount);

Collects finished withdrawals and fills the tickets, some at a time when there are many. Series payments are also filled from the Funding Box and from capital in the vault that is not reserved, and without a short payouts and refunds from that capital. Withdrawals that nobody asked for become capital. In a wind-down it only fills tickets that pay others.

ReturnsTypeDescription
amountuint256What arrived. Zero when a series was paid only from what the vault already had.

sendFee​

function sendFee() external returns (uint256 amount);

Sends the protocol fee that is in the vault to the treasury of GedhoControl. Zero when there is none.

ReturnsType
amountuint256

recoverFromSubaccount​

function recoverFromSubaccount(uint48 accountIndex, uint256 amount) external;

Asks for money from another Lighter account of the vault.

ParameterType
accountIndexuint48
amountuint256

guard​

function guard(uint80 earlierRoundId) external;

Shrinks the short and sells as much of the asset after a larger rise, when there were no reports for two hours, or when an adjustment was due half an hour ago and nothing was done.

ParameterTypeDescription
earlierRoundIduint80Chainlink round in force 30 minutes ago. Only read when reports arrive.

emergencyExit​

function emergencyExit() external;

Closes the whole short and sells all of the asset after the largest rise, without reports for two hours.

sellAfterTrigger​

function sellAfterTrigger(
uint256 maxAsset,
uint256 minOut
) external returns (uint256 usdg);

Sells the asset that no longer has a short: after guard(), emergencyExit(), closeAll(), or 30 minutes after a lost short or an unrepaired difference. Not while the position is repaired.

ParameterType
maxAssetuint256
minOutuint256
ReturnsType
usdguint256

publicAlign​

function publicAlign() external returns (uint256 commandId);

Reduces the short to the asset after an operator did not repair the difference for 30 minutes. While an adjustment or alignment of an operator is open it only ends that one, so that a fill is not closed twice.

ReturnsTypeDescription
commandIduint256Zero when it only ended a command.

repeatClose​

function repeatClose() external;

Sends the closing order again in an emergency, when reports say that it was not filled.

poke​

function poke() external;

Records a status that changed by time or price.

removeRevokedKey​

function removeRevokedKey(uint8 apiKeySlot) external;

Asks Lighter again to remove the API key of an operator that was revoked, while no active operator uses the slot. Anyone can call it.

During a pause only Admin can call it.

ParameterType
apiKeySlotuint8

startWindDown​

function startWindDown() external;

Ends the vault for good, after 14 days without a valid hourly report or after Lighter stopped.

windDownClose​

function windDownClose(uint48 accountIndex) external;

Cancels orders, removes the API keys and closes the short of one account, while Lighter still runs.

ParameterType
accountIndexuint48

windDownSell​

function windDownSell(
uint256 maxAsset,
uint256 minOut
) external returns (uint256 usdg);

Sells the asset in parts, near the Chainlink price.

ParameterType
maxAssetuint256
minOutuint256
ReturnsType
usdguint256

windDownWithdraw​

function windDownWithdraw(uint48 accountIndex, uint256 amount) external;

Asks Lighter for money from any account of the vault.

ParameterType
accountIndexuint48
amountuint256

windDownDistribute​

function windDownDistribute() external returns (uint256 usdg, uint256 asset);

Counts USDG that arrived and shares it among all shares. After 30 days also the asset that was not sold.

ReturnsType
usdguint256
assetuint256

windDownClaim​

function windDownClaim(
uint256 shares
) external returns (uint256 usdg, uint256 asset);

Burns shares of the caller once and pays what they earned so far. Later arrivals are paid by calling it again with zero shares.

ParameterType
sharesuint256
ReturnsType
usdguint256
assetuint256

Operator​

startAdjustment​

function startAdjustment() external returns (uint256 commandId);

Shrinks the short back to 2x after the asset rose as far as the market allows.

ReturnsType
commandIduint256

startAlign​

function startAlign() external returns (uint256 commandId);

Removes a difference between the asset and the short by reducing the larger one.

ReturnsType
commandIduint256

prepareReset​

function prepareReset() external returns (uint256 ticketId);

Moves the Funding Box into the capital, between two series, and asks Lighter for the money that startReset() needs to buy the asset.

ReturnsTypeDescription
ticketIduint256Zero when nothing is needed.

startReset​

function startReset() external returns (uint256 commandId);

Brings the position to 2x after prepareReset(). Done at once when the difference is smaller than one lot.

ReturnsType
commandIduint256

startReopen​

function startReopen() external returns (uint256 commandId);

Opens the short at 2x when there is none: the first time, or after it was lost.

ReturnsType
commandIduint256

Admin​

seed​

function seed() external;

First deposit, once. Creates the Lighter account. Its shares can never be redeemed.

closeAll​

function closeAll() external;

Closes the whole position at once.

revokeOperator​

function revokeOperator(address operator) external;

Removes an operator at once, and asks Lighter to remove its API key. The role ends even when the command to Lighter fails.

ParameterType
operatoraddress

24-hour time delay​

setOperator​

function setOperator(
address operator,
uint8 apiKeySlot,
bytes calldata publicKey
) external;

Installs an operator with its API key.

24 hour timelock only. Slots 4 to 254.

ParameterType
operatoraddress
apiKeySlotuint8
publicKeybytes

72-hour time delay​

setCodec​

function setCodec(address codec) external;

Replaces the codec.

72 hour timelock only.

ParameterType
codecaddress

Deployer​

initialize​

function initialize(address codec) external;

Names the FV token and sets the codec, once, through the proxy. Fails unless the extension and the code of the wind-down were built for this address and with the same values.

ParameterType
codecaddress

The queue​

beginEntry​

function beginEntry(
uint64 roundHour,
uint256 usdg,
uint256 asset
) external returns (uint256 commandId, uint256 value, uint256 price);

Takes the entries of a round and issues the order for their short. Never fails because of their size or of the books.

ParameterType
roundHouruint64
usdguint256
assetuint256
ReturnsTypeDescription
commandIduint256Zero when entries cannot be taken now. Nothing is taken then.
valueuint256Denominator for the parts of the requests, USDG.
priceuint256Price for the asset, the lower of Chainlink and pool.

finalizeEntry​

function finalizeEntry(
uint64 roundHour
) external returns (uint256 shares, uint256 refundUsdg, uint256 refundAsset);

Mints shares for the part that became a position. The rest is the refund. Without a position, or when the vault has no short, everything is the refund.

ParameterType
roundHouruint64
ReturnsType
sharesuint256
refundUsdguint256
refundAssetuint256

beginExit​

function beginExit(
uint64 roundHour,
uint256 shares
) external returns (uint256 commandId);

Sets the part of the leaving shares apart and issues the order for their short. Without a short the command has no size and only sells the asset.

ParameterType
roundHouruint64
sharesuint256
ReturnsTypeDescription
commandIduint256Zero when the order would be smaller than one lot. Nothing is set apart then.

finalizeExit​

function finalizeExit(
uint64 roundHour
) external returns (uint256 sharesReturned, uint256 usdg);

Pays the part that was closed. The rest joins the vault again for sharesReturned.

ParameterType
roundHouruint64
ReturnsType
sharesReturneduint256
usdguint256

The series contract​

chargeFee​

function chargeFee(
uint256 seriesId,
uint256 rate,
int256 indexAtOpen
) external returns (int256 fundingIndex);

Charges the protocol fee of a series that ends, before its Yield is counted: rate of the rise of the index above the higher of indexAtOpen and the peak, for all shares. Lowers the index and the Funding Box by it. The peak becomes the index after the fee when that is higher.

ParameterType
seriesIduint256
rateuint256
indexAtOpenint256
ReturnsTypeDescription
fundingIndexint256After the fee.

settleSeries​

function settleSeries(
uint256 seriesId,
uint256 usdg
) external returns (uint256 sharesBurned);

Pays a series from the Funding Box and burns shares of the same value.

ParameterType
seriesIduint256
usdguint256
ReturnsType
sharesBurneduint256

The report oracle​

applyReport​

function applyReport(Report calldata report, bool exceptional) external;

Applies a report that passed every check. An exceptional report also makes the books equal to itself.

ParameterType
reportReport
exceptionalbool

setReportHold​

function setReportHold(uint256 reason, bool active) external;

Sets or clears a hold that comes from the reports.

ParameterType
reasonuint256
activebool

Read​

market​

function market() external view returns (IGedhoMarket);
ReturnsType
-IGedhoMarket

extension​

function extension() external view returns (address);

Code of the functions that the vault does not have itself, except the wind-down.

ReturnsType
-address

windDownCode​

function windDownCode() external view returns (address);

Code of the wind-down.

ReturnsType
-address

status​

function status() external view returns (Status);
ReturnsType
-Status

holdReasons​

function holdReasons() external view returns (uint256);

Active reasons of a hold, including the ones that come from time and price.

ReturnsType
-uint256

book​

function book() external view returns (Book memory);
ReturnsType
-Book
function nav() external view returns (int256);

Everything the shares own, in USDG.

ReturnsType
-int256

sharePrice​

function sharePrice() external view returns (uint256);

USD per share, 18 decimals, rounded down. Zero without shares, or when nothing is left for them.

ReturnsType
-uint256

fundingIndex​

function fundingIndex() external view returns (int256);

Funding since the start for one share, USD with 18 decimals.

ReturnsType
-int256

assetPrice​

function assetPrice() external view returns (uint256);

Checked asset price, 8 decimals. Fails when it cannot be trusted.

ReturnsType
-uint256

simulateReport​

function simulateReport(
Report calldata report
) external view returns (int256 shortSize, int256 cash, uint256 notional);

What a report should show: the books after its fills and funding. Fails when Chainlink is older than maxPriceAge.

ParameterType
reportReport
ReturnsTypeDescription
shortSizeint256All books together, before the liquidated size. Negative when the fills do not fit a book.
cashint256Before the liquidated notional and any loss.
notionaluint256Base of the tolerances, USDG: the larger short before and after the report, the liquidated size taken off.

command​

function command(uint256 commandId) external view returns (Command memory);
ParameterType
commandIduint256
ReturnsType
-Command

openCommands​

function openCommands() external view returns (uint256[] memory);
ReturnsType
-uint256[]

baseStatus​

function baseStatus() external view returns (Status);

State without holds: Normal, NoShort, Emergency or WindDown.

ReturnsType
-Status

readyForSeries​

function readyForSeries() external view returns (bool);

A completely filled reset, or first opening at 2x, came after the last settlement, no command or round is open, and the asset is within 5% of the price at which the books are at 2x. False without a good price.

ReturnsType
-bool

seededAt​

function seededAt() external view returns (uint64);

When seed() was called, zero before.

ReturnsType
-uint64

isOperator​

function isOperator(address account) external view returns (bool);
ParameterType
accountaddress
ReturnsType
-bool

equity​

function equity() external view returns (int256);

Value of the short at the current price: collateral, profit or loss, adjustment.

ReturnsType
-int256

effectiveSupply​

function effectiveSupply() external view returns (uint256);

Shares that own the books: total supply without shares leaving in the open round.

ReturnsType
-uint256

marginRatio​

function marginRatio() external view returns (int256);

Equity over the value of the short, 1e18 is 100%. The largest number without a short.

ReturnsType
-int256

referencePrice​

function referencePrice() external view returns (uint256);

Asset price at which the books are at 2x, 8 decimals. Zero without a short.

ReturnsType
-uint256

lostShortAt​

function lostShortAt() external view returns (uint64);

When the asset lost its short. A later reopening that fails does not change it. Zero when the asset matches.

ReturnsType
-uint64

positionHeldSince​

function positionHeldSince() external view returns (uint64);

When the hold for a difference between the asset and the short began, zero without it.

ReturnsType
-uint64

ticket​

function ticket(
uint256 ticketId
) external view returns (WithdrawalTicket memory);
ParameterType
ticketIduint256
ReturnsType
-WithdrawalTicket

fees​

function fees(

) external view returns (uint256 cash, uint256 receivable, int256 peak);

Protocol fee in the vault and at Lighter, and the peak of the funding index above which the next fee is charged.

ReturnsType
cashuint256
receivableuint256
peakint256

roundBooks​

function roundBooks(

) external view returns (Book memory entry, Book memory leaving);

Books of the part of the open round that enters or leaves.

ReturnsType
entryBook
leavingBook

totalSent​

function totalSent() external view returns (uint256);
ReturnsType
-uint256

totalReceived​

function totalReceived() external view returns (uint256);
ReturnsType
-uint256

lighterAccount​

function lighterAccount() external view returns (uint48);
ReturnsType
-uint48

codec​

function codec() external view returns (address);
ReturnsType
-address

windDownPerShare​

function windDownPerShare() external view returns (uint256 usdg, uint256 asset);

Earned by one share in the wind-down: USD with 18 decimals, and the smallest unit of the asset per 1e18 shares with 18 more decimals.

ReturnsType
usdguint256
assetuint256

Events​

StatusChanged​

event StatusChanged(
Status indexed status,
Status indexed baseStatus,
uint256 holdReasons
);
ParameterType
status (indexed)Status
baseStatus (indexed)Status
holdReasonsuint256

BookUpdated​

event BookUpdated(
Book book,
int256 fundingIndex,
uint256 supply,
uint256 assetPrice
);

The books of the vault after a change. assetPrice is zero without a good price.

ParameterType
bookBook
fundingIndexint256
supplyuint256
assetPriceuint256

FundingApplied​

event FundingApplied(
uint64 indexed hour,
int256 funding,
int256 vaultFunding,
int256 index
);
ParameterType
hour (indexed)uint64
fundingint256
vaultFundingint256
indexint256

CostCharged​

event CostCharged(uint256 indexed commandId, uint256 cost, uint256 fromBox);
ParameterType
commandId (indexed)uint256
costuint256
fromBoxuint256

Liquidated​

event Liquidated(
uint64 indexed time,
uint256 size,
uint256 notional,
uint256 loss
);
ParameterType
time (indexed)uint64
sizeuint256
notionaluint256
lossuint256

ReportApplied​

event ReportApplied(
uint64 indexed number,
uint64 indexed time,
uint256 shortSize,
int256 cash,
uint256 depositsCredited,
uint256 withdrawalsExecuted
);

The values of an accepted report.

ParameterType
number (indexed)uint64
time (indexed)uint64
shortSizeuint256
cashint256
depositsCrediteduint256
withdrawalsExecuteduint256

BookReconciled​

event BookReconciled(
uint64 indexed number,
int256 shortDelta,
int256 cashDelta
);

An exceptional report made the books equal to itself.

ParameterType
number (indexed)uint64
shortDeltaint256
cashDeltaint256

RoundBooksUpdated​

event RoundBooksUpdated(Book entry, Book leaving);

The books of the open round after a change.

ParameterType
entryBook
leavingBook

CommandIssued​

event CommandIssued(
uint256 indexed commandId,
CommandKind indexed kind,
bool opensShort,
uint256 size,
bool sellsAsset,
uint256 assetLimit,
uint64 deadline
);
ParameterType
commandId (indexed)uint256
kind (indexed)CommandKind
opensShortbool
sizeuint256
sellsAssetbool
assetLimituint256
deadlineuint64

CommandFilled​

event CommandFilled(
uint256 indexed commandId,
uint256 size,
uint256 notional,
bool done
);
ParameterType
commandId (indexed)uint256
sizeuint256
notionaluint256
donebool

CommandFinished​

event CommandFinished(uint256 indexed commandId);
ParameterType
commandId (indexed)uint256

CommandCut​

event CommandCut(uint256 indexed commandId, uint64 deadline);

A protection ended the command early.

ParameterType
commandId (indexed)uint256
deadlineuint64

Swapped​

event Swapped(
uint256 indexed commandId,
bool soldAsset,
uint256 asset,
uint256 usdg,
uint256 assetPrice
);

Trade of the asset. commandId is zero in a wind-down and after a lost short.

ParameterType
commandId (indexed)uint256
soldAssetbool
assetuint256
usdguint256
assetPriceuint256

EntryStarted​

event EntryStarted(
uint64 indexed roundHour,
uint256 usdg,
uint256 asset,
uint256 value
);
ParameterType
roundHour (indexed)uint64
usdguint256
assetuint256
valueuint256

EntryFinished​

event EntryFinished(
uint64 indexed roundHour,
uint256 shares,
uint256 refundUsdg,
uint256 refundAsset
);
ParameterType
roundHour (indexed)uint64
sharesuint256
refundUsdguint256
refundAssetuint256

ExitStarted​

event ExitStarted(uint64 indexed roundHour, uint256 shares);
ParameterType
roundHour (indexed)uint64
sharesuint256

ExitFinished​

event ExitFinished(
uint64 indexed roundHour,
uint256 sharesBurned,
uint256 usdg
);
ParameterType
roundHour (indexed)uint64
sharesBurneduint256
usdguint256

SeriesPaid​

event SeriesPaid(uint256 indexed seriesId, uint256 usdg, uint256 sharesBurned);
ParameterType
seriesId (indexed)uint256
usdguint256
sharesBurneduint256

FeeCharged​

event FeeCharged(
uint256 indexed seriesId,
uint256 fee,
uint256 fromCash,
int256 fundingIndex
);

The protocol fee of a series at its settlement. fromCash was in the vault, the rest is at Lighter. Not emitted without a fee.

ParameterType
seriesId (indexed)uint256
feeuint256
fromCashuint256
fundingIndexint256

FeeSent​

event FeeSent(address indexed treasury, uint256 amount);
ParameterType
treasury (indexed)address
amountuint256

CollateralDeposited​

event CollateralDeposited(uint256 amount, uint256 totalSent);
ParameterType
amountuint256
totalSentuint256

WithdrawalRequested​

event WithdrawalRequested(
uint256 indexed ticketId,
WithdrawalPurpose indexed purpose,
uint256 ref,
uint256 amount
);
ParameterType
ticketId (indexed)uint256
purpose (indexed)WithdrawalPurpose
refuint256
amountuint256

WithdrawalRefused​

event WithdrawalRefused(uint256 indexed ticketId, uint256 amount);

Lighter refused the request. The ticket stays open.

ParameterType
ticketId (indexed)uint256
amountuint256

WithdrawalReceived​

event WithdrawalReceived(uint256 amount, uint256 totalReceived);
ParameterType
amountuint256
totalReceiveduint256

TicketFilled​

event TicketFilled(uint256 indexed ticketId, uint256 amount, bool complete);
ParameterType
ticketId (indexed)uint256
amountuint256
completebool

TicketConverted​

event TicketConverted(
uint256 indexed fromTicket,
uint256 indexed toTicket,
uint256 amount
);

Part of a funding ticket now pays a series.

ParameterType
fromTicket (indexed)uint256
toTicket (indexed)uint256
amountuint256

OperatorAdded​

event OperatorAdded(
address indexed operator,
uint8 indexed apiKeySlot,
bytes publicKey
);
ParameterType
operator (indexed)address
apiKeySlot (indexed)uint8
publicKeybytes

OperatorRevoked​

event OperatorRevoked(address indexed operator, uint8 indexed apiKeySlot);
ParameterType
operator (indexed)address
apiKeySlot (indexed)uint8

KeyRemovalSent​

event KeyRemovalSent(uint8 indexed apiKeySlot, bool accepted);

Lighter took the command to remove a key, or refused it.

ParameterType
apiKeySlot (indexed)uint8
acceptedbool

CodecChanged​

event CodecChanged(
address indexed oldCodec,
address indexed newCodec,
address target
);
ParameterType
oldCodec (indexed)address
newCodec (indexed)address
targetaddress

WindDownStarted​

event WindDownStarted(bool lighterStopped, uint256 supply);
ParameterType
lighterStoppedbool
supplyuint256

WindDownReceived​

event WindDownReceived(
uint256 usdg,
uint256 asset,
uint256 usdgPerShare,
uint256 assetPerShare
);
ParameterType
usdguint256
assetuint256
usdgPerShareuint256
assetPerShareuint256

WindDownClaimed​

event WindDownClaimed(
address indexed owner,
uint256 shares,
uint256 usdg,
uint256 asset
);
ParameterType
owner (indexed)address
sharesuint256
usdguint256
assetuint256

Errors​

NotOperator​

error NotOperator();

The caller is not an active operator.

NotQueue​

error NotQueue();

Only the queue can call this.

NotSeries​

error NotSeries();

Only the series contract can call this.

NotOracle​

error NotOracle();

Only the report oracle can call this.

StatusForbids​

error StatusForbids(Status status);

The status does not allow this.

ParameterType
statusStatus

ReportNotFresh​

error ReportNotFresh(uint64 lastHour);

The last hourly report is not of the current hour.

ParameterType
lastHouruint64

PriceStale​

error PriceStale(uint256 updatedAt);

Chainlink gave no price, or an old one.

ParameterType
updatedAtuint256

PriceDeviates​

error PriceDeviates(uint256 chainlink, uint256 pool);

Chainlink and the pool differ too much.

ParameterType
chainlinkuint256
pooluint256

PriceBelowTrigger​

error PriceBelowTrigger(uint256 price, uint256 trigger);

The asset has not risen enough for this.

ParameterType
priceuint256
triggeruint256

RiseNotSustained​

error RiseNotSustained(uint80 roundId);

Reports arrive, and the round given was not in force 30 minutes ago or is too low.

ParameterType
roundIduint80

OperatorNotSilent​

error OperatorNotSilent(uint64 lastHour);

The last valid report is too recent for this.

ParameterType
lastHouruint64

AlreadyTriggered​

error AlreadyTriggered();

This protection was already used and is not settled yet.

CommandOpen​

error CommandOpen(uint256 commandId);

Another command must finish first.

ParameterType
commandIduint256

CommandUnknown​

error CommandUnknown(uint256 commandId);

The command does not exist, or is finished.

ParameterType
commandIduint256

CommandNotReported​

error CommandNotReported(uint256 commandId);

Reports have not settled the command.

ParameterType
commandIduint256

TooCloseToHour​

error TooCloseToHour();

The next hour is too close to start a command.

AboveLimit​

error AboveLimit(uint256 limit);

The trade is larger than the command allows.

ParameterType
limituint256

AssetTradeIncomplete​

error AssetTradeIncomplete(uint256 missing);

The asset trade of the command is not complete.

ParameterType
missinguint256

PriceTooLow​

error PriceTooLow(uint256 received, uint256 minimum);

The result is below the minimum.

ParameterType
receiveduint256
minimumuint256

SeriesActive​

error SeriesActive();

A series is open or not fully paid.

BoxTooSmall​

error BoxTooSmall(int256 box);

The payment is larger than the Funding Box.

ParameterType
boxint256

LighterStopped​

error LighterStopped();

Lighter stopped for good.

BadApiKeySlot​

error BadApiKeySlot(uint8 slot);

The API key slot cannot be used.

ParameterType
slotuint8

NotSubaccount​

error NotSubaccount(uint48 accountIndex);

The account is the main account of the vault.

ParameterType
accountIndexuint48

RoundOpen​

error RoundOpen(uint64 hour);

A round is executing.

ParameterType
houruint64

CapitalMissing​

error CapitalMissing(uint256 missing);

Money that the command needs has not arrived from Lighter.

ParameterType
missinguint256

NothingToDo​

error NothingToDo();

There is nothing to do.

CodecMisbehaved​

error CodecMisbehaved();

A command built by the codec changed a balance, or has a forbidden target.

WrongMarket​

error WrongMarket(address market);

The codec builds orders of another market.

ParameterType
marketaddress

OperatorExists​

error OperatorExists();

The address or slot is already used.

WindDownNotAllowed​

error WindDownNotAllowed();

The wind-down conditions are not met.

AssetShared​

error AssetShared();

The asset of the wind-down is shared now, not sold.

AlreadySeeded​

error AlreadySeeded();

The seed was already deposited.

NotVault​

error NotVault();

This code only runs at the address of its vault.

WrongExtension​

error WrongExtension(address extension);

A contract of its code is of another vault, or was built with other values.

ParameterType
extensionaddress

WrongPool​

error WrongPool(address pool);

The router and the factory would trade in another pool than the one of the market.

ParameterType
pooladdress