Skip to content

Commit

Permalink
'Contest repo init'
Browse files Browse the repository at this point in the history
  • Loading branch information
c4-audit committed Oct 16, 2024
0 parents commit 82d6be8
Show file tree
Hide file tree
Showing 467 changed files with 97,412 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pkg/target
pkg/*.wasm
pkg/out
pkg/*.rlib
Dockerfile.*
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**/*.png filter=lfs diff=lfs merge=lfs -text
**/*.jpe?g filter=lfs diff=lfs merge=lfs -text
static/* filter=lfs diff=lfs merge=lfs -text
*/*.pdf filter=lfs diff=lfs merge=lfs -text
**/*.svg filter=lfs diff=lfs merge=lfs -text
**/*.gif filter=lfs diff=lfs merge=lfs -text
static/embed.png filter=lfs diff=lfs merge=lfs -text
static/empty filter=lfs diff=lfs merge=lfs -text
static/privacy-policy.pdf filter=lfs diff=lfs merge=lfs -text
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# misc
.zed/
.idea/

# pkg
pkg/target
pkg/*.wasm
pkg/*.wasm-small
pkg/out
pkg/*.rlib
/web/.env
*.zip

# IDE
.vscode/

.DS_Store
+Errors
11 changes: 11 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[submodule "pkg/contracts/lib/forge-std"]
path = pkg/contracts/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "lib/forge-std"]
branch = v1.6.1
[submodule "pkg/lib/forge-std"]
path = pkg/lib/forge-std
url = https://github.com/foundry-rs/forge-std
[submodule "automation/nitro-testnode"]
path = automation/nitro-testnode
url = https://github.com/OffchainLabs/nitro-testnode
3 changes: 3 additions & 0 deletions 4naly3er-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Nothing to see here… *yet*

This placeholder file will be replaced with the output of [Picodes' 4naly3er tool](https://github.com/Picodes/4naly3er) during the scouting process.
15 changes: 15 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

# Authors

Thanks to all the people who contributed to this repo!

| Name | Description |
|-----------------------------------------|------------------------------------------------------------|
| Aidan Kinzett (Labrys) | Implemented the UI, and the graph interaction. |
| Ben Hooper (Labrys) | Supported UI development with contract insights. |
| Eli Demoulin (Fluidity Labs) | Testing infrastructure, frontend and quoter. Database too. |
| Elle Katerina Valentine (Fluidity Labs) | Original author of the smart contracts. |
| Erin Allen (Labrys) | Project managed the first UI sprint. |
| Luke Shulver (Labrys) | Project managed the second UI sprint. |
| Marcelo Grebois | Implemented deployment code/infrastructure. |
| Ogous Chan Ali (Fluidity Labs) | Implemented parts of Longtail frontend, and testing |
33 changes: 33 additions & 0 deletions Dockerfile.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

FROM golang:alpine3.19 AS builder

RUN apk add --no-cache \
openssl \
ca-certificates \
make \
bash \
curl \
gcc \
musl-dev

ENV SUPERPOSITION_DIR /usr/local/src/superposition

WORKDIR ${SUPERPOSITION_DIR}

COPY go.mod .
COPY go.sum .

RUN go mod download

COPY lib lib/
COPY cmd cmd/
COPY config config/

ENV INSTALL_DIR /bin

RUN sh -c 'cd cmd/graphql.ethereum && make install'

FROM scratch
WORKDIR /bin
COPY --from=builder /bin/graphql.ethereum .
CMD ["graphql.ethereum"]
32 changes: 32 additions & 0 deletions Dockerfile.ingestor
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

FROM golang:alpine3.19 AS builder

RUN apk add --no-cache \
openssl \
ca-certificates \
make \
bash \
curl \
gcc \
musl-dev

ENV SUPERPOSITION_DIR /usr/local/src/superposition

WORKDIR ${SUPERPOSITION_DIR}

COPY go.mod .
COPY go.sum .

RUN go mod download

COPY lib lib/
COPY cmd cmd/

ENV INSTALL_DIR /bin

RUN sh -c 'cd cmd/ingestor.logs.ethereum && make install'

FROM scratch
WORKDIR /bin
COPY --from=builder /bin/ingestor.logs.ethereum .
CMD ["ingestor.logs.ethereum"]
7 changes: 7 additions & 0 deletions HACKING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# Longtail

Longtail is powered by Seawater, a concentrated liquidity AMM. It lives in the
`pkg/seawater` directory, with some code to dispatch into it living in `pkg/sol`.

## Developing on Longtail
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright 2024 Fluidity Labs

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

.PHONY: build contract docker docker-graphql docker-ingestor

all: build

build: contract

contract:
@cd pkg && make

docker: docker-graphql docker-ingestor

docker-graphql:
@docker build -t superposition/graphql -f Dockerfile.graphql .

docker-ingestor:
@docker build -t superposition/ingestor -f Dockerfile.ingestor .
19 changes: 19 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# Attributions

The following less-popular libraries are modified and used in this
codebase:

## 0xkitsune Uniswap math library

This code makes heavy use of
[0xkitsune](https://twitter.com/0xkitsune)'s Rust Uniswap maths code
[uniswap-v3-math](https://github.com/0xKitsune/uniswap-v3-math).

A reference for our use is mostly distributed in
`pkg/seawater/tests/reference/`.

## Uniswap V3

Uniswap for open sourcing your ideas and code, and for popularising/inventing concentrated
liquidity math.
30 changes: 30 additions & 0 deletions README-sponsor.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

# Longtail AMM (Superposition AMM) [![codecov](https://codecov.io/gh/fluidity-money/long.so/graph/badge.svg?token=LIRGRUVdTr)](https://codecov.io/gh/fluidity-money/long.so)

Longtail AMM is Arbitrum's most rewarding AMM, made possible with
Stylus. Longtail AMM leverages Super Assets to reward every on-chain
transaction with yield, whilst remaining the most affordable AMM with
a low gas profile leveraging Stylus.

Stylus is a WASM frontend to the standard EVM stack made available
exclusively on Arbitrum.

## Learn more about Stylus

https://arbitrum.io/stylus

## Addresses

Deployment addresses are available in pkg/README.md.

## Contributing

[HACKING.md](HACKING)

## Security

[Security instructions](https://github.com/fluidity-money/long.so/blob/development/SECURITY)

## Contributors

[Contributors](https://github.com/fluidity-money/long.so/blob/development/AUTHORS.md)
Loading

0 comments on commit 82d6be8

Please sign in to comment.