Enjoyoors
  • WHITEPAPER
    • Introduction
    • User-abstracted rehypothecation
      • Giga CDP of Enjoyoors
      • Giga CDP design
      • Deep secondary liquidity for gigaAssets
    • Protocol stability
      • Efficient portfolio management
      • Supply regulation for gigaAssets
      • System-wide insurance
    • Risk management framework
      • Market risks
      • Technical risks
      • gigaAsset allocation rules
    • Decentralized system architecture
      • Public chain infrastructure
      • Orchestrator appchain
      • Oracles
      • Interchain communications
    • Key protocol features
      • Epochs
      • Reward auctions
      • Intelligent peg adapters
    • Further considerations
      • Making RWAs work harder
      • Own DeFi ecosystem
      • Our priorities
  • SYSTEM ARCHITECTURE
    • Overview
    • Public Blockchain Infrastructure
      • Vaults
      • gigaAsset Manager
      • Target Protocols
      • Target Protocol Adapters
      • Intelligent Peg Adapters
      • AMM Pools
      • Rewards Treasury
    • AVS Relayer
      • Relayers
    • Enjoyoors Orchestrator AppChain (L3)
      • Enjoyoors Management System
      • Orchestrator AppChain Layers
      • Security Mechanisms
      • Price Oracle
      • Governance
      • gigaCDP
      • Portfolio Management System
      • Auctions
      • Insurance Pool
    • gigaAsset Bridge
    • gigaAssets
    • Epochs
  • PROTOCOL FLOWS
    • Deposit
    • Withdraw
    • Auction
  • RISKS
    • Protocol risks
Powered by GitBook
On this page
Export as PDF
  1. PROTOCOL FLOWS

Withdraw

PreviousDepositNextAuction

Last updated 3 months ago

Withdraw process step-by-step:

  1. External user sends withdrawal request to the via .

  2. The emits a corresponding event.

  3. The reads the emitted event from .

  4. The reaches consensus.

  5. The signs and transmits a message containing withdrawal details to the

  6. The adds withdrawal request to the queue.

  7. The processes the queue in the next epoch and closes / updates a collateralized debt position (CDP).

  8. The aggregates CDPs to calculate actual and target circulating supply of

  9. The emits corresponding event.

  10. The reads the emitted event from .

  11. The recalculates portfolio allocations to target protocols and based on the new circulating supply of .

  12. The decides on liquidity rebalancing base on new portfolio allocation details.

  13. The emits corresponding event.

  14. The reads the emitted event from

  15. The reaches consensus.

  16. The signs and transmits a message containing rebalancing details to the .

  17. The External user requests a claim voucher from the . The claim voucher allows External user to redeem his assets from the .

  18. If the External user has debt External user will receive message from with claim rejection and debt details.

  19. The External user goes to and buys to repay the debt.

  20. The External user repays debt in .

  21. If the External user doesn't have debt he receives claim voucher from .

  22. The External user receives assets from by using claim voucher.

@startuml
autonumber
actor "External user"
participant Vault
participant Relayer
participant "AMM Pool"
participant "gigaCDP"
participant PMS

== Epoch 1 ==
"External user" -> Vault: Send withdraw request
Vault -> Vault: Emit event
Relayer -> Vault: Listen to events
Relayer -> Relayer: Reach consensus
Relayer -> "gigaCDP": Broadcast signed transaction
"gigaCDP" -> "gigaCDP": Add the request to the queue

== Epoch 2 ==
"gigaCDP" -> "gigaCDP": Close / update CDP
"gigaCDP" -> "gigaCDP": Calculate actual and target level of gigaAssets
"gigaCDP" -> "gigaCDP": Emit event
PMS -> "gigaCDP": Get actual and target level of gigaAssets
PMS -> PMS: Recalculate portfolio weights
PMS -> PMS: Decide on gigaAssets liquidity rebalancing
PMS -> PMS: Emit event
Relayer -> PMS: Listen to events
Relayer -> Relayer: Reach consensus
Relayer -> "gigaAsset Manager": Broadcast signed transaction

"External user" -> gigaCDP: Try to receive claim voucher

alt External user bad debt > 0
"gigaCDP" -> "External user": Return reject message with debt details
"External user" -> "AMM Pool": Buy gigaAssets
"External user" -> "gigaCDP": Repay debt

else bad debt = 0
"gigaCDP" -> "External user": Return claim voucher
end

"External user" -> Vault: Claim assets
@enduml
Vault
enjoyoors.xyz
Vault
Relayer
Vault
Relayer
Relayer
gigaCDP.
gigaCDP
gigaCDP
gigaCDP
gigaAssets.
gigaCDP
PMS
gigaCDP
PMS
AMM pools
gigaAssets
PMS
gigaAssets
PMS
Relayer
PMS.
Relayer
Relayer
gigaAsset Manager
gigaCDP
Vault
gigaCDP
AMM Pool
gigaAsset
gigaCDP
gigaCDP
Vault
Withdraw process sequence diagram