Instead of the oracle actor sending out the `Announcements` we only store them internally and let the cfd actors chose what `Announcement` is relevant given the term of the offer.
The specific `Announcement` is then fetched from the oracle actor.
The monitoring logic for pending attestations remains the same.
249: First cet trial fixes r=da-kami a=da-kami
Note: Just discussed with `@thomaseizinger` that the Oracle actor should be changed to be able to handle multiple terms.
So, instead of the oracle actor sending out the current 24 hours to the cfd actor, the cfd actor should be able to request events for a time interval (i.e. different terms).
Changing that should also allow us to test more easily, because we can use a very short term.
Co-authored-by: Daniel Karzel <daniel@comit.network>
250: Roll over bug fixes r=bonomat a=bonomat
With these bugs fixed we get all the way back into `Open` state :)
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
240: Implement rollover protocol in daemons r=luckysori a=luckysori
Fix#136.
Co-authored-by: Lucas Soriano del Pino <l.soriano.del.pino@gmail.com>
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
245: Spread of `0.3%` instead of `3%` r=da-kami a=da-kami
Co-authored-by: Daniel Karzel <daniel@comit.network>
Co-authored-by: Daniel Karzel <daniel.karzel@coblox.tech>
Block until we are sure that the update was done, because otherwise we might have weird side effects in the UI because there is a dependency on the announcements being available when creating offers.
227: Handle collab settlement response from the maker r=klochowicz a=klochowicz
- store TakerId for proposals to be able to respond to specific taker about
settlement proposal when the user takes action
- send the collab settlement response (accept or reject) from the maker
- handle rejection (remove from the map), CFD state in the UI returns to "Open"
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
- store TakerId for proposals to be able to respond to specific taker about
settlement proposal when the user takes action
- send the collab settlement response (accept or reject) from the maker
- handle rejection (remove from the map), CFD state in the UI returns to "Open"
222: Prevent zero-priced CFD offers r=klochowicz a=klochowicz
Simplify the UI code and disable the button for posting a new offer if there is
no price set.
Co-authored-by: Mariusz Klochowicz <mariusz@klochowicz.com>
223: Publish cet r=da-kami a=da-kami
- Handles the Oracle's attestation in the cfd actor, transition according to the knowledge we have about the timelock expiry already.
- Tries to publish the CET if we are in `CetStatus::Ready`, i.e. both the attestation and timelock expiry happened. We try publishing if either event happened, and just print a log in case it's not ready yet.
- Tries to re-publish CET if we are in `PendingCet` upon restart.
- Re-triggers CET monitoring upon startup.
- Extends any state after `ContractSetup` to be able to store the attestation. (see below for ideas to change that)
Things that could be done different:
Currently we are carrying on the attestation through a lot of states - because we cannot just transition the user to `OpenCommitted` because it is a user decision to go for commit, but we have to keep the attestation around once it happened.
To reduce the state complexity, we could store the attestation independent of the state, but associated with the cfd.
This would make things a lot simpler, but we would then always have to go to the database to check if the attestation is already around (which might make other parts more complex).
---
TODO:
- [ ] Test it 😬
Co-authored-by: Daniel Karzel <daniel@comit.network>
- Handles the Oracle's attestation in the cfd actor, transition according to the knowledge we have about the timelock expiry already.
- Tries to publish the CET if we are in `CetStatus::Ready`, i.e. both the attestation and timelock expiry happened. We try publishing if either event happened, and just print a log in case it's not ready yet.
- Tries to re-publish CET if we are in `PendingCet` upon restart.
- Re-triggers CET monitoring upon startup.
- Extends any state after `ContractSetup` to be able to store the attestation. (see below for ideas to change that)
Things that could be done different:
Currently we are carrying on the attestation through a lot of states - because we cannot just transition the user to `OpenCommitted` because it is a user decision to go for commit, but we have to keep the attestation around once it happened.
To reduce the state complexity, we could store the attestation independent of the state, but associated with the cfd.
This would make things a lot simpler, but we would then always have to go to the database to check if the attestation is already around (which might make other parts more complex).
If the switch is enabled, the maker gets price suggestions based on the current
ask price on Bitmex + 3% spread.
Auto-refresh turns off whenever user modifies the field manually, and can be
re-enabled later if desired.
Fixes#214
221: Adds boiler plate for rolling over r=bonomat a=bonomat
The actual roll over is not yet implemented but I'm afraid of the code changing below me too fast hence a PR adding the boiler plate :)
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
Add support for multiple update proposals.
A taker might request to update/change a CFD in different ways, e.g.: propose to settle it or roll over.
In order to support different scenarios we introduce another layer of abstraction.
The rest of the changes creates a boilerplate for the actual rollover protocol.