Architecture

Transfer flow and Conversion flow are for PayMe, and the rest for Özel as a protocol.

System Designs

Here the group that does the L1 actions is separated at the left side and the one that does L2 to the right side, connected through bridging and an EOA transaction (from RedeemedHashes into Arbitrum).

Inline view

Possible scenarios for reception of funds

Since the swaps from an user's ETH transfer to the stablecoin of the Account can fail due to slippage, it cannot be guaranteed with absolute certainty that the user will always, 100% of the times, receive the Account's stablecoin in L2 in the end of flow.

To fully grasp the different scenarios, it is important to understand the *Conversion Flow* diagram from above. Having this mentioned, these are all the possible schemes that could happen for the reception of funds:

100% Account stablecoin

The user receives the full amount of funds in the Account's stablecoin.

If a decent slippage is chosen and there's enough liquidity in the Curve pool of the swap, in comparison to the amount being swapped (aka the amount of ETH sent to the Account), this scenario will occur almost every single time.

(It's the *Conversion Flow* diagram from above)

Contracts and Files

Ethereum

Contract (.sol)
Type
Mechanism

Implementation

Custom-made with UUPSUpgradeable

Immutable

Custom-made

Implementation

Custom-made

Immutable

Custom-made

Read the details of the connections here.

Akash

File (.js)
Type
Mechanism

event-listener

nodejs

The Graph

while-fork

nodejs

Multi-threading using child_process module

redeem-fork

nodejs

Multi-threading using child_process module

Read the details of the connections here.

Arbitrum

Files with "*" are implementations of the main proxy.

"^" means as above.

Contract (.sol)
Type
Mechanism

Proxy

Modified Diamond Pattern (EIP 2535)

Adds/removes functions *

^

Queries sys components *

^

Handles owner's revenue *

^

Funding logic *

^

OZL token methods *

^

Main middleware implementation *

^

Main exec methods *

^

Ownership methods *

^

Factory of Accounts in L2

^

Accounting of manual redeems

Custom-made

Read the details of the connections here

Last updated