Upgrades and pause
The contracts of Gedho can be upgraded, so that a bug can be fixed in the same contracts, at the same addresses. No change takes effect at once: each one waits in a public queue for 24 hours, 72 hours or 7 days, and can be cancelled while it waits. A guardian can also pause every market, to stop users' actions while a fix is prepared. This page sets out both.
Who takes part
- The Admin is the team's 2-of-3 multisig. It proposes and carries out every change, and can cancel one that waits.
- The guardian is a separate key. It can pause every market and cancel changes that wait. It cannot move funds.
- Three time delays hold each change for a fixed time before the Admin can carry it out. Anyone can see a change while it waits.
The time delays
| Delay | What waits in it | Who can cancel |
|---|---|---|
| 24 hours | A new operator or a new second reporter | The guardian or Admin |
| 72 hours | An upgrade of any contract, a new codec, the protocol fee, the treasury, a new Admin, and new 24-hour or 72-hour delays | The guardian or Admin |
| 7 days | A new guardian, or a new 7-day delay | The Admin |
- A shorter delay waits too. Lowering a delay is itself a change that waits for the current delay, in public, and can be cancelled.
- A change does not expire. The team's rule is to cancel a change that has been ready for 14 days without being carried out, but the contracts do not enforce it: until it is cancelled, a ready change can still be carried out.
- A new guardian waits 7 days, and the guardian cannot cancel it. The 7-day delay handles only the guardian, its own address, and who may propose, carry out or cancel changes in the three delays.
What an upgrade can change
These contracts can be upgraded, each through the 72-hour delay:
- the vault of each market;
- the queue of each market;
- the series contract of each market;
- the report oracle of each market;
- the codec of each market;
- the control contract, which holds the roles, the pause, the protocol fee and the treasury for every market.
The Fix and Yield token contracts cannot be upgraded, but the series contract that mints, moves and pays them can. Each new version must carry a higher version number. That check only catches a wrong deployment: new code could lie about its version, so the real protection is the 72-hour wait and the guardian. Read the code of any upgrade while it waits.
The pause
The guardian can pause every market at once. There is no pause for a single market.
- A pause lasts 14 days from the moment it starts, and then ends by itself.
- The guardian can pause again at any time, also while a pause runs. The 14 days then start again.
- Only the Admin can end a pause early. The Admin cannot start one.
What a pause stops
- Requests to enter or exit, cancelling a request, and claiming the result of a round.
- Splitting FV, Join, and redeeming Fix and Yield.
- Transfers of FV, Fix and Yield between users. This also stops trading in the pools, and adding or removing liquidity.
- Starting a new round, and opening a new series.
- The instant path.
What keeps running
- A round that has already started finishes, so that the vault does not keep a short it no longer needs.
- Reports, and every step that keeps the short safe: rebalancing, the public guard and the emergency exit. See Operations and trust.
- Moving money between the vault and Lighter, and sending the protocol fee to the treasury.
- A wind-down, which ignores the pause. Taking back a request that waits in the queue still waits for the pause to end.
- Settling a series at maturity, but during a pause only the guardian or the Admin can do it. Settling fixes the value of Fix and Yield for good, so it waits until the cause of the pause is understood.
A pause only protects users' actions. The steps that keep running stay open to anyone, so if a bug were in one of them, the brake is the Admin closing all positions of a vault, which puts it in Emergency.
In an emergency
- The guardian pauses every market.
- The team queues the fix in the 72-hour delay.
- The guardian and the public check the queued code against the published source.
- The Admin carries out the fix after 72 hours.
- The Admin ends the pause.
What nobody can do
- No role can send user funds to an address of its choice. Not the Admin, the guardian, a time delay, the operator or a reporter. The only way to change that would be an upgrade, which waits 72 hours in public and can be cancelled by the guardian.
- The guardian cannot take funds. If its key were stolen, the worst it could do is keep the markets paused and cancel the changes that wait, for about 7 days, until a new guardian replaces it.
- A stolen team key is slow. The fastest way to take over the markets would be to replace the guardian (7 days) and then upgrade (72 hours): about 10 days, all of it in public, which leaves time to leave.
Upgrades let the team fix bugs, but they also mean the contracts can change. A bad upgrade could lower the value of FV, Fix and Yield; the 72-hour delay and the guardian reduce this risk but do not remove it. A pause can stop exits, Join, redeeming, transfers and trading in the pools for 14 days at a time, and the guardian can repeat it. The Admin can also close all positions at once, which costs trading fees even in a healthy market. See Risks.