Skip to content

Commit

Permalink
add simple readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszaaa committed Oct 14, 2024
1 parent f13c8b7 commit c7dcbdf
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
1 change: 0 additions & 1 deletion ferry-withdrawal/.env
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ MANGATA_CONTRACT_ADDRESS=0x1429859428C0aBc9C2C47C8Ee9FBaf82cFA0F20f
PRIVATE_KEY=0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97
TOKENS_TO_TRACK='[["0xFD471836031dc5108809D173A067e8486B9047A3", 1, 1]]'
L1_CHAIN="Ethereum"
MIN_PROFIT=1000000000000000000000
TX_COST=1000000000000000000000
LOOK_BACK_HOURS=1
LOG=silly
19 changes: 19 additions & 0 deletions ferry-withdrawal/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Withdrawal ferry service
Service responsible for ferrying withdrawals from `GASP` to `L1`. To speed up the withdrawal time. While it make require significant amount of time for withdrawal to go through *EigenLayer* and be validated ferry service aims to lend tokens to the users and claim tokens back from the rolldown contract whenever particular withdrawal is ready to be closed. Ferry find all ferryable withdrawals by checking state of L1 & L2 blockchains, then rates them based on `TOKENS_TO_TRACK` taking into account available balance, expected minimum profit and assigned weight.

## Configuration
Service is configurable through env file supporting below parameters:
* `MANGATA_NODE_URL` - L2 websocket address
* `ETH_CHAIN_URL` - L1 websocket address
* `MANGATA_CONTRACT_ADDRESS` - Rolldown contract address
* `PRIVATE_KEY` - Ethereum private key(used to sign ferry txs)
* `TOKENS_TO_TRACK` - List of tokens to track in json format. Input is expected to have following format:
```
'[["0xFD471836031dc5108809D173A067e8486B9047A3", 100000000000000, 1]]'
TOKEN ADDRESS MINIMUM PROFIT WEIGHT
```
* `L1_CHAIN` - `Ethereum` or `Arbitrum`
* `TX_COST` - Estimated tx cost in gwei (to take into account when considering native token ferries)
* `LOOK_BACK_HOURS` - period of time in past that ferry should be looking for past withdrawals that might be ready to close
* `LOG` - log level as in `winston` (`error`,`info`, `debug`, `silly`)
10 changes: 10 additions & 0 deletions ferry-withdrawal/env-template
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
MANGATA_NODE_URL=ws://127.0.0.1:9944
ETH_CHAIN_URL=http://127.0.0.1:8545
MANGATA_CONTRACT_ADDRESS=0x1429859428C0aBc9C2C47C8Ee9FBaf82cFA0F20f
PRIVATE_KEY=0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97
TOKENS_TO_TRACK='[["0xFD471836031dc5108809D173A067e8486B9047A3", 1, 1]]'
L1_CHAIN="Ethereum"
MIN_PROFIT=1000000000000000000000
TX_COST=1000000000000000000000
LOOK_BACK_HOURS=1
LOG=silly

0 comments on commit c7dcbdf

Please sign in to comment.