Skip to content

Commit

Permalink
Re-Organize README sections
Browse files Browse the repository at this point in the history
  • Loading branch information
YamenMerhi authored Aug 7, 2024
1 parent 7a9ff04 commit e9cae56
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,6 @@ The AutoSwapV3 contract is specifically designed to work with LSP7-DigitalAsset
- Works with LSP7-DigitalAsset tokens
- Works with UniversalSwapsV3

## Setup

This contract needs to be set as the **UniversalReceiverDelegate** for a Universal Profile and should be given the necessary permissions to execute from this profile. In the case of ownership via **LSP6-KeyManager**, it should be given **SUPER_CALL** and **REENTRANCY** permissions.

## Oracle Integration

The AutoSwapV3 contract should include an oracle that feeds the minimum amount of tokens that the user is willing to receive. This amount should be reasonable based on a preferred deviation to protect against sandwich attacks.

## Flow Diagram

The following diagram illustrates the flow of a token transfer and automatic swap:
Expand Down Expand Up @@ -55,6 +47,14 @@ sequenceDiagram
6. The token contract authorize the UniversalRouter and the authorization data contain the logic for the swap
7. The swap result is returned through the chain of contracts back to AutoSwapV3 and the UniversalProfile

## Setup

This contract needs to be set as the **UniversalReceiverDelegate** for a Universal Profile and should be given the necessary permissions to execute from this profile. In the case of ownership via **LSP6-KeyManager**, it should be given **SUPER_CALL** and **REENTRANCY** permissions.

## Oracle Integration

The AutoSwapV3 contract should include an oracle that feeds the minimum amount of tokens that the user is willing to receive. This amount should be reasonable based on a preferred deviation to protect against sandwich attacks.

## Usage

To use the AutoSwapV3 contract:
Expand Down

0 comments on commit e9cae56

Please sign in to comment.