Skip to content

withdrawal queue v1 #13

@sponnet

Description

@sponnet

Withdrawal

Stefaan currently own 10 apETH - the ratio apETH/ETH is at 1.1. Stefaan wants to use the apETH contract to exchange his 10 apETH to 11 ETH.

Scenario 1 : apETH has >= than 11 ETH & there is nobody in the queue

Exchange is done immediately. apETH is burnt - ETH is sent back to the sender.

Scenario 2 : apETH has < 11 ETH.

the user needs to call a queueWithdrawal() function which needs

  • the amount of apETH sent
  • the ratio at the time of the request (calculated internally)
  • an ETH fee to process the withdrawal through a push machanism (? TBD)

Then the withdrawal is placed in an ordered list in the contract.

  • The APD process will look through the list of active validators - and find the worst performer in the current active set, and broadcasts its exit message.
  • this step is repeated for the amount requested to withdraw ( / 32 ETH )
  • using the eigenpod , we can withdraw the ETH + immediately decrease the validator count
  • when the validator has exited and the funds are deposited back into the contract, the APD calls a function that processes the ETH withdrawal for the top entry in the queue.

Considerations

  • By using a push model, no user can keep the queue blocked
  • As long as the queue contains entries, ETH deposits for new validators should be disabled.

What if

  • what if the ETH returned triggers a contract function on the msg.sender address ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions