Arbitrum

circle-info

Open methods -> called externally (not all external functions are Open). Owner methods -> called by the deployer. System methods -> called by other functions within the system.

Account methods -> called by the owner of each Account

Only the main functions are included in these docs.

General framework

The whole system in L2 is a slightly modified version of the Diamond Proxy pattern (aka EIP 2535) with multiple facets (aka implementations) that control the logic and accounting of the funds received and/or invested.

The general overview of the Diamond can be found herearrow-up-right.

Optimistic scenario

ETH is sent out, along the Account's config, from ozPayMe in L1, using Arbitrum's retryable ticket techniquearrow-up-right, to the OZLFacet in L2, where the protocol fee is charged and then deposited in DeFi (Curve and Yearn at the moment) for generating yield. This yield plus the deposited fees belong to the users of the protocol in direct proportion (to 100 using the OZL token which has a totalSupply of 100) to the amount of payments (aka ETH transfers) that they've routed through the system.

Before routing to the OZLFacet, and depending on the selector of the call, the deposited fees in DeFi are queried in order to tell if a tier of the owner's future revenue is met which would start the proper allocation.

Pessimistic scenario

Problem: The L2 gas price submitted when creating the retryable ticket in L1 is not enough, so the transaction is not auto-redeemed. Funds (user's ETH) don't arrive to the OZLFacet.

Solution: One of the Akash deployments manually redeems the transaction.

Last updated