---
# System prepended metadata

title: 'DanGoron: Week 14-15 dev-update'
tags: [EPF]

---

# DanGoron: Week 14-15 dev-update

## eODS Prototyping

Here are the updated [eODS Design notes](https://hackmd.io/@kboomro/r1csps2MR).

### Summary 

The design defines design constraints, entities and the conditional relations between them. 

During Weeks 14 and 15, I also added 3 case studies.

### Week 14, 15 development 

#### 1. Open issues from prior weeks

- [ ] Delegator triggered `0x01` withdrawals - this point is going to be covered in the next 2 weeks of case studies phase 

- [x] Increase readability of the Class diagram (add LEGEND, detailing) - this point is going to be covered in the case studies phase, I plan to break the rather big diagram into smaller, more legible diagrams, that will most likely allow readers to grasp the concept better.

#### 2. Added use cases:

##### 2.1 New self-funded heavy operator

This was straightforward, being the current DEPOSIT_CONTRACT -> FUNDING OPERATORS(VALIDATORS)
```mermaid
---
title: USE CASE no.1 - Deposit + Validator funding
---

classDiagram

direction LR

namespace DEPOSIT{
    class Depositor{
    ETH: Gwei
    deposit(ETH)
    }
    
    class DEPOSIT_CONTRACT{
    ETH: Gwei
    event = Deposit_event
    send_PROOF(event)
    }
}

namespace BEACON-STATE{
    class Accounting{
    ValidatorIndex
    PROOF
    get_proof(<PROOF>)
    operate_balance(Validator(ValidatorIndex)) PRINCIPAL
    }
      
    class Operators{
    index = ValidatorIndex
    Validator.balance(index) PRINCIPAL
    PerformDuties(<Validator(index)>)
    }  
}
Depositor --|> DEPOSIT_CONTRACT: ETH

DEPOSIT_CONTRACT --|> Accounting: PROOF

Accounting --|> Operators : PRINCIPAL

Operators --|> Depositor : WITHDR_CRED

```
##### 2.1 New Delegator, with the intent to delegate to heavy Operators and light Operators

This use case is representative for eODS as it uses the DELEGATION_CONTRACT as ETH deposit gateway.
```mermaid
---
title: USE CASE no.2 - Deposit + Validator funding
---

classDiagram

direction LR

namespace DEPOSIT{
    class Depositor{
    ETH: Gwei
    deposit(ETH)
    }
    
    class DELEGATION_CONTRACT{
    ETH: Gwei
    event = Deposit_event
    send_PROOF(event)
    }
}
namespace BEACON-STATE{

    class Accounting{
    ValidatorIndex
    DelegatorIndex
    light_ValidatorIndex
    RECEIPT
    PROOF
    get_receipt(<RECEIPT>)
    get_proof(<PROOF>)
    operate_balance(Delegator(DelegatorIndex)) PRINCIPAL
    operate_balance(Delegator(DelegatorIndex)) SHARE
    }
    
    class Delegators{
    index = DelegatorIndex
    ValidatorIndex
    light_ValidatorIndex
    Delegator.balance(index) PRINCIPAL
    Delegator.balance(index) SHARE
    delegation(Validator(ValidatorIndex)) PRINCIPAL
    delegation(light_Validator(light_ValidatorIndex)) SHARE
    } 
    
    class Operators{
    index = ValidatorIndex
    Validator.balance(index) PRINCIPAL
    PerformDuties(<Validator(index)>)
    }
    
    class light_Operators{
    index = light_ValidatorIndex
    light_Validator.balance(index) SHARE
    PerformDuties(<light_Validator(index)>)
    }     
}

Depositor --|> DELEGATION_CONTRACT: ETH

DELEGATION_CONTRACT --|> Accounting: PROOF

Accounting --|> Delegators : PRINCIPAL

Accounting <|--|> Delegators: SHARE
Accounting <.. Operators: RECEIPT(delegation_proof)
Accounting <.. light_Operators: RECEIPT(delegation_proof)

Delegators <|--|> light_Operators: SHARE
Delegators <|--|> Operators: PRINCIPAL

Delegators --|> Depositor : WITHDR_CRED

```

**WORKFLOW**

##### 2.1.1 Deposit
 
##### 2.1.2 Constitute Delegator's balance in BeaconState

##### 2.1.3 Delegation towards Validators 

##### 2.1.4 Delegation towards light_Validators

##### 2.1.5 Protocol services provision
```mermaid
---
title: USE CASE no.2 - Protocol services provision
---

classDiagram

direction LR

namespace BEACON-STATE{
        
    class Delegators{
    index = DelegatorIndex
    ValidatorIndex
    light_ValidatorIndex
    Delegator.balance(index) PRINCIPAL
    Delegator.balance(index) SHARE
    delegation(Validator(ValidatorIndex)) PRINCIPAL
    delegation(light_Validator(light_ValidatorIndex)) SHARE
    } 
    
    class Operators{
    index = ValidatorIndex
    Validator.balance(index) PRINCIPAL
    PerformDuties(<Validator(index)>)
    }
    
    class light_Operators{
    index = light_ValidatorIndex
    light_Validator.balance(index) SHARE
    PerformDuties(<light_Validator(index)>)
    }  
}    
namespace FINALITY{
  
    class FFG{
    source_checkpoint ~attestations~
    target_checkpoint ~attestations~
    equivocation ~attestations~
    rewards(source_checkpoint) 21.9% * W
    rewards(target_checkpoint) 40.6% * W
    slashing(equivocation)
    }

    class LMD-GHOST{
    chain_head ~attestations~
    rewards(chain_head) 21.9% * W
    equivocation ~attestations~
    slashing(equivocation)
    }

    class PROPOSER{
    beaconchain_blocks ~proposing~
    whistleblower ~proposing~
    equivocation ~proposing~
    rewards(beaconchain_blocks) 12.5% * W
    rewards(whistleblower) B / 512
    slashing(equivocation)
    }
    
    class PTC{
    timely_payload ~attestations~
    rewards(timely_payload)
    }
}
namespace AVS{
    class SYNC_COMMITTEE{
    sync_reward ~signing~
    rewards(sync_reward) 3.1% * W
    }
    class FOCIL{
    il_committee ~proposing~
    il_voting ~attestations~
    rewards(il_committee): ~none~
    rewards(il_voting): ~none~
    }
}   
Operators --|> FFG: provision
FFG --|> Operators: rewards & penalties
FFG --|> Operators: slashings

Operators --|> LMD-GHOST: provision
LMD-GHOST --|> Operators: rewards & penalties
LMD-GHOST --|> Operators: slashings

Operators --|> PROPOSER: provision
PROPOSER --|> Operators: rewards & penalties
PROPOSER --|> Operators: slashings

Operators --|> PTC: provision
PTC --|> Operators: rewards & penalties

light_Operators --|> SYNC_COMMITTEE: provision
SYNC_COMMITTEE --|> light_Operators: rewards & penalties

light_Operators --|> FOCIL: provision
FOCIL --|> light_Operators: rewards & penalties

Delegators <|--|> light_Operators: SHARE
Delegators <|--|> Operators: PRINCIPAL

```

#### 3. Feedback

[eODS prototyping file](https://hackmd.io/@kboomro/r1csps2MR) is in peer and mentors review, so, even though the project is solidifying around a clearer prototype, discussions can spur new ideas and approaches.

### Week 16, 17 planning

Last two weeks before moving on to the delegator role selection & incentivization research phase of the project.

I plan to:
- finish the use cases phase
- add **Withdrawals** chapter
