Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tranche Init #40

Merged
merged 11 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ jobs:
with:
submodules: recursive
fetch-depth: 0

# https://github.com/actions/runner-images/issues/2840#issuecomment-2272410832
- run: |
sudo rm -rf \
"$AGENT_TOOLSDIRECTORY" \
/opt/google/chrome \
/opt/microsoft/msedge \
/opt/microsoft/powershell \
/opt/pipx \
/usr/lib/mono \
/usr/local/julia* \
/usr/local/lib/android \
/usr/local/lib/node_modules \
/usr/local/share/chromium \
/usr/local/share/powershell \
/usr/share/dotnet \
/usr/share/swift
df -h

- name: Install Nix
uses: DeterminateSystems/nix-installer-action@v4
Expand Down
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ libs = ["lib"]
solc = "0.8.25"

# See more config options https://github.com/foundry-rs/foundry/blob/master/crates/config/README.md#all-options
optimizer = true
optimizer_runs = 1000000
evm_version = "cancun"
bytecode_hash = "none"
cbor_metadata = false

# Needed for dotrain compose
ffi = true
Expand Down
21 changes: 10 additions & 11 deletions strategies/dca-orcale-univ3.rain
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ networks:
currency: ETH

subgraphs:
base-community: https://api.thegraph.com/subgraphs/name/h20liquidity/base-0x2aee87
base-community: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-base/0.3/gn

orderbooks:
base-community:
address: 0xA2f56F8F74B7d04d61f281BE6576b6155581dcBA
address: 0x7A44459893F99b9d9a92d488eb5d16E4090f0545
network: base-community
subgraph: base-community

Expand Down Expand Up @@ -65,7 +65,7 @@ scenarios:
bindings:
# Ask for now, registry in future.
uniswap-words: 0xD6B34F97d4A8Cb38D0544dB241CB3f335866f490
orderbook-subparser: 0x8D96ea3EF24D7123882c51CE4325b89bc0d63f9e
orderbook-subparser: 0x762adD85a30A83722feF2e029087C9D110B6a7b3

# Uniswap V3 factory addresses and init code
uniswap-v3-factory: 0x33128a8fC17869897dcE68Ed026d694621f6FDfD
Expand Down Expand Up @@ -169,10 +169,8 @@ scenarios:
backtest:
runs: 1
blocks:
type: RangeWithInterval
value:
range: [17245659..17257087]
interval: 1000
range: [17245659..17257087]
interval: 1000
bindings:
enforce-twap-check: '''enforce-twap-check-chart'
ensure-min-ratio: '''ensure-min-ratio-chart'
Expand Down Expand Up @@ -264,10 +262,8 @@ scenarios:
backtest:
runs: 1
blocks:
type: RangeWithInterval
value:
range: [17245659..17257087]
interval: 1000
range: [17245659..17257087]
interval: 1000
bindings:
enforce-twap-check: '''enforce-twap-check-chart'
ensure-min-ratio: '''ensure-min-ratio-chart'
Expand Down Expand Up @@ -699,3 +695,6 @@ deployments:
)
"Partial trade"
);

#post-add-order
:;
13 changes: 6 additions & 7 deletions strategies/multiple-limit.rain
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ networks:
currency: ETH

subgraphs:
base-community: https://api.thegraph.com/subgraphs/name/h20liquidity/base-0x2aee87
base-community: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-base/0.3/gn

orderbooks:
base-community:
address: 0xA2f56F8F74B7d04d61f281BE6576b6155581dcBA
address: 0x7A44459893F99b9d9a92d488eb5d16E4090f0545
network: base-community
subgraph: base-community

Expand Down Expand Up @@ -66,7 +66,7 @@ scenarios:
bindings:
# Ask for now, registry in future.
uniswap-words: 0xD6B34F97d4A8Cb38D0544dB241CB3f335866f490
orderbook-subparser: 0x8D96ea3EF24D7123882c51CE4325b89bc0d63f9e
orderbook-subparser: 0x762adD85a30A83722feF2e029087C9D110B6a7b3

# Uniswap V3 factory addresses and init code
uniswap-v3-factory: 0x33128a8fC17869897dcE68Ed026d694621f6FDfD
Expand Down Expand Up @@ -111,8 +111,6 @@ scenarios:
backtest:
runs: 1
blocks:
type: RangeWithInterval
value:
range: [17245659..17257087]
interval: 1000
bindings:
Expand Down Expand Up @@ -155,8 +153,6 @@ scenarios:
backtest:
runs: 1
blocks:
type: RangeWithInterval
value:
range: [17245659..17257087]
interval: 1000
bindings:
Expand Down Expand Up @@ -393,3 +389,6 @@ deployments:
trade-count-key: hash(order-hash() count-key),
trade-count: get(trade-count-key),
:set(trade-count-key add(trade-count 1));

#post-add-order
:;
23 changes: 11 additions & 12 deletions strategies/stop-limit.rain
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ networks:
currency: ETH

subgraphs:
base-community: https://api.thegraph.com/subgraphs/name/h20liquidity/base-0x2aee87
base-community: https://api.goldsky.com/api/public/project_clv14x04y9kzi01saerx7bxpg/subgraphs/ob4-base/0.3/gn

orderbooks:
base-community:
address: 0xA2f56F8F74B7d04d61f281BE6576b6155581dcBA
address: 0x7A44459893F99b9d9a92d488eb5d16E4090f0545
network: base-community
subgraph: base-community

Expand Down Expand Up @@ -62,7 +62,7 @@ scenarios:
bindings:
# Ask for now, registry in future.
uniswap-words: 0xD6B34F97d4A8Cb38D0544dB241CB3f335866f490
orderbook-subparser: 0x8D96ea3EF24D7123882c51CE4325b89bc0d63f9e
orderbook-subparser: 0x762adD85a30A83722feF2e029087C9D110B6a7b3

# Uniswap V3 factory addresses and init code
uniswap-v3-factory: 0x33128a8fC17869897dcE68Ed026d694621f6FDfD
Expand Down Expand Up @@ -102,10 +102,8 @@ scenarios:
backtest:
runs: 1
blocks:
type: RangeWithInterval
value:
range: [17245659..17257087]
interval: 1000
range: [17245659..17257087]
interval: 1000
bindings:
plottables: '''plottables-backtest'
get-trade-count: '''get-trade-count-prod'
Expand Down Expand Up @@ -141,10 +139,8 @@ scenarios:
backtest:
runs: 1
blocks:
type: RangeWithInterval
value:
range: [17245659..17257087]
interval: 1000
range: [17245659..17257087]
interval: 1000
bindings:
plottables: '''plottables-backtest'
get-trade-count: '''get-trade-count-prod'
Expand Down Expand Up @@ -351,4 +347,7 @@ deployments:
#handle-io
trade-count-key: hash(order-hash() count-key),
trade-count: get(trade-count-key),
:set(trade-count-key add(trade-count 1));
:set(trade-count-key add(trade-count 1));

#post-add-order
:;
17 changes: 8 additions & 9 deletions strategies/trireme/dca-oracle-univ2.rain
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,8 @@ scenarios:
backtest:
runs: 1
blocks:
type: RangeWithInterval
value:
range: [59857426..]
interval: 1000
range: [59857426..]
interval: 1000
bindings:
plottables: '''plottables-backtest'
ensure-min-ratio: '''ensure-min-ratio-chart'
Expand Down Expand Up @@ -242,10 +240,8 @@ scenarios:
backtest:
runs: 1
blocks:
type: RangeWithInterval
value:
range: [59857426..]
interval: 1000
range: [59857426..]
interval: 1000
bindings:
plottables: '''plottables-backtest'
ensure-min-ratio: '''ensure-min-ratio-chart'
Expand Down Expand Up @@ -676,4 +672,7 @@ deployments:
scale-n-dynamic(output-token-decimals() calculated-max-output())
)
"Partial trade"
);
);

#post-add-order
:;
Loading
Loading