Skip to content

Commit

Permalink
WhitelistArbitrator is now called AdjudicationFramework. "arbitrator"…
Browse files Browse the repository at this point in the history
… inside that is left as is for consistency with reality.eth
  • Loading branch information
edmundedgar committed Sep 29, 2023
1 parent ba37af7 commit ade966b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To Reality.eth it looks like a normal arbitrator, implementing the Arbitrator in
To the normal Arbitrator contracts that does its arbitration jobs, it looks like Reality.eth.
*/

contract WhitelistArbitrator is BalanceHolder {
contract AdjudicationFramework is BalanceHolder {
// From RealityETH_ERC20
struct Question {
bytes32 content_hash;
Expand Down Expand Up @@ -70,7 +70,7 @@ contract WhitelistArbitrator is BalanceHolder {
mapping(bytes32 => TokenReservation) public token_reservations;
uint256 public reserved_tokens;

// Whitelist of acceptable arbitrators
// Allowlist of acceptable arbitrators
mapping(address => bool) public arbitrators;

// List of arbitrators that are currently being challenged
Expand Down
30 changes: 15 additions & 15 deletions docs/interactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ForkArbitrator

### Make a crowdfund
```
Alice L2 question_id = RealityETH.askQuestion(recipient=Bob, arbitrator=WhitelistArbitrator)
Alice L2 question_id = RealityETH.askQuestion(recipient=Bob, arbitrator=AdjudicationFramework)
Alice L2 Crowdfunder.createCrowdFund(question_id, value=1234)
```

Expand Down Expand Up @@ -66,24 +66,24 @@ Next step:

### Contest an answer
```
Bob L2 WhitelistArbitrator.requestArbitration(question_id, value=1000000)
Bob L2 AdjudicationFramework.requestArbitration(question_id, value=1000000)
```

### Handle an arbitration
```
Dave L2 ArbitratorA.requestArbitration(question_id, value=500000)
WhitelistArbitrator.notifyOfArbitrationRequest(question_id, Dave)
AdjudicationFramework.notifyOfArbitrationRequest(question_id, Dave)
Arby L2 ArbitratorA.submitAnswerByArbitrator(question_id, 1, Dave)
WhitelistArbitrator.submitAnswerByArbitrator(question_id, 1, Bob)
AdjudicationFramework.submitAnswerByArbitrator(question_id, 1, Bob)
```
Next step:
* Uncontested arbitration after 1 week? [Execute an arbitration](#execute-an-arbitration)
* May be contested: [Contest an arbitration](#contest-an-arbitration)

### Execute an arbitration
```
Dave L2 WhitelistArbitrator.executeArbitration(question_id)
Dave L2 AdjudicationFramework.executeArbitration(question_id)
NativeGasToken.transfer(Dave, 1000000)
RealityETH.submitAnswerByArbitrator(question_id, 1, Bob)
```
Expand All @@ -93,10 +93,10 @@ Next step:

### Contest an arbitration
```
Charlie L2 WhitelistArbitrator.beginRemoveArbitrator(address arbitrator_to_remove)
Charlie L2 AdjudicationFramework.beginRemoveArbitrator(address arbitrator_to_remove)
contest_question_id = RealityETH.askQuestion("should we delist ArbitratorA?")
Charlie L2 RealityETH.submitAnswer(contest_question_id, 1, value=2000000)
Charlie L2 WhitelistArbitrator.freezeArbitrator(contest_question_id)
Charlie L2 AdjudicationFramework.freezeArbitrator(contest_question_id)
RealityETH.getBestAnswer(contest_question_id)
RealityETH.getBond(contest_question_id)
```
Expand All @@ -116,7 +116,7 @@ Next step:

### Execute an arbitrator removal
```
Charlie L2 WhitelistArbitrator.removeArbitrator(contest_question_id)
Charlie L2 AdjudicationFramework.removeArbitrator(contest_question_id)
RealityETH.resultFor(contest_question_id)
Next step:
Expand All @@ -125,7 +125,7 @@ Next step:
### Propose an arbitrator addition
```
Charlie L2 ForkManager.beginAddArbitratorToWhitelist(whitelist_arbitrator, ArbitratorA)
contest_question_id = RealityETH.askQuestion("should we add ArbitratorA to WhitelistArbitrator?")
contest_question_id = RealityETH.askQuestion("should we add ArbitratorA to AdjudicationFramework?")
Charlie L2 RealityETH.submitAnswer(contest_question_id, 1, value=2000000)
```
Next step:
Expand Down Expand Up @@ -269,27 +269,27 @@ Next step:
### Buy Accumulated Tokens by burning GovTokens
```
Eric L2 NativeGasToken.approve(deposit)
Eric L2 orderer_id = WhitelistArbitrator.reserveTokens(num, min_price, deposit)
Eric L2 orderer_id = AdjudicationFramework.reserveTokens(num, min_price, deposit)
NativeGasToken.transferFrom(Eric, self, deposit)

Eric L1 ForkManager.executeTokenSale(WhitelistArbitrator, reservation_id, num_gov_tokens_paid)
Eric L1 ForkManager.executeTokenSale(AdjudicationFramework, reservation_id, num_gov_tokens_paid)
# Burn own GovTokens
BridgeToL2.sendMessage("WhitelistArbitrator.executeTokenSale", reservation_id, num_gov_tokens_paid)
BridgeToL2.sendMessage("AdjudicationFramework.executeTokenSale", reservation_id, num_gov_tokens_paid)

[bot] L2 BridgeFromL1.processQueue() # or similar
WhitelistArbitrator.executeTokenSale(reservation_id)
AdjudicationFramework.executeTokenSale(reservation_id)
NativeGasToken.transfer(Eric, deposit+num)
```
### Unlock funds from a timed-out sale
```
Frank L2 WhitelistArbitrator.cancelTimedOutOrder(order_id)
Frank L2 AdjudicationFramework.cancelTimedOutOrder(order_id)
# Makes funds reserved for Eric and his deposit available for someone else to order
```
### Outbid a low reservation
```
Frank L2 WhitelistArbitrator.outBidReservation(num, price, nonce, resid)
Frank L2 AdjudicationFramework.outBidReservation(num, price, nonce, resid)
# Replace a bid
```
Expand Down

0 comments on commit ade966b

Please sign in to comment.