├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ ├── slither.yml │ └── test.yml ├── .gitignore ├── .gitmodules ├── .husky └── pre-commit ├── .prettierignore ├── .prettierrc ├── .slither.config.json ├── .solhint.json ├── .solhintignore ├── .vscode └── settings.json ├── LICENSE ├── README.md ├── alchemy-retry.py ├── discord-export ├── Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html ├── Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files │ ├── 0-EB806.png │ ├── 02410a37de8a54f8cfb7a8842a2dd162-D2755.png │ ├── 0afc1ac766d7759ba3df429cccb8f500-074A6.png │ ├── 0bfce954f01a89faf77cf4344f557d71-E0190.png │ ├── 1-B2132.png │ ├── 1080667809002037320-8957D.png │ ├── 110f775d82ef47eeb4a71bbd43de83da-426FA.png │ ├── 134a97341ef016a343ffb22a13e06e84-C9997.png │ ├── 146464eb9e5f1322355fc03324ad0077-EA70E.png │ ├── 1c87b7948abe9f6c3e72f70becc58949-51ACA.png │ ├── 1dc9ff6bb6cbf768aa6b8f1f250a6a40-FC74B.png │ ├── 1f37a-390B2.svg │ ├── 1f389-5C738.svg │ ├── 1f38a-8FB83.svg │ ├── 1f3c1-445DC.svg │ ├── 1f3c6-621A1.svg │ ├── 1f43a-EB486.svg │ ├── 1f440-6C64D.svg │ ├── 1f441-405F2.svg │ ├── 1f446-9CC34.svg │ ├── 1f44b-1f3fb-E6912.svg │ ├── 1f44b-8A059.svg │ ├── 1f44d-1f3fb-ED2AA.svg │ ├── 1f44d-27259.svg │ ├── 1f44f-3D381.svg │ ├── 1f494-B74A3.svg │ ├── 1f49a-E8B01.svg │ ├── 1f49c-71A75.svg │ ├── 1f4af-4CFF5.svg │ ├── 1f4b8-E3468.svg │ ├── 1f4c6-44E30.svg │ ├── 1f4dc-AC641.svg │ ├── 1f50d-195C0.svg │ ├── 1f602-168C5.svg │ ├── 1f603-5E531.svg │ ├── 1f604-BF863.svg │ ├── 1f605-42B43.svg │ ├── 1f609-9EC67.svg │ ├── 1f62d-02603.svg │ ├── 1f639-E6A85.svg │ ├── 1f642-83E8A.svg │ ├── 1f64c-7C820.svg │ ├── 1f64f-22B8D.svg │ ├── 1f6a8-A8AB3.svg │ ├── 1f911-F346C.svg │ ├── 1f937-19884.svg │ ├── 1f972-F415D.svg │ ├── 1f973-88B39.svg │ ├── 1f979-BE2CD.svg │ ├── 1f9d1-5BC80.svg │ ├── 1fae1-B19DE.svg │ ├── 1fae4-39628.svg │ ├── 249472be93c2c5d7d5b8958288c67706-CD488.png │ ├── 2520cad5f6c9d82566e4af0f37d9b95e-2A259.png │ ├── 2696-15F4A.svg │ ├── 2705-0589F.svg │ ├── 2764-A3D25.svg │ ├── 2a9faff195fe333526cfe6ae6fce1420-49B98.png │ ├── 2af0f89843ae811fe0fe7dff2f3003f9-E2C18.png │ ├── 3-FB033.png │ ├── 30024f2eab00f1f2f2caee60d2b320a7-9F811.png │ ├── 310bb104d49148a05def03fa039fef92-D894A.png │ ├── 394983eda2eb8faf909901fe09d16b4b-BAFA3.png │ ├── 3b01c38b7c5b905fd8e8a1d72f7d7492-53427.png │ ├── 3df652e9459bdc264f05c541d2fc66ed-49E08.png │ ├── 402b68164a51455e395a06ad04fc04b5-D7A38.png │ ├── 406ES17U_400x400-E842A.jpg │ ├── 47c22349beb07ff08b7d61406da2c1a8-6AC2E.png │ ├── 55afac51a32db1ff015fd3a7d901e67a-A5862.png │ ├── 579ee33c65584c463687960bec679235-EAA46.png │ ├── 5b069e074423293b86222b4350052da5-836F0.png │ ├── 5d084bf7a4698ae3113c164cdd53ccbe-F4903.png │ ├── 607629203743178768-31BF8.png │ ├── 60be1574a04aef160015bebc5c988cda-0DDA5.png │ ├── 67594ee4b4d1fc03bca468327a0d145b-BD76A.png │ ├── 693616141775667260-54DCE.png │ ├── 6a00e12240ed2ee2b1768b577982163b-1CF1D.png │ ├── 6b3e8db133891c8c0be08fb8b4fe9bff-36B4D.png │ ├── 747989798740033546-1D010.gif │ ├── 813459168405094431-A6A4A.png │ ├── 81cdaa2b2c4db53da734dd55c3d55908-4DC39.png │ ├── 82287b4212a9854e5730462bd70677ae-E8BF4.png │ ├── 84ab5ab9f1a4d6f40cd93ab7bd138e28-075B3.png │ ├── 851893157188599838-C23B5.png │ ├── 851893827027075142-F23DF.png │ ├── 851893827089727568-5FD38.png │ ├── 851893827278602280-FABCC.png │ ├── 851893827315826708-F59C0.png │ ├── 851893828280909886-FBF42.png │ ├── 907282449598406696-84D3D.gif │ ├── 90abcaff147cdcd8fa62f4945a960d54-85A8D.png │ ├── 910676187288846397-518CD.png │ ├── 948839162797244417-CA9F9.gif │ ├── 96119e14c860edbac5f4d243e683a992-3E151.png │ ├── 966eaf1aafcae6abcb9e0db823947e2f-96F55.png │ ├── 970d2e2f00cd7ef2134a1a3f21326349-404EA.png │ ├── 98446738-1A1F9 │ ├── 9bf2181404e658cab4039c07df56213f-E3E89.png │ ├── 9c068826a94f6e1d158939c8f708ded9-52A19.png │ ├── 9d62cded-f3b0-4a85-90b4-5519fadcb5e1-8509D │ ├── C4-banner-7C19B.png │ ├── Captura_de_Pantalla_2023-01-09_a_las_14.35-546C7.png │ ├── Screen_Shot_2023-01-14_at_2.01.48_PM-A70AD.png │ ├── Screenshot_2023-01-08_at_00.38.31-71BD0.png │ ├── Screenshot_20230117-232638_Discord-A46EC.jpg │ ├── Screenshot_from_2023-01-18_09-00-20-44746.jpg │ ├── _hOQSYivKsSjdqFXvNkojE06w22qJWUXZFnGPI5AkX-8F6DD │ ├── a36cb7b26a8fd70f4f296a94c3cf5a9d-65F28.png │ ├── a46a59d6636619f3cc132c12dba469a6-7A310.png │ ├── a711f2f0aba42dc58cc2a1c1a0fb450d-25A55.png │ ├── abb480ed1510d7994e58bc85f8e989d6-66497.png │ ├── ae70f07a06c1c7e983291bb14a1bed7f-45C67.png │ ├── apple-touch-icon-192x192-E344C.png │ ├── b5d13a47fb4f5d6e32aead2c13818601-C5763.png │ ├── c4udit-BDF0F │ ├── cc8374ec433b7627e95f914e72deb9a1-5C229.png │ ├── d3029f014df2fb20be21078c2dc63484-2DF40.png │ ├── d8dcf8df971c647c00a5ee21fa454062-9C5EC.png │ ├── dcb7d2f024474aecc9a8bde890716475-19E85.png │ ├── e7257551b8b85f83bd08f1cfdf84108c-42180.png │ ├── ed9f5cb0bd405c6e205564856f31d4a0-41781.png │ ├── efeb528c72d09ccdb81db8dfec85b9a9-88176.png │ ├── f2f96fb7c4982cfb57a977d1e9c0b541-1A82F.png │ ├── f4944b4c85016d774d9ec27532a0fcc4-26A77.png │ ├── f7147bfadb72a2afd2401e5071b39609-7268B.png │ ├── fa7b20a49a4577b4953a28313bd9515f-A83AD.png │ ├── fac84f51198cfd9481fe552ffd370edf-FDB0A.png │ ├── ggsans-italic-400-E988B.woff2 │ ├── ggsans-italic-500-0777F.woff2 │ ├── ggsans-italic-600-CB411.woff2 │ ├── ggsans-italic-700-891AC.woff2 │ ├── ggsans-italic-800-D36B0.woff2 │ ├── ggsans-normal-400-1456D.woff2 │ ├── ggsans-normal-500-89CE5.woff2 │ ├── ggsans-normal-600-C1EA8.woff2 │ ├── ggsans-normal-700-1949A.woff2 │ ├── ggsans-normal-800-58487.woff2 │ ├── giphy-1E98E.mp4 │ ├── gist-og-image-17482.png │ ├── highlight.min-D8D27.js │ ├── image-124E3.png │ ├── image0-AEB97.jpg │ ├── kapha-7BDDA.mp4 │ ├── lottie.min-99657.js │ ├── pedro-monkey-puppet-1F309.mp4 │ ├── solarized-dark.min-BA98F.css │ └── spider-man-spider-man-web-of-shadows-89EA9.mp4 ├── Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt └── Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files │ ├── 98446738-1A1F9 │ ├── 9d62cded-f3b0-4a85-90b4-5519fadcb5e1-8509D │ ├── C4-banner-7C19B.png │ ├── Captura_de_Pantalla_2023-01-09_a_las_14.35-546C7.png │ ├── Screen_Shot_2023-01-14_at_2.01.48_PM-A70AD.png │ ├── Screenshot_2023-01-08_at_00.38.31-71BD0.png │ ├── Screenshot_20230117-232638_Discord-A46EC.jpg │ ├── Screenshot_from_2023-01-18_09-00-20-44746.jpg │ ├── _hOQSYivKsSjdqFXvNkojE06w22qJWUXZFnGPI5AkX-8F6DD │ ├── c4udit-BDF0F │ ├── giphy_s-66A1C.gif │ ├── gist-og-image-17482.png │ ├── image-124E3.png │ ├── image0-AEB97.jpg │ ├── kapha-D09CD.png │ ├── pedro-monkey-puppet-66918.png │ └── spider-man-spider-man-web-of-shadows-ACB4C.png ├── docker-compose.yml ├── docker ├── anvil │ └── docker-entrypoint.sh └── foundry │ └── Dockerfile ├── foundry.toml ├── package.json ├── remappings.txt ├── scripts ├── boot-system.sh ├── fetch-abi.sh ├── forked-test.sh ├── install.sh ├── loan-proof-generator.js └── verify.sh ├── src ├── .gas-snapshot ├── AstariaRouter.sol ├── AstariaVaultBase.sol ├── AuthInitializable.sol ├── BeaconProxy.sol ├── ClearingHouse.sol ├── CollateralToken.sol ├── LienToken.sol ├── PublicVault.sol ├── TransferProxy.sol ├── Vault.sol ├── VaultImplementation.sol ├── WithdrawProxy.sol ├── WithdrawVaultBase.sol ├── actions │ └── UNIV3 │ │ └── ClaimFees.sol ├── interfaces │ ├── IAstariaRouter.sol │ ├── IAstariaVaultBase.sol │ ├── IBeacon.sol │ ├── ICollateralToken.sol │ ├── IERC1155.sol │ ├── IERC1155Receiver.sol │ ├── IERC165.sol │ ├── IERC20.sol │ ├── IERC20Metadata.sol │ ├── IERC4626.sol │ ├── IERC721.sol │ ├── IERC721Receiver.sol │ ├── IFlashAction.sol │ ├── ILienToken.sol │ ├── IPublicVault.sol │ ├── IRouterBase.sol │ ├── ISecurityHook.sol │ ├── IStrategyValidator.sol │ ├── ITransferProxy.sol │ ├── IV3PositionManager.sol │ ├── IVaultImplementation.sol │ └── IWithdrawProxy.sol ├── libraries │ ├── Base64.sol │ └── CollateralLookup.sol ├── scripts │ ├── Setup.sol │ ├── deployments │ │ ├── AstariaStack.sol │ │ ├── Deploy.sol │ │ └── strategies │ │ │ ├── CollectionStrategy.sol │ │ │ ├── UniqueStrategy.sol │ │ │ └── V3Strategy.sol │ └── setup │ │ └── GoerliSetup.sol ├── security │ └── V3SecurityHook.sol ├── strategies │ ├── CollectionValidator.sol │ ├── UNI_V3Validator.sol │ └── UniqueValidator.sol ├── test │ ├── AstariaTest.t.sol │ ├── ForkedTesting.t.sol │ ├── IntegrationTest.t.sol │ ├── RevertTesting.t.sol │ ├── TestHelpers.t.sol │ ├── WETH9.json │ ├── WithdrawTesting.t.sol │ └── utils │ │ └── Strings2.sol └── utils │ ├── Initializable.sol │ ├── Math.sol │ ├── MerkleProofLib.sol │ └── Pausable.sol └── yarn.lock /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | artifacts 3 | cache 4 | coverage 5 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: false, 4 | es2021: true, 5 | mocha: true, 6 | node: true, 7 | }, 8 | extends: ["plugin:prettier/recommended"], 9 | parserOptions: { 10 | ecmaVersion: 12, 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /.github/workflows/slither.yml: -------------------------------------------------------------------------------- 1 | name: slither-analysis 2 | 3 | # Controls when the workflow will run 4 | on: 5 | pull_request: 6 | branches: [ master, develop, release/* ] 7 | push: 8 | branches: [ develop ] 9 | 10 | jobs: 11 | analyze: 12 | runs-on: ubuntu-latest 13 | outputs: 14 | markdown: '${{ steps.slither.outputs.markdown }}' 15 | steps: 16 | - name: Checkout repository 17 | uses: actions/checkout@v3 18 | with: 19 | submodules: recursive 20 | token: ${{ secrets.MY_REPO_PAT }} 21 | 22 | - name: Set up Node 23 | uses: actions/setup-node@v2 24 | 25 | - name: Run Slither 26 | uses: astariaxyz/slither-action@main 27 | id: slither 28 | continue-on-error: true 29 | with: 30 | target: './src' 31 | node-version: 16 32 | slither-config: '.slither.config.json' 33 | slither-args: '--checklist --markdown-root "https://github.com/astariaxyz/nft-bond-vault/blob/$(git rev-parse HEAD)" --filter-paths "lib"' 34 | markdown: results.md 35 | # - name: Checkout 36 | # uses: actions/checkout@v2 37 | - uses: popsiclestick/gist-sync-action@v1.2.0 38 | id: sync 39 | with: 40 | auth: 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 41 | gist_url: https://gist.github.com/SantiagoGregory/4a2d82e7fc788d8696fe13a5106a67e4 42 | gist_title: astaria_slither.md 43 | gist_description: Hosted slither output logs 44 | github_file: results.md 45 | - name: "Post to PR" 46 | uses: EliLillyCo/github-actions-post-to-pr@main 47 | with: 48 | github_token: ${{ secrets.MY_REPO_PAT }} 49 | post_to_pr_definition: | 50 | [ 51 | { 52 | "message_file": "${{ steps.slither.outputs.markdown }}", 53 | "title": "Slither Analysis" 54 | } 55 | ] 56 | 57 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | on: 2 | pull_request: 3 | branches: 4 | - master 5 | - develop 6 | 7 | name: test 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - name: Checkout repository 15 | uses: actions/checkout@v3 16 | with: 17 | submodules: recursive 18 | token: ${{ secrets.MY_REPO_PAT }} 19 | 20 | - uses: actions/setup-node@v2 21 | - run: yarn 22 | - uses: onbjerg/foundry-toolchain@v1 23 | with: 24 | version: nightly 25 | - run: forge test --ffi --no-match-contract ForkedTest -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | coverage 4 | coverage.json 5 | typechain 6 | abi 7 | dist 8 | cache 9 | artifacts 10 | out 11 | 12 | .idea 13 | .DS_Store 14 | 15 | lcov.info 16 | yarn-error.log 17 | 18 | # Logs 19 | logs 20 | *.log 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | lerna-debug.log* 25 | 26 | # Diagnostic reports (https://nodejs.org/api/report.html) 27 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 28 | 29 | # Runtime data 30 | pids 31 | *.pid 32 | *.seed 33 | *.pid.lock 34 | 35 | # Directory for instrumented libs generated by jscoverage/JSCover 36 | lib-cov 37 | 38 | # Coverage directory used by tools like istanbul 39 | coverage 40 | *.lcov 41 | coverage.json 42 | 43 | # nyc test coverage 44 | .nyc_output 45 | 46 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 47 | .grunt 48 | 49 | # Bower dependency directory (https://bower.io/) 50 | bower_components 51 | 52 | # node-waf configuration 53 | .lock-wscript 54 | 55 | # Compiled binary addons (https://nodejs.org/api/addons.html) 56 | build/Release 57 | 58 | # Dependency directories 59 | node_modules/ 60 | jspm_packages/ 61 | 62 | # TypeScript v1 declaration files 63 | typings/ 64 | 65 | # TypeScript cache 66 | *.tsbuildinfo 67 | 68 | # Optional npm cache directory 69 | .npm 70 | 71 | # Optional eslint cache 72 | .eslintcache 73 | 74 | # Microbundle cache 75 | .rpt2_cache/ 76 | .rts2_cache_cjs/ 77 | .rts2_cache_es/ 78 | .rts2_cache_umd/ 79 | 80 | # Optional REPL history 81 | .node_repl_history 82 | 83 | # Output of 'npm pack' 84 | *.tgz 85 | 86 | # Yarn Integrity file 87 | .yarn-integrity 88 | 89 | # dotenv environment variables file 90 | .env 91 | .env.test 92 | 93 | # parcel-bundler cache (https://parceljs.org/) 94 | .cache 95 | 96 | # Next.js build output 97 | .next 98 | 99 | # Nuxt.js build / generate output 100 | .nuxt 101 | dist 102 | 103 | # Gatsby files 104 | .cache/ 105 | # Comment in the public line in if your project uses Gatsby and *not* Next.js 106 | # https://nextjs.org/blog/next-9-1#public-directory-support 107 | # public 108 | 109 | # vuepress build output 110 | .vuepress/dist 111 | 112 | # Serverless directories 113 | .serverless/ 114 | 115 | # FuseBox cache 116 | .fusebox/ 117 | 118 | # DynamoDB Local files 119 | .dynamodb/ 120 | 121 | # TernJS port file 122 | .tern-port 123 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "lib/solmate"] 2 | path = lib/solmate 3 | url = https://github.com/rari-capital/solmate 4 | [submodule "lib/gpl"] 5 | path = lib/gpl 6 | url = https://github.com/AstariaXYZ/astaria-gpl 7 | branch = main 8 | [submodule "lib/clones-with-immutable-args"] 9 | path = lib/clones-with-immutable-args 10 | url = https://github.com/wighawag/clones-with-immutable-args 11 | [submodule "lib/forge-std"] 12 | path = lib/forge-std 13 | url = https://github.com/foundry-rs/forge-std 14 | [submodule "lib/ds-test"] 15 | path = lib/ds-test 16 | url = https://github.com/dapphub/ds-test 17 | [submodule "lib/seaport"] 18 | path = lib/seaport 19 | url = https://github.com/projectopensea/seaport 20 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | . "$(dirname -- "$0")/_/husky.sh" 3 | 4 | npx lint-staged 5 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | artifacts 3 | cache 4 | coverage* 5 | gasReporterOutput.json 6 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "overrides": [ 3 | { 4 | "files": "*.sol", 5 | "options": { 6 | "printWidth": 80, 7 | "tabWidth": 2, 8 | "useTabs": false, 9 | "singleQuote": false, 10 | "bracketSpacing": false, 11 | "explicitTypes": "always", 12 | "compiler": "0.8.17" 13 | } 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /.slither.config.json: -------------------------------------------------------------------------------- 1 | { 2 | "solc_remaps": [ 3 | "solmate/=./lib/solmate/src/", 4 | "ds-test/=./lib/ds-test/src/", 5 | "openzeppelin/=./lib/openzeppelin-contracts/contracts/", 6 | "clones-with-immutable-args/=./lib/clones-with-immutable-args/src/", 7 | "gpl/=./lib/gpl/src/", 8 | "seaport/=./lib/seaport/contracts/", 9 | "foundry_eip-4626/=./lib/foundry_eip-4626/src/", 10 | "core/=./src/" 11 | ] 12 | } -------------------------------------------------------------------------------- /.solhint.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "solhint:recommended", 3 | "rules": { 4 | "compiler-version": ["error", "=0.8.17"], 5 | "func-visibility": ["warn", { "ignoreConstructors": true }], 6 | "avoid-suicide": "error" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.solhintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "solidity.defaultCompiler": "remote", 3 | 4 | "solidity.packageDefaultDependenciesContractsDirectory": "src", 5 | "solidity.packageDefaultDependenciesDirectory": "lib", 6 | 7 | "solidity.compileUsingRemoteVersion": "v0.8.17+commit.8df45f5f" 8 | } 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Business Source License 1.1 2 | 3 | License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. 4 | "Business Source License" is a trademark of MariaDB Corporation Ab. 5 | 6 | ----------------------------------------------------------------------------- 7 | 8 | Parameters 9 | 10 | Licensor: Astaria Labs 11 | 12 | Licensed Work: Astaria-core 13 | The Licensed Work is (c) 2022 Astaria Labs 14 | 15 | Additional Use Grant: Not Applicable 16 | 17 | Change Date: 2026-01-28 18 | 19 | Change License: MIT License 20 | 21 | ----------------------------------------------------------------------------- 22 | 23 | Terms 24 | 25 | The Licensor hereby grants you the right to copy, modify, create derivative 26 | works, redistribute, and make non-production use of the Licensed Work. The 27 | Licensor may make an Additional Use Grant, above, permitting limited 28 | production use. 29 | 30 | Effective on the Change Date, or the fourth anniversary of the first publicly 31 | available distribution of a specific version of the Licensed Work under this 32 | License, whichever comes first, the Licensor hereby grants you rights under 33 | the terms of the Change License, and the rights granted in the paragraph 34 | above terminate. 35 | 36 | If your use of the Licensed Work does not comply with the requirements 37 | currently in effect as described in this License, you must purchase a 38 | commercial license from the Licensor, its affiliated entities, or authorized 39 | resellers, or you must refrain from using the Licensed Work. 40 | 41 | All copies of the original and modified Licensed Work, and derivative works 42 | of the Licensed Work, are subject to this License. This License applies 43 | separately for each version of the Licensed Work and the Change Date may vary 44 | for each version of the Licensed Work released by Licensor. 45 | 46 | You must conspicuously display this License on each original or modified copy 47 | of the Licensed Work. If you receive the Licensed Work in original or 48 | modified form from a third party, the terms and conditions set forth in this 49 | License apply to your use of that work. 50 | 51 | Any use of the Licensed Work in violation of this License will automatically 52 | terminate your rights under this License for the current and all other 53 | versions of the Licensed Work. 54 | 55 | This License does not grant you any right in any trademark or logo of 56 | Licensor or its affiliates (provided that you may use a trademark or logo of 57 | Licensor as expressly required by this License). 58 | 59 | TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND TITLE. 60 | 61 | MariaDB hereby grants you permission to use this License’s text to license your works, and to refer to it using the trademark "Business Source License", as long as you comply with the Covenants of Licensor below. 62 | 63 | ----------------------------------------------------------------------------- 64 | 65 | Covenants of Licensor 66 | 67 | In consideration of the right to use this License’s text and the "Business Source License" name and trademark, Licensor covenants to MariaDB, and to all other recipients of the licensed work to be provided by Licensor: 68 | 69 | 1. To specify as the Change License the GPL Version 2.0 or any later version, 70 | or a license that is compatible with GPL Version 2.0 or a later version, 71 | where "compatible" means that software provided under the Change License can 72 | be included in a program with software provided under GPL Version 2.0 or a 73 | later version. Licensor may specify additional Change Licenses without 74 | limitation. 75 | 76 | 2. To either: (a) specify an additional grant of rights to use that does not 77 | impose any additional restriction on the right granted in this License, as 78 | the Additional Use Grant; or (b) insert the text "None". 79 | 80 | 3. To specify a Change Date. 81 | 82 | 4. Not to modify this License in any other way. 83 | 84 | ----------------------------------------------------------------------------- 85 | 86 | Notice 87 | 88 | The Business Source License (this document, or the "License") is not an Open Source license. However, the Licensed Work will eventually be made available under an Open Source License, as stated in this License. -------------------------------------------------------------------------------- /alchemy-retry.py: -------------------------------------------------------------------------------- 1 | import os 2 | from subprocess import run 3 | 4 | while True: 5 | # output = os.popen("forge test --ffi --fork-url https://eth-mainnet.alchemyapi.io/v2/crm65ztnFlqvr08HoTDXF_Z_8wF0Pt-j").read() 6 | output = Popen("forge test --ffi --fork-url https://eth-mainnet.alchemyapi.io/v2/crm65ztnFlqvr08HoTDXF_Z_8wF0Pt-j").returncode 7 | if "The application panicked" not in output: 8 | print(output) 9 | print("AAAAAAA") 10 | print(output[-20:]) 11 | break 12 | print("failed") -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/0-EB806.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/0-EB806.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/02410a37de8a54f8cfb7a8842a2dd162-D2755.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/02410a37de8a54f8cfb7a8842a2dd162-D2755.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/0afc1ac766d7759ba3df429cccb8f500-074A6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/0afc1ac766d7759ba3df429cccb8f500-074A6.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/0bfce954f01a89faf77cf4344f557d71-E0190.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/0bfce954f01a89faf77cf4344f557d71-E0190.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1-B2132.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1-B2132.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1080667809002037320-8957D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1080667809002037320-8957D.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/110f775d82ef47eeb4a71bbd43de83da-426FA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/110f775d82ef47eeb4a71bbd43de83da-426FA.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/134a97341ef016a343ffb22a13e06e84-C9997.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/134a97341ef016a343ffb22a13e06e84-C9997.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/146464eb9e5f1322355fc03324ad0077-EA70E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/146464eb9e5f1322355fc03324ad0077-EA70E.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1c87b7948abe9f6c3e72f70becc58949-51ACA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1c87b7948abe9f6c3e72f70becc58949-51ACA.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1dc9ff6bb6cbf768aa6b8f1f250a6a40-FC74B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1dc9ff6bb6cbf768aa6b8f1f250a6a40-FC74B.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f37a-390B2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f389-5C738.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f38a-8FB83.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f3c1-445DC.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f3c6-621A1.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f43a-EB486.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f440-6C64D.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f441-405F2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f446-9CC34.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f44b-1f3fb-E6912.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f44b-8A059.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f44d-1f3fb-ED2AA.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f44d-27259.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f44f-3D381.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f494-B74A3.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f49a-E8B01.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f49c-71A75.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f4af-4CFF5.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f4c6-44E30.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f4dc-AC641.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f50d-195C0.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f602-168C5.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f603-5E531.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f604-BF863.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f605-42B43.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f609-9EC67.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f62d-02603.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f639-E6A85.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f642-83E8A.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f64c-7C820.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f64f-22B8D.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f6a8-A8AB3.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f911-F346C.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f937-19884.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f972-F415D.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f973-88B39.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f979-BE2CD.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1f9d1-5BC80.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1fae1-B19DE.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/1fae4-39628.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/249472be93c2c5d7d5b8958288c67706-CD488.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/249472be93c2c5d7d5b8958288c67706-CD488.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/2520cad5f6c9d82566e4af0f37d9b95e-2A259.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/2520cad5f6c9d82566e4af0f37d9b95e-2A259.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/2696-15F4A.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/2705-0589F.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/2764-A3D25.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/2a9faff195fe333526cfe6ae6fce1420-49B98.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/2a9faff195fe333526cfe6ae6fce1420-49B98.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/2af0f89843ae811fe0fe7dff2f3003f9-E2C18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/2af0f89843ae811fe0fe7dff2f3003f9-E2C18.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/3-FB033.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/3-FB033.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/30024f2eab00f1f2f2caee60d2b320a7-9F811.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/30024f2eab00f1f2f2caee60d2b320a7-9F811.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/310bb104d49148a05def03fa039fef92-D894A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/310bb104d49148a05def03fa039fef92-D894A.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/394983eda2eb8faf909901fe09d16b4b-BAFA3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/394983eda2eb8faf909901fe09d16b4b-BAFA3.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/3b01c38b7c5b905fd8e8a1d72f7d7492-53427.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/3b01c38b7c5b905fd8e8a1d72f7d7492-53427.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/3df652e9459bdc264f05c541d2fc66ed-49E08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/3df652e9459bdc264f05c541d2fc66ed-49E08.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/402b68164a51455e395a06ad04fc04b5-D7A38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/402b68164a51455e395a06ad04fc04b5-D7A38.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/406ES17U_400x400-E842A.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/406ES17U_400x400-E842A.jpg -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/47c22349beb07ff08b7d61406da2c1a8-6AC2E.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/47c22349beb07ff08b7d61406da2c1a8-6AC2E.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/55afac51a32db1ff015fd3a7d901e67a-A5862.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/55afac51a32db1ff015fd3a7d901e67a-A5862.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/579ee33c65584c463687960bec679235-EAA46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/579ee33c65584c463687960bec679235-EAA46.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/5b069e074423293b86222b4350052da5-836F0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/5b069e074423293b86222b4350052da5-836F0.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/5d084bf7a4698ae3113c164cdd53ccbe-F4903.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/5d084bf7a4698ae3113c164cdd53ccbe-F4903.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/607629203743178768-31BF8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/607629203743178768-31BF8.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/60be1574a04aef160015bebc5c988cda-0DDA5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/60be1574a04aef160015bebc5c988cda-0DDA5.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/67594ee4b4d1fc03bca468327a0d145b-BD76A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/67594ee4b4d1fc03bca468327a0d145b-BD76A.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/693616141775667260-54DCE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/693616141775667260-54DCE.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/6a00e12240ed2ee2b1768b577982163b-1CF1D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/6a00e12240ed2ee2b1768b577982163b-1CF1D.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/6b3e8db133891c8c0be08fb8b4fe9bff-36B4D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/6b3e8db133891c8c0be08fb8b4fe9bff-36B4D.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/747989798740033546-1D010.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/747989798740033546-1D010.gif -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/813459168405094431-A6A4A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/813459168405094431-A6A4A.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/81cdaa2b2c4db53da734dd55c3d55908-4DC39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/81cdaa2b2c4db53da734dd55c3d55908-4DC39.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/82287b4212a9854e5730462bd70677ae-E8BF4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/82287b4212a9854e5730462bd70677ae-E8BF4.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/84ab5ab9f1a4d6f40cd93ab7bd138e28-075B3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/84ab5ab9f1a4d6f40cd93ab7bd138e28-075B3.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/851893157188599838-C23B5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/851893157188599838-C23B5.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/851893827027075142-F23DF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/851893827027075142-F23DF.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/851893827089727568-5FD38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/851893827089727568-5FD38.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/851893827278602280-FABCC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/851893827278602280-FABCC.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/851893827315826708-F59C0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/851893827315826708-F59C0.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/851893828280909886-FBF42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/851893828280909886-FBF42.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/907282449598406696-84D3D.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/907282449598406696-84D3D.gif -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/90abcaff147cdcd8fa62f4945a960d54-85A8D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/90abcaff147cdcd8fa62f4945a960d54-85A8D.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/910676187288846397-518CD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/910676187288846397-518CD.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/948839162797244417-CA9F9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/948839162797244417-CA9F9.gif -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/96119e14c860edbac5f4d243e683a992-3E151.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/96119e14c860edbac5f4d243e683a992-3E151.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/966eaf1aafcae6abcb9e0db823947e2f-96F55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/966eaf1aafcae6abcb9e0db823947e2f-96F55.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/970d2e2f00cd7ef2134a1a3f21326349-404EA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/970d2e2f00cd7ef2134a1a3f21326349-404EA.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/98446738-1A1F9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/98446738-1A1F9 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/9bf2181404e658cab4039c07df56213f-E3E89.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/9bf2181404e658cab4039c07df56213f-E3E89.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/9c068826a94f6e1d158939c8f708ded9-52A19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/9c068826a94f6e1d158939c8f708ded9-52A19.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/9d62cded-f3b0-4a85-90b4-5519fadcb5e1-8509D: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/9d62cded-f3b0-4a85-90b4-5519fadcb5e1-8509D -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/C4-banner-7C19B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/C4-banner-7C19B.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/Captura_de_Pantalla_2023-01-09_a_las_14.35-546C7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/Captura_de_Pantalla_2023-01-09_a_las_14.35-546C7.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/Screen_Shot_2023-01-14_at_2.01.48_PM-A70AD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/Screen_Shot_2023-01-14_at_2.01.48_PM-A70AD.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/Screenshot_2023-01-08_at_00.38.31-71BD0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/Screenshot_2023-01-08_at_00.38.31-71BD0.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/Screenshot_20230117-232638_Discord-A46EC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/Screenshot_20230117-232638_Discord-A46EC.jpg -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/Screenshot_from_2023-01-18_09-00-20-44746.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/Screenshot_from_2023-01-18_09-00-20-44746.jpg -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/_hOQSYivKsSjdqFXvNkojE06w22qJWUXZFnGPI5AkX-8F6DD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/_hOQSYivKsSjdqFXvNkojE06w22qJWUXZFnGPI5AkX-8F6DD -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/a36cb7b26a8fd70f4f296a94c3cf5a9d-65F28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/a36cb7b26a8fd70f4f296a94c3cf5a9d-65F28.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/a46a59d6636619f3cc132c12dba469a6-7A310.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/a46a59d6636619f3cc132c12dba469a6-7A310.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/a711f2f0aba42dc58cc2a1c1a0fb450d-25A55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/a711f2f0aba42dc58cc2a1c1a0fb450d-25A55.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/abb480ed1510d7994e58bc85f8e989d6-66497.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/abb480ed1510d7994e58bc85f8e989d6-66497.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ae70f07a06c1c7e983291bb14a1bed7f-45C67.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ae70f07a06c1c7e983291bb14a1bed7f-45C67.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/apple-touch-icon-192x192-E344C.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/apple-touch-icon-192x192-E344C.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/b5d13a47fb4f5d6e32aead2c13818601-C5763.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/b5d13a47fb4f5d6e32aead2c13818601-C5763.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/c4udit-BDF0F: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/c4udit-BDF0F -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/cc8374ec433b7627e95f914e72deb9a1-5C229.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/cc8374ec433b7627e95f914e72deb9a1-5C229.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/d3029f014df2fb20be21078c2dc63484-2DF40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/d3029f014df2fb20be21078c2dc63484-2DF40.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/d8dcf8df971c647c00a5ee21fa454062-9C5EC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/d8dcf8df971c647c00a5ee21fa454062-9C5EC.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/dcb7d2f024474aecc9a8bde890716475-19E85.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/dcb7d2f024474aecc9a8bde890716475-19E85.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/e7257551b8b85f83bd08f1cfdf84108c-42180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/e7257551b8b85f83bd08f1cfdf84108c-42180.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ed9f5cb0bd405c6e205564856f31d4a0-41781.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ed9f5cb0bd405c6e205564856f31d4a0-41781.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/efeb528c72d09ccdb81db8dfec85b9a9-88176.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/efeb528c72d09ccdb81db8dfec85b9a9-88176.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/f2f96fb7c4982cfb57a977d1e9c0b541-1A82F.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/f2f96fb7c4982cfb57a977d1e9c0b541-1A82F.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/f4944b4c85016d774d9ec27532a0fcc4-26A77.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/f4944b4c85016d774d9ec27532a0fcc4-26A77.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/f7147bfadb72a2afd2401e5071b39609-7268B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/f7147bfadb72a2afd2401e5071b39609-7268B.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/fa7b20a49a4577b4953a28313bd9515f-A83AD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/fa7b20a49a4577b4953a28313bd9515f-A83AD.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/fac84f51198cfd9481fe552ffd370edf-FDB0A.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/fac84f51198cfd9481fe552ffd370edf-FDB0A.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-italic-400-E988B.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-italic-400-E988B.woff2 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-italic-500-0777F.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-italic-500-0777F.woff2 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-italic-600-CB411.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-italic-600-CB411.woff2 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-italic-700-891AC.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-italic-700-891AC.woff2 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-italic-800-D36B0.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-italic-800-D36B0.woff2 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-normal-400-1456D.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-normal-400-1456D.woff2 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-normal-500-89CE5.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-normal-500-89CE5.woff2 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-normal-600-C1EA8.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-normal-600-C1EA8.woff2 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-normal-700-1949A.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-normal-700-1949A.woff2 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-normal-800-58487.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/ggsans-normal-800-58487.woff2 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/giphy-1E98E.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/giphy-1E98E.mp4 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/gist-og-image-17482.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/gist-og-image-17482.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/image-124E3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/image-124E3.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/image0-AEB97.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/image0-AEB97.jpg -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/kapha-7BDDA.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/kapha-7BDDA.mp4 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/pedro-monkey-puppet-1F309.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/pedro-monkey-puppet-1F309.mp4 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/solarized-dark.min-BA98F.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;background:#002b36;color:#839496}.hljs-comment,.hljs-quote{color:#586e75}.hljs-keyword,.hljs-selector-tag,.hljs-addition{color:#859900}.hljs-number,.hljs-string,.hljs-meta .hljs-meta-string,.hljs-literal,.hljs-doctag,.hljs-regexp{color:#2aa198}.hljs-title,.hljs-section,.hljs-name,.hljs-selector-id,.hljs-selector-class{color:#268bd2}.hljs-attribute,.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-class .hljs-title,.hljs-type{color:#b58900}.hljs-symbol,.hljs-bullet,.hljs-subst,.hljs-meta,.hljs-meta .hljs-keyword,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-link{color:#cb4b16}.hljs-built_in,.hljs-deletion{color:#dc322f}.hljs-formula{background:#073642}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold} -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/spider-man-spider-man-web-of-shadows-89EA9.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].html_Files/spider-man-spider-man-web-of-shadows-89EA9.mp4 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/98446738-1A1F9: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/98446738-1A1F9 -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/9d62cded-f3b0-4a85-90b4-5519fadcb5e1-8509D: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/9d62cded-f3b0-4a85-90b4-5519fadcb5e1-8509D -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/C4-banner-7C19B.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/C4-banner-7C19B.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/Captura_de_Pantalla_2023-01-09_a_las_14.35-546C7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/Captura_de_Pantalla_2023-01-09_a_las_14.35-546C7.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/Screen_Shot_2023-01-14_at_2.01.48_PM-A70AD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/Screen_Shot_2023-01-14_at_2.01.48_PM-A70AD.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/Screenshot_2023-01-08_at_00.38.31-71BD0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/Screenshot_2023-01-08_at_00.38.31-71BD0.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/Screenshot_20230117-232638_Discord-A46EC.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/Screenshot_20230117-232638_Discord-A46EC.jpg -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/Screenshot_from_2023-01-18_09-00-20-44746.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/Screenshot_from_2023-01-18_09-00-20-44746.jpg -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/_hOQSYivKsSjdqFXvNkojE06w22qJWUXZFnGPI5AkX-8F6DD: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/_hOQSYivKsSjdqFXvNkojE06w22qJWUXZFnGPI5AkX-8F6DD -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/c4udit-BDF0F: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/c4udit-BDF0F -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/giphy_s-66A1C.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/giphy_s-66A1C.gif -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/gist-og-image-17482.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/gist-og-image-17482.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/image-124E3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/image-124E3.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/image0-AEB97.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/image0-AEB97.jpg -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/kapha-D09CD.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/kapha-D09CD.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/pedro-monkey-puppet-66918.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/pedro-monkey-puppet-66918.png -------------------------------------------------------------------------------- /discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/spider-man-spider-man-web-of-shadows-ACB4C.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/discord-export/Code4rena - ARCHIVE-Q1-2023 - astaria-jan05 [1060136720844210176].txt_Files/spider-man-spider-man-web-of-shadows-ACB4C.png -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.8' 2 | 3 | services: 4 | anvil: 5 | image: ghcr.io/foundry-rs/foundry:nightly-4fcd7e0ecc16c77c381884d0298301fe8b77028d 6 | ports: 7 | - "8545:8545" 8 | entrypoint: ["anvil", "--host", "0.0.0.0", "--fork-url", ""] 9 | -------------------------------------------------------------------------------- /docker/anvil/docker-entrypoint.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/code-423n4/2023-01-astaria/889d51d45830a86064bbe35fec09ec9a466928f3/docker/anvil/docker-entrypoint.sh -------------------------------------------------------------------------------- /docker/foundry/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM alpine as build-environment 2 | WORKDIR /opt 3 | RUN apk add clang lld curl build-base linux-headers \ 4 | && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh \ 5 | && chmod +x ./rustup.sh \ 6 | && ./rustup.sh -y 7 | WORKDIR /opt/foundry 8 | COPY . . 9 | RUN source $HOME/.profile && cargo build --release \ 10 | && strip /opt/foundry/target/release/forge \ 11 | && strip /opt/foundry/target/release/cast \ 12 | && strip /opt/foundry/target/release/anvil 13 | 14 | FROM alpine as foundry-client 15 | ENV GLIBC_KEY=https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub 16 | ENV GLIBC_KEY_FILE=/etc/apk/keys/sgerrand.rsa.pub 17 | ENV GLIBC_RELEASE=https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk 18 | 19 | RUN apk add linux-headers gcompat 20 | RUN wget -q -O ${GLIBC_KEY_FILE} ${GLIBC_KEY} \ 21 | && wget -O glibc.apk ${GLIBC_RELEASE} \ 22 | && apk add glibc.apk --force 23 | COPY --from=build-environment /opt/foundry/target/release/forge /usr/local/bin/forge 24 | COPY --from=build-environment /opt/foundry/target/release/cast /usr/local/bin/cast 25 | COPY --from=build-environment /opt/foundry/target/release/anvil /usr/local/bin/anvil 26 | ENTRYPOINT ["/bin/sh", "-c"] -------------------------------------------------------------------------------- /foundry.toml: -------------------------------------------------------------------------------- 1 | [profile.default] 2 | src = 'src' 3 | out = 'out' 4 | solc = '0.8.17' 5 | cache_path = 'cache' 6 | libs = ['lib'] 7 | fs_permissions = [{ access = "read-write", path = "./"}] 8 | gas_reports_ignore = ["Strings2", "MockERC721", "MultiRolesAuthority", "TransferProxy"] 9 | remappings = [ 10 | 'solmate/=lib/solmate/src/', 11 | 'gpl/=lib/gpl/src/', 12 | 'clones-with-immutable-args/=lib/clones-with-immutable-args/src/', 13 | 'core/=./src/', 14 | 'seaport/=lib/seaport/contracts', 15 | ] 16 | # See more config options https://github.com/foundry-rs/foundry/tree/master/config -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@astaria/core", 3 | "version": "0.0.6-rc", 4 | "author": "Astaria Labs, Inc.", 5 | "license": "BUSL-1.1", 6 | "engines": { 7 | "node": "^16.0.0" 8 | }, 9 | "scripts": { 10 | "lint": "eslint src/**/*.sol", 11 | "lint:fix": "prettier --write src/**/*.sol", 12 | "postinstall": "husky install" 13 | }, 14 | "lint-staged": { 15 | "*.sol": "prettier --write" 16 | }, 17 | "devDependencies": { 18 | "@astariaxyz/sdk": "1.0.0-alpha.9", 19 | "@types/node": "^18.11.18", 20 | "ethers": "^5.7.2", 21 | "husky": "^8.0.3", 22 | "lint-staged": "^13.1.0", 23 | "prettier": "^2.8.1", 24 | "prettier-plugin-solidity": "^1.1.1", 25 | "solhint": "^3.3.7" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /remappings.txt: -------------------------------------------------------------------------------- 1 | clones-with-immutable-args/=lib/clones-with-immutable-args/src/ 2 | forge-std/=lib/forge-std/src/ 3 | eip4626/=lib/foundry_eip-4626/src/ 4 | gpl/=lib/gpl/src/ 5 | solmate/=lib/solmate/src/ 6 | seaport/=lib/seaport/contracts/ 7 | core/=./src/ 8 | 9 | -------------------------------------------------------------------------------- /scripts/boot-system.sh: -------------------------------------------------------------------------------- 1 | #docker-compose up -d 2 | source .env 3 | forge script Deploy --broadcast --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --rpc-url http://localhost:8545 4 | forge script UniqueStrategy --broadcast --private-key 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 --rpc-url http://localhost:8545 -------------------------------------------------------------------------------- /scripts/fetch-abi.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env zsh 2 | 3 | # This script is used to generate typechain types for the contracts in the myArray+=(item) 4 | 5 | # define array and add all contracts from optimized-out.sol that are in typechainabi 6 | 7 | accepted_file_names=("CollateralToken.sol" "LienToken.sol" "MultiRolesAuthority.sol" "PublicVault.sol" "Vault.sol" "WithdrawProxy.sol" "AstariaRouter.sol" "VaultImplementation.sol") 8 | 9 | forge build 10 | # loop through the array and generate types for each contract 11 | rm -rf abi && mkdir -p abi 12 | for i in ./out/*; 13 | do 14 | file=$(basename "${i}") 15 | if [[ ${accepted_file_names[(ie)$file]} -le ${#accepted_file_names} ]]; then 16 | cp -r "$i"/*.json "abi/" 17 | fi 18 | done 19 | 20 | -------------------------------------------------------------------------------- /scripts/forked-test.sh: -------------------------------------------------------------------------------- 1 | forge test --ffi --match-contract ForkedTest --fork-url https://eth-mainnet.alchemyapi.io/v2/HRsfeR_gzE6hZqkcLkIRRnQy2YDZyndj --fork-block-number 9698885 -------------------------------------------------------------------------------- /scripts/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # forge install 4 | if [ -f "~/.foundry/bin/forge" ]; then 5 | read -p "Forge not detected, do you want to install [y/n]" FORGE_INSTALL 6 | if [ $FORGE_INSTALL -e "y"]; then 7 | curl -L https://foundry.paradigm.xyz | bash 8 | else 9 | echo "You must install forge to use this repo, visit https://getfoundry.sh" 10 | exit 1; 11 | fi 12 | fi 13 | 14 | YARN_VERSION=$(yarn version) 15 | 16 | # if no yarn install via npm 17 | if [ ! $(which yarn) ]; then 18 | 19 | read -p "Yarn not detected, do you want to install [y/n]" YARN_INSTALL 20 | if [ $YARN_INSTALL -e "y" ]; then 21 | npm install -g 22 | else 23 | echo "You must install yarn to use workspaces" 24 | exit 1; 25 | fi 26 | fi 27 | 28 | forge install 29 | 30 | yarn -------------------------------------------------------------------------------- /scripts/loan-proof-generator.js: -------------------------------------------------------------------------------- 1 | const sdk = require("@astariaxyz/sdk"); 2 | const { utils, BigNumber, Wallet } = require("ethers"); 3 | 4 | const { defaultAbiCoder } = utils; 5 | 6 | const main = async () => { 7 | const args = process.argv.slice(2); 8 | const detailsType = parseInt(BigNumber.from(args.shift()).toString()); 9 | const leaves = []; 10 | 11 | let mapping = []; 12 | 13 | if (detailsType === 0) { 14 | mapping = [ 15 | "uint8", 16 | "address", 17 | "uint256", 18 | "address", 19 | "uint256", 20 | "uint256", 21 | "uint256", 22 | "uint256", 23 | "uint256", 24 | ]; 25 | } else if (detailsType === 1) { 26 | mapping = [ 27 | "uint8", 28 | "address", 29 | "address", 30 | "uint256", 31 | "uint256", 32 | "uint256", 33 | "uint256", 34 | "uint256", 35 | ]; 36 | } else if (detailsType === 2) { 37 | mapping = [ 38 | "uint8", 39 | "address", 40 | "address", 41 | "address", 42 | "address", 43 | "uint24", 44 | "int24", 45 | "int24", 46 | "uint128", 47 | "uint256", 48 | "uint256", 49 | "uint256", 50 | "uint256", 51 | "uint256", 52 | "uint256", 53 | "uint256", 54 | ]; 55 | } 56 | 57 | // Create tree 58 | const termData = defaultAbiCoder.decode(mapping, args.shift()).map((x) => { 59 | if (x instanceof BigNumber) { 60 | return x.toString(); 61 | } 62 | return x; 63 | }); 64 | 65 | const pk = args.shift(); 66 | 67 | const wallet = new Wallet(pk); 68 | 69 | const strategyData = defaultAbiCoder.decode( 70 | ["uint8", "uint256", "address"], 71 | args.shift() 72 | ); 73 | 74 | const strategy = { 75 | version: strategyData[0], 76 | expiration: strategyData[1], 77 | vault: strategyData[2], 78 | nonce: BigNumber.from(0), 79 | delegate: wallet.address, 80 | }; 81 | 82 | leaves.push(termData); 83 | 84 | const output = leaves.reduce((acc, cur) => { 85 | return acc + cur.join(",") + "\n"; 86 | }, ""); 87 | 88 | const merkleTree = new sdk.StrategyTree(output); 89 | 90 | const rootHash = merkleTree.getHexRoot(); 91 | const proof = merkleTree.getHexProof(merkleTree.getLeaf(0)); 92 | const chainId = args.shift(); 93 | 94 | const signature = await sdk.signRootLocal( 95 | await sdk.getTypedData( 96 | strategy, 97 | rootHash, 98 | strategy.vault, 99 | parseInt(chainId) 100 | ), 101 | wallet 102 | ); 103 | 104 | console.log( 105 | defaultAbiCoder.encode( 106 | ["bytes32", "bytes32[]", "bytes"], 107 | [rootHash, proof, utils.joinSignature(signature)] 108 | ) 109 | ); 110 | }; 111 | 112 | main(); 113 | -------------------------------------------------------------------------------- /scripts/verify.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # takes in a deployment file and the chain id verifies on etherscan 3 | # needs to have ETHERSCAN_API_KEY set in the environment 4 | set -e 5 | INPUT_FILE=$1 6 | ARG_FILE="$(dirname $INPUT_FILE)/arguments.json" 7 | CHAIN_ID=$(jq -r '.chain' < $INPUT_FILE) 8 | COMPILER_VERSION="0.8.17" 9 | for row in $(jq -c '.transactions[]' < ${INPUT_FILE}); do 10 | _jq() { 11 | echo ${row} | jq -r ${1} 12 | } 13 | 14 | if [[ $(_jq '.transactionType') == "CREATE" ]]; then 15 | 16 | args=$(_jq '.arguments') 17 | CONSTRUCTOR_ARGS_PATH="" 18 | if [[ ${args} != "null" ]]; then 19 | echo ${args} > "${ARG_FILE}" 20 | CONSTRUCTOR_ARGS_PATH=--constructor-args-path=${ARG_FILE} 21 | fi 22 | if ! forge verify-contract "$(_jq '.contractAddress')" "$(_jq '.contractName')" ${ETHERSCAN_API_KEY} --chain ${CHAIN_ID} --compiler-version ${COMPILER_VERSION} ${CONSTRUCTOR_ARGS_PATH} 23 | then 24 | echo "failed to verify $(_jq '.contractName')" 25 | continue 26 | fi 27 | 28 | fi 29 | done 30 | rm -f ${ARG_FILE} -------------------------------------------------------------------------------- /src/.gas-snapshot: -------------------------------------------------------------------------------- 1 | AstariaTest:testBasicPrivateVaultLoan() (gas: 1996616) 2 | AstariaTest:testBasicPublicVaultLoan() (gas: 1987093) 3 | AstariaTest:testBuyoutLien() (gas: 2613929) 4 | AstariaTest:testCancelAuction() (gas: 2249883) 5 | AstariaTest:testCollateralTokenFileSetup() (gas: 52440) 6 | AstariaTest:testEpochProcessionMultipleActors() (gas: 3081969) 7 | AstariaTest:testLienTokenFileSetup() (gas: 55708) 8 | AstariaTest:testLiquidationAccountant() (gas: 2658907) 9 | AstariaTest:testReleaseToAddress() (gas: 1944219) 10 | AstariaTest:testWithdrawProxy() (gas: 1556972) 11 | RevertTesting:testFailBorrowMoreThanMaxPotentialDebt() (gas: 2330449) 12 | RevertTesting:testFailProcessEpochWithUnliquidatedLien() (gas: 2223386) 13 | RevertTesting:testFailSoloLendNotAppraiser() (gas: 1313794) 14 | WithdrawTest:testFutureLiquidationWithBlockingWithdrawReserve() (gas: 3235698) 15 | WithdrawTest:testLiquidationAccountant5050Split() (gas: 3758871) 16 | WithdrawTest:testLiquidationAccountantEpochOrdering() (gas: 3812863) 17 | WithdrawTest:testWithdrawLiquidatedNoBids() (gas: 2446319) 18 | -------------------------------------------------------------------------------- /src/AstariaVaultBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {IAstariaVaultBase} from "core/interfaces/IAstariaVaultBase.sol"; 17 | import {Clone} from "clones-with-immutable-args/Clone.sol"; 18 | import {IERC4626} from "core/interfaces/IERC4626.sol"; 19 | import {ICollateralToken} from "core/interfaces/ICollateralToken.sol"; 20 | import {IAstariaRouter} from "core/interfaces/IAstariaRouter.sol"; 21 | import {IRouterBase} from "core/interfaces/IRouterBase.sol"; 22 | 23 | abstract contract AstariaVaultBase is Clone, IAstariaVaultBase { 24 | function name() external view virtual returns (string memory); 25 | 26 | function symbol() external view virtual returns (string memory); 27 | 28 | function ROUTER() public pure returns (IAstariaRouter) { 29 | return IAstariaRouter(_getArgAddress(0)); //ends at 20 30 | } 31 | 32 | function IMPL_TYPE() public pure returns (uint8) { 33 | return _getArgUint8(20); //ends at 21 34 | } 35 | 36 | function owner() public pure returns (address) { 37 | return _getArgAddress(21); //ends at 44 38 | } 39 | 40 | function asset() 41 | public 42 | pure 43 | virtual 44 | override(IAstariaVaultBase) 45 | returns (address) 46 | { 47 | return _getArgAddress(41); //ends at 64 48 | } 49 | 50 | function START() public pure returns (uint256) { 51 | return _getArgUint256(61); 52 | } 53 | 54 | function EPOCH_LENGTH() public pure returns (uint256) { 55 | return _getArgUint256(93); //ends at 116 56 | } 57 | 58 | function VAULT_FEE() public pure returns (uint256) { 59 | return _getArgUint256(125); 60 | } 61 | 62 | function COLLATERAL_TOKEN() public view returns (ICollateralToken) { 63 | return ROUTER().COLLATERAL_TOKEN(); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/AuthInitializable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {Authority} from "solmate/auth/Auth.sol"; 17 | 18 | /// @notice Provides a flexible and updatable auth pattern which is completely separate from application logic. 19 | /// @author Astaria (https://github.com/astariaxyz/astaria-gpl/blob/main/src/auth/AuthInitializable.sol) 20 | /// @author Modified from (https://github.com/transmissions11/solmate/v7/main/src/auth/Auth.sol) 21 | abstract contract AuthInitializable { 22 | event OwnershipTransferred(address indexed user, address indexed newOwner); 23 | 24 | event AuthorityUpdated(address indexed user, Authority indexed newAuthority); 25 | 26 | uint256 private constant authSlot = 27 | uint256(uint256(keccak256("xyz.astaria.Auth.storage.location")) - 1); 28 | 29 | struct AuthStorage { 30 | address owner; 31 | Authority authority; 32 | } 33 | 34 | function _getAuthSlot() internal view returns (AuthStorage storage s) { 35 | uint256 slot = authSlot; 36 | assembly { 37 | s.slot := slot 38 | } 39 | } 40 | 41 | function __initAuth(address _owner, address _authority) internal { 42 | AuthStorage storage s = _getAuthSlot(); 43 | require(s.owner == address(0), "Already initialized"); 44 | s.owner = _owner; 45 | s.authority = Authority(_authority); 46 | 47 | emit OwnershipTransferred(msg.sender, _owner); 48 | emit AuthorityUpdated(msg.sender, Authority(_authority)); 49 | } 50 | 51 | modifier requiresAuth() virtual { 52 | require(isAuthorized(msg.sender, msg.sig), "UNAUTHORIZED"); 53 | 54 | _; 55 | } 56 | 57 | function owner() public view returns (address) { 58 | return _getAuthSlot().owner; 59 | } 60 | 61 | function authority() public view returns (Authority) { 62 | return _getAuthSlot().authority; 63 | } 64 | 65 | function isAuthorized(address user, bytes4 functionSig) 66 | internal 67 | view 68 | virtual 69 | returns (bool) 70 | { 71 | AuthStorage storage s = _getAuthSlot(); 72 | Authority auth = s.authority; // Memoizing authority saves us a warm SLOAD, around 100 gas. 73 | 74 | // Checking if the caller is the owner only after calling the authority saves gas in most cases, but be 75 | // aware that this makes protected functions uncallable even to the owner if the authority is out of order. 76 | return 77 | (address(auth) != address(0) && 78 | auth.canCall(user, address(this), functionSig)) || user == s.owner; 79 | } 80 | 81 | function setAuthority(Authority newAuthority) public virtual { 82 | // We check if the caller is the owner first because we want to ensure they can 83 | // always swap out the authority even if it's reverting or using up a lot of gas. 84 | AuthStorage storage s = _getAuthSlot(); 85 | require( 86 | msg.sender == s.owner || 87 | s.authority.canCall(msg.sender, address(this), msg.sig) 88 | ); 89 | 90 | s.authority = newAuthority; 91 | 92 | emit AuthorityUpdated(msg.sender, newAuthority); 93 | } 94 | 95 | function transferOwnership(address newOwner) public virtual requiresAuth { 96 | AuthStorage storage s = _getAuthSlot(); 97 | s.owner = newOwner; 98 | 99 | emit OwnershipTransferred(msg.sender, newOwner); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /src/BeaconProxy.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {IBeacon} from "core/interfaces/IBeacon.sol"; 17 | import {Clone} from "clones-with-immutable-args/Clone.sol"; 18 | 19 | contract BeaconProxy is Clone { 20 | function _getBeacon() internal pure returns (IBeacon) { 21 | return IBeacon(_getArgAddress(0)); 22 | } 23 | 24 | /** 25 | * @dev Delegates the current call to `implementation`. 26 | * 27 | * This function does not return to its internal call site, it will return directly to the external caller. 28 | */ 29 | function _delegate(address implementation) internal virtual { 30 | assembly { 31 | // Copy msg.data. We take full control of memory in this inline assembly 32 | // block because it will not return to Solidity code. We overwrite the 33 | // Solidity scratch pad at memory position 0. 34 | calldatacopy(0, 0, calldatasize()) 35 | 36 | // Call the implementation. 37 | // out and outsize are 0 because we don't know the size yet. 38 | let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) 39 | 40 | // Copy the returned data. 41 | returndatacopy(0, 0, returndatasize()) 42 | 43 | switch result 44 | // delegatecall returns 0 on error. 45 | case 0 { 46 | revert(0, returndatasize()) 47 | } 48 | default { 49 | return(0, returndatasize()) 50 | } 51 | } 52 | } 53 | 54 | /** 55 | * @dev Delegates the current call to the address returned by `_implementation()`. 56 | * 57 | * This function does not return to its internal call site, it will return directly to the external caller. 58 | */ 59 | function _fallback() internal virtual { 60 | _beforeFallback(); 61 | 62 | _delegate(_getBeacon().getImpl(_getArgUint8(20))); 63 | } 64 | 65 | /** 66 | * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if no other 67 | * function in the contract matches the call data. 68 | */ 69 | fallback() external payable virtual { 70 | _fallback(); 71 | } 72 | 73 | /** 74 | * @dev Fallback function that delegates calls to the address returned by `_implementation()`. Will run if call data 75 | * is empty. 76 | */ 77 | receive() external payable virtual { 78 | _fallback(); 79 | } 80 | 81 | /** 82 | * @dev Hook that is called before falling back to the implementation. Can happen as part of a manual `_fallback` 83 | * call, or as part of the Solidity `fallback` or `receive` functions. 84 | * 85 | * If overridden should call `super._beforeFallback()`. 86 | */ 87 | function _beforeFallback() internal virtual {} 88 | } 89 | -------------------------------------------------------------------------------- /src/TransferProxy.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {Auth, Authority} from "solmate/auth/Auth.sol"; 17 | import {SafeTransferLib, ERC20} from "solmate/utils/SafeTransferLib.sol"; 18 | 19 | import {ITransferProxy} from "core/interfaces/ITransferProxy.sol"; 20 | 21 | contract TransferProxy is Auth, ITransferProxy { 22 | using SafeTransferLib for ERC20; 23 | 24 | constructor(Authority _AUTHORITY) Auth(msg.sender, _AUTHORITY) { 25 | //only constructor we care about is Auth 26 | } 27 | 28 | function tokenTransferFrom( 29 | address token, 30 | address from, 31 | address to, 32 | uint256 amount 33 | ) external requiresAuth { 34 | ERC20(token).safeTransferFrom(from, to, amount); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Vault.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {ERC20} from "solmate/tokens/ERC20.sol"; 17 | import {SafeTransferLib} from "solmate/utils/SafeTransferLib.sol"; 18 | 19 | import {IERC165} from "core/interfaces/IERC165.sol"; 20 | import {VaultImplementation} from "core/VaultImplementation.sol"; 21 | 22 | /** 23 | * @title Vault 24 | */ 25 | contract Vault is VaultImplementation { 26 | using SafeTransferLib for ERC20; 27 | 28 | function name() 29 | public 30 | view 31 | virtual 32 | override(VaultImplementation) 33 | returns (string memory) 34 | { 35 | return string(abi.encodePacked("AST-Vault-", ERC20(asset()).symbol())); 36 | } 37 | 38 | function symbol() 39 | public 40 | view 41 | virtual 42 | override(VaultImplementation) 43 | returns (string memory) 44 | { 45 | return 46 | string(abi.encodePacked("AST-V", owner(), "-", ERC20(asset()).symbol())); 47 | } 48 | 49 | function supportsInterface(bytes4) 50 | public 51 | pure 52 | virtual 53 | override(IERC165) 54 | returns (bool) 55 | { 56 | return false; 57 | } 58 | 59 | function deposit(uint256 amount, address receiver) 60 | public 61 | virtual 62 | returns (uint256) 63 | { 64 | VIData storage s = _loadVISlot(); 65 | require(s.allowList[msg.sender] && receiver == owner()); 66 | ERC20(asset()).safeTransferFrom(msg.sender, address(this), amount); 67 | return amount; 68 | } 69 | 70 | function withdraw(uint256 amount) external { 71 | require(msg.sender == owner()); 72 | ERC20(asset()).safeTransferFrom(address(this), msg.sender, amount); 73 | } 74 | 75 | function disableAllowList() external pure override(VaultImplementation) { 76 | //invalid action allowlist must be enabled for private vaults 77 | revert InvalidRequest(InvalidRequestReason.NO_AUTHORITY); 78 | } 79 | 80 | function enableAllowList() external pure override(VaultImplementation) { 81 | //invalid action allowlist must be enabled for private vaults 82 | revert InvalidRequest(InvalidRequestReason.NO_AUTHORITY); 83 | } 84 | 85 | function modifyAllowList(address, bool) 86 | external 87 | pure 88 | override(VaultImplementation) 89 | { 90 | //invalid action private vautls can only be the owner or strategist 91 | revert InvalidRequest(InvalidRequestReason.NO_AUTHORITY); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/WithdrawVaultBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | import {IRouterBase} from "core/interfaces/IRouterBase.sol"; 16 | import {IAstariaRouter} from "core/interfaces/IAstariaRouter.sol"; 17 | import {IWithdrawProxy} from "core/interfaces/IWithdrawProxy.sol"; 18 | import {IERC4626} from "core/interfaces/IERC4626.sol"; 19 | import {Clone} from "clones-with-immutable-args/Clone.sol"; 20 | 21 | abstract contract WithdrawVaultBase is Clone, IWithdrawProxy { 22 | function name() public view virtual returns (string memory); 23 | 24 | function symbol() public view virtual returns (string memory); 25 | 26 | function ROUTER() external pure returns (IAstariaRouter) { 27 | return IAstariaRouter(_getArgAddress(0)); 28 | } 29 | 30 | function IMPL_TYPE() public pure override(IRouterBase) returns (uint8) { 31 | return _getArgUint8(20); 32 | } 33 | 34 | function asset() public pure virtual override(IERC4626) returns (address) { 35 | return _getArgAddress(21); 36 | } 37 | 38 | function VAULT() public pure returns (address) { 39 | return _getArgAddress(41); 40 | } 41 | 42 | function CLAIMABLE_EPOCH() public pure returns (uint64) { 43 | return _getArgUint64(61); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/actions/UNIV3/ClaimFees.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {IFlashAction} from "core/interfaces/IFlashAction.sol"; 17 | import {IV3PositionManager} from "core/interfaces/IV3PositionManager.sol"; 18 | import {ERC721} from "gpl/ERC721.sol"; 19 | import {IERC721Receiver} from "core/interfaces/IERC721Receiver.sol"; 20 | 21 | contract ClaimFees is IFlashAction, IERC721Receiver { 22 | address public immutable positionManager; 23 | bytes32 private constant FLASH_ACTION_MAGIC = 24 | keccak256("FlashAction.onFlashAction"); 25 | 26 | constructor(address positionManager_) { 27 | positionManager = positionManager_; 28 | } 29 | 30 | function onERC721Received( 31 | address, 32 | address, 33 | uint256, 34 | bytes calldata 35 | ) external override returns (bytes4) { 36 | return this.onERC721Received.selector; 37 | } 38 | 39 | function onFlashAction( 40 | IFlashAction.Underlying calldata asset, 41 | bytes calldata data 42 | ) external override returns (bytes32) { 43 | address receiver = abi.decode(data, (address)); 44 | IV3PositionManager(positionManager).collect( 45 | IV3PositionManager.CollectParams( 46 | asset.tokenId, 47 | receiver, 48 | type(uint128).max, 49 | type(uint128).max 50 | ) 51 | ); 52 | ERC721(asset.token).transferFrom( 53 | address(this), 54 | asset.returnTarget, 55 | asset.tokenId 56 | ); 57 | return FLASH_ACTION_MAGIC; 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/interfaces/IAstariaVaultBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {ICollateralToken} from "core/interfaces/ICollateralToken.sol"; 17 | import {IAstariaRouter} from "core/interfaces/IAstariaRouter.sol"; 18 | import {IRouterBase} from "core/interfaces/IRouterBase.sol"; 19 | 20 | interface IAstariaVaultBase is IRouterBase { 21 | function owner() external view returns (address); 22 | 23 | function asset() external view returns (address); 24 | 25 | function COLLATERAL_TOKEN() external view returns (ICollateralToken); 26 | 27 | function START() external view returns (uint256); 28 | 29 | function EPOCH_LENGTH() external view returns (uint256); 30 | 31 | function VAULT_FEE() external view returns (uint256); 32 | } 33 | -------------------------------------------------------------------------------- /src/interfaces/IBeacon.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | interface IBeacon { 17 | /** 18 | * @dev Must return an address that can be used as a delegate call target. 19 | * 20 | * {BeaconProxy} will check that this address is a contract. 21 | */ 22 | function getImpl(uint8) external view returns (address); 23 | } 24 | -------------------------------------------------------------------------------- /src/interfaces/IERC1155.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol) 3 | 4 | pragma solidity =0.8.17; 5 | 6 | import {IERC165} from "core/interfaces/IERC165.sol"; 7 | 8 | /** 9 | * @dev Required interface of an ERC1155 compliant contract, as defined in the 10 | * https://eips.ethereum.org/EIPS/eip-1155[EIP]. 11 | * 12 | * _Available since v3.1._ 13 | */ 14 | interface IERC1155 is IERC165 { 15 | /** 16 | * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. 17 | */ 18 | event TransferSingle( 19 | address indexed operator, 20 | address indexed from, 21 | address indexed to, 22 | uint256 id, 23 | uint256 value 24 | ); 25 | 26 | /** 27 | * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all 28 | * transfers. 29 | */ 30 | event TransferBatch( 31 | address indexed operator, 32 | address indexed from, 33 | address indexed to, 34 | uint256[] ids, 35 | uint256[] values 36 | ); 37 | 38 | /** 39 | * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to 40 | * `approved`. 41 | */ 42 | event ApprovalForAll( 43 | address indexed account, 44 | address indexed operator, 45 | bool approved 46 | ); 47 | 48 | /** 49 | * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. 50 | * 51 | * If an {URI} event was emitted for `id`, the standard 52 | * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value 53 | * returned by {IERC1155MetadataURI-uri}. 54 | */ 55 | event URI(string value, uint256 indexed id); 56 | 57 | /** 58 | * @dev Returns the amount of tokens of token type `id` owned by `account`. 59 | * 60 | * Requirements: 61 | * 62 | * - `account` cannot be the zero address. 63 | */ 64 | function balanceOf(address account, uint256 id) 65 | external 66 | view 67 | returns (uint256); 68 | 69 | /** 70 | * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. 71 | * 72 | * Requirements: 73 | * 74 | * - `accounts` and `ids` must have the same length. 75 | */ 76 | function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) 77 | external 78 | view 79 | returns (uint256[] memory); 80 | 81 | /** 82 | * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, 83 | * 84 | * Emits an {ApprovalForAll} event. 85 | * 86 | * Requirements: 87 | * 88 | * - `operator` cannot be the caller. 89 | */ 90 | function setApprovalForAll(address operator, bool approved) external; 91 | 92 | /** 93 | * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. 94 | * 95 | * See {setApprovalForAll}. 96 | */ 97 | function isApprovedForAll(address account, address operator) 98 | external 99 | view 100 | returns (bool); 101 | 102 | /** 103 | * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. 104 | * 105 | * Emits a {TransferSingle} event. 106 | * 107 | * Requirements: 108 | * 109 | * - `to` cannot be the zero address. 110 | * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. 111 | * - `from` must have a balance of tokens of type `id` of at least `amount`. 112 | * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the 113 | * acceptance magic value. 114 | */ 115 | function safeTransferFrom( 116 | address from, 117 | address to, 118 | uint256 id, 119 | uint256 amount, 120 | bytes calldata data 121 | ) external; 122 | 123 | /** 124 | * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. 125 | * 126 | * Emits a {TransferBatch} event. 127 | * 128 | * Requirements: 129 | * 130 | * - `ids` and `amounts` must have the same length. 131 | * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the 132 | * acceptance magic value. 133 | */ 134 | function safeBatchTransferFrom( 135 | address from, 136 | address to, 137 | uint256[] calldata ids, 138 | uint256[] calldata amounts, 139 | bytes calldata data 140 | ) external; 141 | } 142 | -------------------------------------------------------------------------------- /src/interfaces/IERC1155Receiver.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) 3 | 4 | pragma solidity =0.8.17; 5 | 6 | import {IERC165} from "core/interfaces/IERC165.sol"; 7 | 8 | /** 9 | * @dev _Available since v3.1._ 10 | */ 11 | interface IERC1155Receiver is IERC165 { 12 | /** 13 | * @dev Handles the receipt of a single ERC1155 token type. This function is 14 | * called at the end of a `safeTransferFrom` after the balance has been updated. 15 | * 16 | * NOTE: To accept the transfer, this must return 17 | * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` 18 | * (i.e. 0xf23a6e61, or its own function selector). 19 | * 20 | * @param operator The address which initiated the transfer (i.e. msg.sender) 21 | * @param from The address which previously owned the token 22 | * @param id The ID of the token being transferred 23 | * @param value The amount of tokens being transferred 24 | * @param data Additional data with no specified format 25 | * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed 26 | */ 27 | function onERC1155Received( 28 | address operator, 29 | address from, 30 | uint256 id, 31 | uint256 value, 32 | bytes calldata data 33 | ) external returns (bytes4); 34 | 35 | /** 36 | * @dev Handles the receipt of a multiple ERC1155 token types. This function 37 | * is called at the end of a `safeBatchTransferFrom` after the balances have 38 | * been updated. 39 | * 40 | * NOTE: To accept the transfer(s), this must return 41 | * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` 42 | * (i.e. 0xbc197c81, or its own function selector). 43 | * 44 | * @param operator The address which initiated the batch transfer (i.e. msg.sender) 45 | * @param from The address which previously owned the token 46 | * @param ids An array containing ids of each token being transferred (order and length must match values array) 47 | * @param values An array containing amounts of each token being transferred (order and length must match ids array) 48 | * @param data Additional data with no specified format 49 | * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed 50 | */ 51 | function onERC1155BatchReceived( 52 | address operator, 53 | address from, 54 | uint256[] calldata ids, 55 | uint256[] calldata values, 56 | bytes calldata data 57 | ) external returns (bytes4); 58 | } 59 | -------------------------------------------------------------------------------- /src/interfaces/IERC165.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) 3 | 4 | pragma solidity =0.8.17; 5 | 6 | /** 7 | * @dev Interface of the ERC165 standard, as defined in the 8 | * https://eips.ethereum.org/EIPS/eip-165[EIP]. 9 | * 10 | * Implementers can declare support of contract interfaces, which can then be 11 | * queried by others ({ERC165Checker}). 12 | * 13 | * For an implementation, see {ERC165}. 14 | */ 15 | interface IERC165 { 16 | /** 17 | * @dev Returns true if this contract implements the interface defined by 18 | * `interfaceId`. See the corresponding 19 | * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] 20 | * to learn more about how these ids are created. 21 | * 22 | * This function call must use less than 30 000 gas. 23 | */ 24 | function supportsInterface(bytes4 interfaceId) external view returns (bool); 25 | } 26 | -------------------------------------------------------------------------------- /src/interfaces/IERC20.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) 3 | 4 | pragma solidity =0.8.17; 5 | 6 | /** 7 | * @dev Interface of the ERC20 standard as defined in the EIP. 8 | */ 9 | interface IERC20 { 10 | /** 11 | * @dev Emitted when `value` tokens are moved from one account (`from`) to 12 | * another (`to`). 13 | * 14 | * Note that `value` may be zero. 15 | */ 16 | event Transfer(address indexed from, address indexed to, uint256 value); 17 | 18 | /** 19 | * @dev Emitted when the allowance of a `spender` for an `owner` is set by 20 | * a call to {approve}. `value` is the new allowance. 21 | */ 22 | event Approval(address indexed owner, address indexed spender, uint256 value); 23 | 24 | /** 25 | * @dev Returns the amount of tokens in existence. 26 | */ 27 | function totalSupply() external view returns (uint256); 28 | 29 | /** 30 | * @dev Returns the amount of tokens owned by `account`. 31 | */ 32 | function balanceOf(address account) external view returns (uint256); 33 | 34 | /** 35 | * @dev Moves `amount` tokens from the caller's account to `to`. 36 | * 37 | * Returns a boolean value indicating whether the operation succeeded. 38 | * 39 | * Emits a {Transfer} event. 40 | */ 41 | function transfer(address to, uint256 amount) external returns (bool); 42 | 43 | /** 44 | * @dev Returns the remaining number of tokens that `spender` will be 45 | * allowed to spend on behalf of `owner` through {transferFrom}. This is 46 | * zero by default. 47 | * 48 | * This value changes when {approve} or {transferFrom} are called. 49 | */ 50 | function allowance(address owner, address spender) 51 | external 52 | view 53 | returns (uint256); 54 | 55 | /** 56 | * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. 57 | * 58 | * Returns a boolean value indicating whether the operation succeeded. 59 | * 60 | * IMPORTANT: Beware that changing an allowance with this method brings the risk 61 | * that someone may use both the old and the new allowance by unfortunate 62 | * transaction ordering. One possible solution to mitigate this race 63 | * condition is to first reduce the spender's allowance to 0 and set the 64 | * desired value afterwards: 65 | * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 66 | * 67 | * Emits an {Approval} event. 68 | */ 69 | function approve(address spender, uint256 amount) external returns (bool); 70 | 71 | /** 72 | * @dev Moves `amount` tokens from `from` to `to` using the 73 | * allowance mechanism. `amount` is then deducted from the caller's 74 | * allowance. 75 | * 76 | * Returns a boolean value indicating whether the operation succeeded. 77 | * 78 | * Emits a {Transfer} event. 79 | */ 80 | function transferFrom( 81 | address from, 82 | address to, 83 | uint256 amount 84 | ) external returns (bool); 85 | } 86 | -------------------------------------------------------------------------------- /src/interfaces/IERC20Metadata.sol: -------------------------------------------------------------------------------- 1 | pragma solidity =0.8.17; 2 | import {IERC20} from "core/interfaces/IERC20.sol"; 3 | 4 | interface IERC20Metadata is IERC20 { 5 | /** 6 | * @dev Returns the name of the token. 7 | */ 8 | function name() external view returns (string memory); 9 | 10 | /** 11 | * @dev Returns the symbol of the token. 12 | */ 13 | function symbol() external view returns (string memory); 14 | 15 | /** 16 | * @dev Returns the decimals places of the token. 17 | */ 18 | function decimals() external view returns (uint8); 19 | } 20 | -------------------------------------------------------------------------------- /src/interfaces/IERC721.sol: -------------------------------------------------------------------------------- 1 | pragma solidity =0.8.17; 2 | 3 | import {IERC165} from "core/interfaces/IERC165.sol"; 4 | 5 | interface IERC721 is IERC165 { 6 | event Transfer(address indexed from, address indexed to, uint256 indexed id); 7 | 8 | event Approval( 9 | address indexed owner, 10 | address indexed spender, 11 | uint256 indexed id 12 | ); 13 | 14 | event ApprovalForAll( 15 | address indexed owner, 16 | address indexed operator, 17 | bool approved 18 | ); 19 | 20 | function tokenURI(uint256 id) external view returns (string memory); 21 | 22 | function ownerOf(uint256 id) external view returns (address owner); 23 | 24 | function balanceOf(address owner) external view returns (uint256 balance); 25 | 26 | function approve(address spender, uint256 id) external; 27 | 28 | function setApprovalForAll(address operator, bool approved) external; 29 | 30 | function transferFrom( 31 | address from, 32 | address to, 33 | uint256 id 34 | ) external; 35 | 36 | function safeTransferFrom( 37 | address from, 38 | address to, 39 | uint256 id 40 | ) external; 41 | 42 | function safeTransferFrom( 43 | address from, 44 | address to, 45 | uint256 id, 46 | bytes calldata data 47 | ) external; 48 | } 49 | -------------------------------------------------------------------------------- /src/interfaces/IERC721Receiver.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) 3 | 4 | pragma solidity =0.8.17; 5 | 6 | /** 7 | * @title ERC721 token receiver interface 8 | * @dev Interface for any contract that wants to support safeTransfers 9 | * from ERC721 asset contracts. 10 | */ 11 | interface IERC721Receiver { 12 | /** 13 | * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} 14 | * by `operator` from `from`, this function is called. 15 | * 16 | * It must return its Solidity selector to confirm the token transfer. 17 | * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. 18 | * 19 | * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. 20 | */ 21 | function onERC721Received( 22 | address operator, 23 | address from, 24 | uint256 tokenId, 25 | bytes calldata data 26 | ) external returns (bytes4); 27 | } 28 | -------------------------------------------------------------------------------- /src/interfaces/IFlashAction.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | interface IFlashAction { 17 | struct Underlying { 18 | address returnTarget; 19 | address token; 20 | uint256 tokenId; 21 | } 22 | 23 | function onFlashAction(Underlying calldata, bytes calldata) 24 | external 25 | returns (bytes32); 26 | } 27 | -------------------------------------------------------------------------------- /src/interfaces/IRouterBase.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {IAstariaRouter} from "core/interfaces/IAstariaRouter.sol"; 17 | 18 | interface IRouterBase { 19 | function ROUTER() external view returns (IAstariaRouter); 20 | 21 | function IMPL_TYPE() external view returns (uint8); 22 | } 23 | -------------------------------------------------------------------------------- /src/interfaces/ISecurityHook.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | interface ISecurityHook { 17 | function getState(address, uint256) external view returns (bytes32); 18 | } 19 | -------------------------------------------------------------------------------- /src/interfaces/IStrategyValidator.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {IAstariaRouter} from "core/interfaces/IAstariaRouter.sol"; 17 | import {ILienToken} from "core/interfaces/IAstariaRouter.sol"; 18 | 19 | interface IStrategyValidator { 20 | function validateAndParse( 21 | IAstariaRouter.NewLienRequest calldata params, 22 | address borrower, 23 | address collateralTokenContract, 24 | uint256 collateralTokenId 25 | ) external view returns (bytes32, ILienToken.Details memory); 26 | } 27 | -------------------------------------------------------------------------------- /src/interfaces/ITransferProxy.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | interface ITransferProxy { 17 | function tokenTransferFrom( 18 | address token, 19 | address from, 20 | address to, 21 | uint256 amount 22 | ) external; 23 | } 24 | -------------------------------------------------------------------------------- /src/interfaces/IVaultImplementation.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {ILienToken} from "core/interfaces/ILienToken.sol"; 17 | import {IAstariaRouter} from "core/interfaces/IAstariaRouter.sol"; 18 | import {IAstariaVaultBase} from "core/interfaces/IAstariaVaultBase.sol"; 19 | import {IERC165} from "core/interfaces/IERC165.sol"; 20 | 21 | interface IVaultImplementation is IAstariaVaultBase, IERC165 { 22 | enum InvalidRequestReason { 23 | NO_AUTHORITY, 24 | INVALID_SIGNATURE, 25 | INVALID_COMMITMENT, 26 | INVALID_AMOUNT, 27 | INSUFFICIENT_FUNDS, 28 | INVALID_RATE, 29 | INVALID_POTENTIAL_DEBT, 30 | SHUTDOWN, 31 | PAUSED 32 | } 33 | 34 | error InvalidRequest(InvalidRequestReason reason); 35 | 36 | struct InitParams { 37 | address delegate; 38 | bool allowListEnabled; 39 | address[] allowList; 40 | uint256 depositCap; // max amount of tokens that can be deposited 41 | } 42 | 43 | struct VIData { 44 | uint88 depositCap; 45 | address delegate; 46 | bool allowListEnabled; 47 | bool isShutdown; 48 | uint256 strategistNonce; 49 | mapping(address => bool) allowList; 50 | } 51 | 52 | event AllowListUpdated(address, bool); 53 | 54 | event AllowListEnabled(bool); 55 | 56 | event DelegateUpdated(address); 57 | 58 | event NonceUpdated(uint256 nonce); 59 | 60 | event IncrementNonce(uint256 nonce); 61 | 62 | event VaultShutdown(); 63 | 64 | function getShutdown() external view returns (bool); 65 | 66 | function shutdown() external; 67 | 68 | function incrementNonce() external; 69 | 70 | function commitToLien( 71 | IAstariaRouter.Commitment calldata params, 72 | address receiver 73 | ) 74 | external 75 | returns ( 76 | uint256 lienId, 77 | ILienToken.Stack[] memory stack, 78 | uint256 payout 79 | ); 80 | 81 | function buyoutLien( 82 | ILienToken.Stack[] calldata stack, 83 | uint8 position, 84 | IAstariaRouter.Commitment calldata incomingTerms 85 | ) external returns (ILienToken.Stack[] memory, ILienToken.Stack memory); 86 | 87 | function recipient() external view returns (address); 88 | 89 | function setDelegate(address delegate_) external; 90 | 91 | function init(InitParams calldata params) external; 92 | 93 | function encodeStrategyData( 94 | IAstariaRouter.StrategyDetailsParam calldata strategy, 95 | bytes32 root 96 | ) external view returns (bytes memory); 97 | 98 | function domainSeparator() external view returns (bytes32); 99 | 100 | function modifyDepositCap(uint256 newCap) external; 101 | 102 | function getStrategistNonce() external view returns (uint256); 103 | 104 | function STRATEGY_TYPEHASH() external view returns (bytes32); 105 | } 106 | -------------------------------------------------------------------------------- /src/interfaces/IWithdrawProxy.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {IERC165} from "core/interfaces/IERC165.sol"; 17 | import {IERC4626} from "core/interfaces/IERC4626.sol"; 18 | import {IAstariaRouter} from "core/interfaces/IAstariaRouter.sol"; 19 | import {IRouterBase} from "core/interfaces/IRouterBase.sol"; 20 | 21 | interface IWithdrawProxy is IRouterBase, IERC165, IERC4626 { 22 | function VAULT() external pure returns (address); 23 | 24 | function CLAIMABLE_EPOCH() external pure returns (uint64); 25 | 26 | /** 27 | * @notice Called at epoch boundary, computes the ratio between the funds of withdrawing liquidity providers and the balance of the underlying PublicVault so that claim() proportionally pays optimized-out to all parties. 28 | * @param liquidationWithdrawRatio The ratio of withdrawing to remaining LPs for the current epoch boundary. 29 | */ 30 | function setWithdrawRatio(uint256 liquidationWithdrawRatio) external; 31 | 32 | /** 33 | * @notice Adds an auction scheduled to end in a new epoch to this WithdrawProxy, to ensure that withdrawing LPs get a proportional share of auction returns. 34 | * @param newLienExpectedValue The expected auction value for the lien being auctioned. 35 | * @param finalAuctionDelta The timestamp by which the auction being added is guaranteed to end. As new auctions are added to the WithdrawProxy, this value will strictly increase as all auctions have the same maximum duration. 36 | */ 37 | function handleNewLiquidation( 38 | uint256 newLienExpectedValue, 39 | uint256 finalAuctionDelta 40 | ) external; 41 | 42 | /** 43 | * @notice Called by PublicVault if previous epoch's withdrawReserve hasn't been met. 44 | * @param amount The amount to attempt to drain from the WithdrawProxy. 45 | * @param withdrawProxy The address of the withdrawProxy to drain to. 46 | */ 47 | function drain(uint256 amount, address withdrawProxy) 48 | external 49 | returns (uint256); 50 | 51 | /** 52 | * @notice Return any excess funds to the PublicVault, according to the withdrawRatio between withdrawing and remaining LPs. 53 | */ 54 | function claim() external; 55 | 56 | /** 57 | * @notice Called when PublicVault sends a payment to the WithdrawProxy 58 | * to track how much of its WETH balance is from withdrawReserve payments instead of auction repayments 59 | * @param amount The amount paid by the PublicVault, deducted from its withdrawReserve. 60 | */ 61 | function increaseWithdrawReserveReceived(uint256 amount) external; 62 | 63 | /** 64 | * @notice Returns the expected value of auctions tracked by this WithdrawProxy (total debt owed against liquidated collateral). 65 | */ 66 | function getExpected() external view returns (uint256); 67 | 68 | /** 69 | * @notice Returns the ratio between the balance of LPs exiting the PublicVault and those remaining. 70 | */ 71 | function getWithdrawRatio() external view returns (uint256); 72 | 73 | /** 74 | * Returns the end timestamp of the last auction tracked by this WithdrawProxy. After this timestamp has passed, claim() can be called. 75 | */ 76 | function getFinalAuctionEnd() external view returns (uint256); 77 | 78 | error NotSupported(); 79 | } 80 | -------------------------------------------------------------------------------- /src/libraries/Base64.sol: -------------------------------------------------------------------------------- 1 | pragma solidity =0.8.17; 2 | 3 | library Base64 { 4 | bytes internal constant TABLE = 5 | "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; 6 | 7 | /// @notice Encodes some bytes to the base64 representation 8 | function encode(bytes memory data) internal pure returns (string memory) { 9 | uint256 len = data.length; 10 | if (len == 0) { 11 | return ""; 12 | } 13 | 14 | // multiply by 4/3 rounded up 15 | uint256 encodedLen = 4 * ((len + 2) / 3); 16 | 17 | // Add some extra buffer at the end 18 | bytes memory result = new bytes(encodedLen + 32); 19 | 20 | bytes memory table = TABLE; 21 | 22 | assembly { 23 | let tablePtr := add(table, 1) 24 | let resultPtr := add(result, 32) 25 | 26 | for { 27 | let i := 0 28 | } lt(i, len) { 29 | 30 | } { 31 | i := add(i, 3) 32 | let input := and(mload(add(data, i)), 0xffffff) 33 | 34 | let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) 35 | out := shl(8, out) 36 | out := add( 37 | out, 38 | and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF) 39 | ) 40 | out := shl(8, out) 41 | out := add( 42 | out, 43 | and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF) 44 | ) 45 | out := shl(8, out) 46 | out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF)) 47 | out := shl(224, out) 48 | 49 | mstore(resultPtr, out) 50 | 51 | resultPtr := add(resultPtr, 4) 52 | } 53 | 54 | switch mod(len, 3) 55 | case 1 { 56 | mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) 57 | } 58 | case 2 { 59 | mstore(sub(resultPtr, 1), shl(248, 0x3d)) 60 | } 61 | 62 | mstore(result, encodedLen) 63 | } 64 | 65 | return string(result); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/libraries/CollateralLookup.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {IERC721} from "core/interfaces/IERC721.sol"; 17 | 18 | library CollateralLookup { 19 | function computeId(address token, uint256 tokenId) 20 | internal 21 | pure 22 | returns (uint256 hash) 23 | { 24 | assembly { 25 | mstore(0, token) // sets the right most 20 bytes in the first memory slot. 26 | mstore(0x20, tokenId) // stores tokenId in the second memory slot. 27 | hash := keccak256(12, 52) // keccak from the 12th byte up to the entire second memory slot. 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/scripts/Setup.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity ^0.8.17; 15 | 16 | import "core/test/TestHelpers.t.sol"; 17 | import {Script} from "forge-std/Script.sol"; 18 | import {AstariaStack} from "core/scripts/deployments/AstariaStack.sol"; 19 | import {MockERC20} from "solmate/test/utils/mocks/MockERC20.sol"; 20 | import {IERC4626} from "core/interfaces/IERC4626.sol"; 21 | import {ILienToken} from "core/interfaces/ILienToken.sol"; 22 | 23 | contract Setup is AstariaStack, TestHelpers { 24 | function setUp() public override(TestHelpers) {} 25 | 26 | function run() public override(Deploy) { 27 | MockERC20 astariaWETH = MockERC20( 28 | 0x508f2c434E66Df1706CBa7Ae137976C814B5633E 29 | ); 30 | // astariaWETH.mint(msg.sender, 500e18); 31 | TestNFT nft = TestNFT(address(0xd6eF92fA2eF2Cb702f0bFfF54b111b076aC0237D)); 32 | 33 | ASTARIA_ROUTER = AstariaRouter(ASTARIA_ROUTER_ADDR); 34 | COLLATERAL_TOKEN = CollateralToken(COLLATERAL_TOKEN_ADDR); 35 | LIEN_TOKEN = LienToken(LIEN_TOKEN_ADDR); 36 | address vault = address(0x459043EA157003b59cD7F666aa73Ee664E051250); 37 | // address vault = ASTARIA_ROUTER.newPublicVault( 38 | // 10 days, 39 | // msg.sender, 40 | // address(astariaWETH), 41 | // 0, 42 | // false, 43 | // new address[](0), 44 | // 0 45 | // ); 46 | 47 | // astariaWETH.approve(TRANSFER_PROXY_ADDR, type(uint256).max); 48 | // IERC4626 vault, 49 | // address to, 50 | // uint256 amount, 51 | // uint256 minSharesOut 52 | // vm.startBroadcast(msg.sender); 53 | // nft.mint(msg.sender, 13); 54 | // nft.mint(msg.sender, 14); 55 | // nft.mint(msg.sender, 15); 56 | // ASTARIA_ROUTER.depositToVault(IERC4626(vault), msg.sender, 100e18, 0); 57 | // vm.stopBroadcast(); 58 | // nft.safeTransferFrom(msg.sender, COLLATERAL_TOKEN_ADDR, 11, ""); 59 | // CollateralToken(COLLATERAL_TOKEN_ADDR).ownerOf( 60 | // uint256( 61 | // 61211627665129443869230057847673450818728251913281569209261074430012401530002 62 | // ) 63 | // ); 64 | // vm.startBroadcast(msg.sender); 65 | // 66 | // (, ILienToken.Stack[] memory stack) = _commitToLien({ 67 | // vault: vault, 68 | // strategist: msg.sender, 69 | // strategistPK: vm.envUint("PRIVATE_KEY"), 70 | // tokenContract: address(nft), 71 | // tokenId: uint256(13), 72 | // lienDetails: standardLienDetails, 73 | // amount: 10 ether, 74 | // isFirstLien: true, 75 | // stack: new ILienToken.Stack[](0), 76 | // revertMessage: new bytes(0), 77 | // broadcast: true 78 | // }); 79 | // bytes32 hash1 = keccak256(abi.encode(stack)); 80 | // 81 | ILienToken.Stack[] memory stack2 = new ILienToken.Stack[](1); 82 | 83 | stack2[0] = ILienToken.Stack( 84 | ILienToken.Lien( 85 | 1, 86 | 0x508f2c434E66Df1706CBa7Ae137976C814B5633E, 87 | 0x459043EA157003b59cD7F666aa73Ee664E051250, 88 | 0x95267f9c01f12bfd3e299338b0a7ff51deba28757a5c6a30c8661df971248ab2, 89 | 43594583166590812179707933275182557302881131184420798783129118581376014344133, 90 | ILienToken.Details( 91 | 50000000000000000000, 92 | 47564687975, 93 | 864000, 94 | 0, 95 | 500000000000000000000 96 | ) 97 | ), 98 | ILienToken.Point( 99 | 10000000000000000000, 100 | 1670233392, 101 | 1671097392, 102 | 100589098951435887827741419285363633068566536542347938918567981420175971628953 103 | ) 104 | ); 105 | 106 | vm.startBroadcast(msg.sender); 107 | LIEN_TOKEN.makePayment( 108 | uint256( 109 | 43594583166590812179707933275182557302881131184420798783129118581376014344133 110 | ), 111 | stack2, 112 | uint256(5e18) 113 | ); 114 | 115 | vm.stopBroadcast(); 116 | // 117 | // vm.startBroadcast(msg.sender); 118 | // ASTARIA_ROUTER.liquidate(stack2, uint8(0)); 119 | // vm.stopBroadcast(); 120 | } 121 | 122 | event LogStack(ILienToken.Stack[] stack); 123 | } 124 | -------------------------------------------------------------------------------- /src/scripts/deployments/AstariaStack.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import "forge-std/Script.sol"; 17 | import {AstariaRouter} from "core/AstariaRouter.sol"; 18 | import { 19 | MultiRolesAuthority 20 | } from "solmate/auth/authorities/MultiRolesAuthority.sol"; 21 | import {TransferProxy} from "core/TransferProxy.sol"; 22 | import {CollateralToken} from "core/CollateralToken.sol"; 23 | import {LienToken} from "core/LienToken.sol"; 24 | import {Consideration} from "seaport/lib/Consideration.sol"; 25 | 26 | //goerli deployments 27 | contract AstariaStack is Script { 28 | address SEAPORT_ADDR = vm.envAddress("SEAPORT_ADDR"); 29 | address WETH9_ADDR = vm.envAddress("WETH9_ADDR"); 30 | address MRA_ADDR = vm.envAddress("MRA_ADDR"); 31 | address TRANSFER_PROXY_ADDR = vm.envAddress("TRANSFER_PROXY_ADDR"); 32 | address LIEN_TOKEN_IMPL_ADDR = vm.envAddress("LIEN_TOKEN_IMPL_ADDR"); 33 | address LIEN_TOKEN_ADDR = vm.envAddress("LIEN_TOKEN_PROXY_ADDR"); 34 | address COLLATERAL_TOKEN_IMPL_ADDR = 35 | vm.envAddress("COLLATERAL_TOKEN_IMPL_ADDR"); 36 | address COLLATERAL_TOKEN_ADDR = vm.envAddress("COLLATERAL_TOKEN_PROXY_ADDR"); 37 | address SOLO_IMPLEMENTATION_ADDR = vm.envAddress("SOLO_IMPLEMENTATION_ADDR"); 38 | address PUBLIC_VAULT_IMPLEMENTATION_ADDR = 39 | vm.envAddress("PUBLIC_VAULT_IMPLEMENTATION_ADDR"); 40 | address WITHDRAW_PROXY_ADDR = vm.envAddress("WITHDRAW_PROXY_ADDR"); 41 | address BEACON_PROXY_ADDR = vm.envAddress("BEACON_PROXY_ADDR"); 42 | address CLEARING_HOUSE_IMPL_ADDR = vm.envAddress("CLEARING_HOUSE_IMPL_ADDR"); 43 | address ASTARIA_ROUTER_IMPL_ADDR = vm.envAddress("ASTARIA_ROUTER_IMPL_ADDR"); 44 | address ASTARIA_ROUTER_ADDR = vm.envAddress("ASTARIA_ROUTER_PROXY_ADDR"); 45 | } 46 | -------------------------------------------------------------------------------- /src/scripts/deployments/strategies/CollectionStrategy.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {Script} from "forge-std/Script.sol"; 17 | import {IAstariaRouter} from "core/interfaces/IAstariaRouter.sol"; 18 | import {CollectionValidator} from "core/strategies/CollectionValidator.sol"; 19 | import {AstariaStack} from "../AstariaStack.sol"; 20 | 21 | contract CollectionStrategy is AstariaStack { 22 | IAstariaRouter router; 23 | 24 | function run() external { 25 | router = IAstariaRouter(ASTARIA_ROUTER_ADDR); 26 | vm.startBroadcast(msg.sender); 27 | 28 | CollectionValidator validator = new CollectionValidator(); 29 | 30 | router.file( 31 | IAstariaRouter.File( 32 | IAstariaRouter.FileType.StrategyValidator, 33 | abi.encode(validator.VERSION_TYPE(), address(validator)) 34 | ) 35 | ); 36 | 37 | vm.stopBroadcast(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/scripts/deployments/strategies/UniqueStrategy.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {Script} from "forge-std/Script.sol"; 17 | import {UniqueValidator} from "../../../strategies/UniqueValidator.sol"; 18 | import {AstariaStack} from "../AstariaStack.sol"; 19 | import {IAstariaRouter} from "core/interfaces/IAstariaRouter.sol"; 20 | 21 | contract UniqueStrategy is AstariaStack { 22 | IAstariaRouter router; 23 | 24 | function run() external { 25 | router = IAstariaRouter(ASTARIA_ROUTER_ADDR); 26 | vm.startBroadcast(msg.sender); 27 | 28 | UniqueValidator validator = new UniqueValidator(); 29 | 30 | router.file( 31 | IAstariaRouter.File( 32 | IAstariaRouter.FileType.StrategyValidator, 33 | abi.encode(validator.VERSION_TYPE(), address(validator)) 34 | ) 35 | ); 36 | 37 | vm.stopBroadcast(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/scripts/deployments/strategies/V3Strategy.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {Script} from "forge-std/Script.sol"; 17 | import {V3SecurityHook} from "core/security/V3SecurityHook.sol"; 18 | import {UNI_V3Validator} from "core/strategies/UNI_V3Validator.sol"; 19 | import {AstariaStack} from "../AstariaStack.sol"; 20 | import {CollateralToken} from "core/CollateralToken.sol"; 21 | import {ICollateralToken} from "core/interfaces/ICollateralToken.sol"; 22 | import {IAstariaRouter} from "core/interfaces/IAstariaRouter.sol"; 23 | 24 | contract V3Strategy is AstariaStack { 25 | function run() external { 26 | IAstariaRouter router = IAstariaRouter(ASTARIA_ROUTER_ADDR); 27 | 28 | CollateralToken ct = CollateralToken(COLLATERAL_TOKEN_ADDR); 29 | vm.startBroadcast(msg.sender); 30 | 31 | UNI_V3Validator V3Validator = new UNI_V3Validator(); 32 | 33 | router.file( 34 | IAstariaRouter.File( 35 | IAstariaRouter.FileType.StrategyValidator, 36 | abi.encode(V3Validator.VERSION_TYPE(), address(V3Validator)) 37 | ) 38 | ); 39 | 40 | V3SecurityHook V3_SECURITY_HOOK = new V3SecurityHook( 41 | address(0xC36442b4a4522E871399CD717aBDD847Ab11FE88) //nft position manager 42 | ); 43 | 44 | ct.file( 45 | ICollateralToken.File( 46 | ICollateralToken.FileType.SecurityHook, 47 | abi.encode( 48 | address(0xC36442b4a4522E871399CD717aBDD847Ab11FE88), //v3 nft address 49 | address(V3_SECURITY_HOOK) 50 | ) 51 | ) 52 | ); 53 | 54 | vm.stopBroadcast(); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/scripts/setup/GoerliSetup.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity ^0.8.17; 15 | 16 | import "core/test/TestHelpers.t.sol"; 17 | import {Script} from "forge-std/Script.sol"; 18 | import { 19 | AdvancedOrder, 20 | CriteriaResolver, 21 | OfferItem, 22 | ConsiderationItem, 23 | ItemType, 24 | OrderParameters, 25 | OrderComponents, 26 | OrderType, 27 | Order 28 | } from "seaport/lib/ConsiderationStructs.sol"; 29 | import {Consideration} from "seaport/lib/Consideration.sol"; 30 | 31 | import {Auth, Authority} from "solmate/auth/Auth.sol"; 32 | 33 | //contract SimpleSaleTest is Auth { 34 | // constructor(address creator) Auth(creator, Authority(address(0))) {} 35 | // 36 | // function isValidSignature(bytes32, bytes memory) 37 | // external 38 | // pure 39 | // returns (bytes4) 40 | // { 41 | // return 0x1626ba7e; 42 | // } 43 | // 44 | // function run(uint256 tokenId) public requiresAuth {} 45 | //} 46 | 47 | contract GoerliSetup is TestHelpers { 48 | function setUp() public override(TestHelpers) {} 49 | 50 | function run() public override { 51 | TestNFT nft = TestNFT(address(0xd6eF92fA2eF2Cb702f0bFfF54b111b076aC0237D)); 52 | 53 | Consideration SEAPORT = Consideration( 54 | address(0x00000000006c3852cbEf3e08E8dF289169EdE581) 55 | ); 56 | nft.setApprovalForAll(address(SEAPORT), true); 57 | 58 | // 0x160 59 | 60 | ConsiderationItem[] memory considerations = new ConsiderationItem[](2); 61 | uint256 basePayment = 50e18; 62 | uint256 basePaymentEnd = 10e18; 63 | uint256 seaFee = basePayment / 40; 64 | uint256 seaFeeEnd = basePaymentEnd / 40; 65 | considerations[0] = ConsiderationItem( 66 | ItemType.NATIVE, 67 | address(0), 68 | uint256(0), 69 | basePayment - seaFee, 70 | basePaymentEnd - seaFeeEnd, 71 | payable(address(this)) 72 | ); 73 | considerations[1] = ConsiderationItem( 74 | ItemType.NATIVE, 75 | address(0), 76 | uint256(0), 77 | seaFee, 78 | seaFeeEnd, 79 | payable(0x0000a26b00c1F0DF003000390027140000fAa719) 80 | ); 81 | 82 | OfferItem[] memory offerItems = new OfferItem[](1); 83 | offerItems[0] = OfferItem({ 84 | itemType: ItemType.ERC721, 85 | token: address(nft), 86 | identifierOrCriteria: 2, 87 | startAmount: 1, 88 | endAmount: 1 89 | }); 90 | 91 | //uint256 startTime; // 0xa0 92 | // uint256 endTime; // 0xc0 93 | // bytes32 zoneHash; // 0xe0 94 | // uint256 salt; // 0x100 95 | // bytes32 conduitKey; // 0x120 96 | // uint256 totalOriginalConsiderationItems; // 0x140 97 | // // offer.length 98 | 99 | //address offerer; // 0x00 100 | // address zone; // 0x20 101 | // OfferItem[] offer; // 0x40 102 | // ConsiderationItem[] consideration; // 0x60 103 | // OrderType orderType; // 0x80 104 | // uint256 startTime; // 0xa0 105 | // uint256 endTime; // 0xc0 106 | // bytes32 zoneHash; // 0xe0 107 | // uint256 salt; // 0x100 108 | // bytes32 conduitKey; // 0x120 109 | // uint256 totalOriginalConsiderationItems; // 0x140 110 | OrderParameters memory orderParams = OrderParameters( 111 | address(0x11f287ef1684373e2579Df129012C1cc02F214Fe), 112 | address(0), 113 | offerItems, 114 | considerations, 115 | OrderType.FULL_OPEN, 116 | block.timestamp, 117 | block.timestamp + 3 days, 118 | bytes32(0), 119 | uint256(blockhash(block.number - 1)), 120 | bytes32(0), 121 | 2 122 | ); 123 | 124 | OrderComponents memory components = getOrderComponents( 125 | orderParams, 126 | consideration.getCounter( 127 | address(0x11f287ef1684373e2579Df129012C1cc02F214Fe) 128 | ) 129 | ); 130 | 131 | bytes memory orderSig = signOrder( 132 | SEAPORT, 133 | uint256(0x12), 134 | consideration.getOrderHash(components) 135 | ); 136 | 137 | Order memory newOrder = Order(orderParams, orderSig); 138 | Order[] memory orders = new Order[](1); 139 | orders[0] = newOrder; 140 | vm.startBroadcast(); 141 | 142 | SEAPORT.validate(orders); 143 | vm.stopBroadcast(); 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /src/security/V3SecurityHook.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | pragma solidity =0.8.17; 14 | 15 | import {IV3PositionManager} from "core/interfaces/IV3PositionManager.sol"; 16 | import {ISecurityHook} from "core/interfaces/ISecurityHook.sol"; 17 | 18 | contract V3SecurityHook is ISecurityHook { 19 | address positionManager; 20 | 21 | constructor(address nftManager_) { 22 | positionManager = nftManager_; 23 | } 24 | 25 | function getState(address tokenContract, uint256 tokenId) 26 | external 27 | view 28 | returns (bytes32) 29 | { 30 | ( 31 | uint96 nonce, 32 | address operator, 33 | , 34 | , 35 | , 36 | , 37 | , 38 | uint128 liquidity, 39 | , 40 | , 41 | , 42 | 43 | ) = IV3PositionManager(positionManager).positions(tokenId); 44 | return keccak256(abi.encode(nonce, operator, liquidity)); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/strategies/CollectionValidator.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {ERC721} from "solmate/tokens/ERC721.sol"; 17 | 18 | import {IAstariaRouter} from "core/interfaces/IAstariaRouter.sol"; 19 | import {ILienToken} from "core/interfaces/ILienToken.sol"; 20 | import {IStrategyValidator} from "core/interfaces/IStrategyValidator.sol"; 21 | 22 | interface ICollectionValidator is IStrategyValidator { 23 | struct Details { 24 | uint8 version; 25 | address token; 26 | address borrower; 27 | ILienToken.Details lien; 28 | } 29 | } 30 | 31 | contract CollectionValidator is ICollectionValidator { 32 | uint8 public constant VERSION_TYPE = uint8(2); 33 | 34 | function getLeafDetails(bytes memory nlrDetails) 35 | public 36 | pure 37 | returns (ICollectionValidator.Details memory) 38 | { 39 | return abi.decode(nlrDetails, (ICollectionValidator.Details)); 40 | } 41 | 42 | function assembleLeaf(ICollectionValidator.Details memory details) 43 | public 44 | pure 45 | returns (bytes memory) 46 | { 47 | return abi.encode(details); 48 | } 49 | 50 | function validateAndParse( 51 | IAstariaRouter.NewLienRequest calldata params, 52 | address borrower, 53 | address collateralTokenContract, 54 | uint256 // collateralTokenId 55 | ) 56 | external 57 | pure 58 | override 59 | returns (bytes32 leaf, ILienToken.Details memory ld) 60 | { 61 | ICollectionValidator.Details memory cd = getLeafDetails(params.nlrDetails); 62 | 63 | if (cd.version != VERSION_TYPE) { 64 | revert("invalid type"); 65 | } 66 | if (cd.borrower != address(0)) { 67 | require( 68 | borrower == cd.borrower, 69 | "invalid borrower requesting commitment" 70 | ); 71 | } 72 | require(cd.token == collateralTokenContract, "invalid token contract"); 73 | 74 | leaf = keccak256(params.nlrDetails); 75 | ld = cd.lien; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/strategies/UniqueValidator.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: BUSL-1.1 2 | 3 | /** 4 | * █████╗ ███████╗████████╗ █████╗ ██████╗ ██╗ █████╗ 5 | * ██╔══██╗██╔════╝╚══██╔══╝██╔══██╗██╔══██╗██║██╔══██╗ 6 | * ███████║███████╗ ██║ ███████║██████╔╝██║███████║ 7 | * ██╔══██║╚════██║ ██║ ██╔══██║██╔══██╗██║██╔══██║ 8 | * ██║ ██║███████║ ██║ ██║ ██║██║ ██║██║██║ ██║ 9 | * ╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═╝ 10 | * 11 | * Astaria Labs, Inc 12 | */ 13 | 14 | pragma solidity =0.8.17; 15 | 16 | import {ERC721} from "solmate/tokens/ERC721.sol"; 17 | 18 | import {IAstariaRouter} from "core/interfaces/IAstariaRouter.sol"; 19 | import {ILienToken} from "core/interfaces/ILienToken.sol"; 20 | import {IStrategyValidator} from "core/interfaces/IStrategyValidator.sol"; 21 | 22 | interface IUniqueValidator is IStrategyValidator { 23 | struct Details { 24 | uint8 version; 25 | address token; 26 | uint256 tokenId; 27 | address borrower; 28 | ILienToken.Details lien; 29 | } 30 | } 31 | 32 | contract UniqueValidator is IUniqueValidator { 33 | uint8 public constant VERSION_TYPE = uint8(1); 34 | 35 | function getLeafDetails(bytes memory nlrDetails) 36 | public 37 | pure 38 | returns (Details memory) 39 | { 40 | return abi.decode(nlrDetails, (Details)); 41 | } 42 | 43 | function assembleLeaf(Details memory details) 44 | public 45 | pure 46 | returns (bytes memory) 47 | { 48 | return abi.encode(details); 49 | } 50 | 51 | function validateAndParse( 52 | IAstariaRouter.NewLienRequest memory params, 53 | address borrower, 54 | address collateralTokenContract, 55 | uint256 collateralTokenId 56 | ) 57 | external 58 | pure 59 | override 60 | returns (bytes32 leaf, ILienToken.Details memory ld) 61 | { 62 | Details memory cd = getLeafDetails(params.nlrDetails); 63 | if (cd.version != VERSION_TYPE) { 64 | revert("invalid type"); 65 | } 66 | 67 | if (cd.borrower != address(0)) { 68 | require( 69 | borrower == cd.borrower, 70 | "invalid borrower requesting commitment" 71 | ); 72 | } 73 | 74 | require(cd.token == collateralTokenContract, "invalid token contract"); 75 | 76 | require(cd.tokenId == collateralTokenId, "invalid token id"); 77 | leaf = keccak256(params.nlrDetails); 78 | ld = cd.lien; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/test/utils/Strings2.sol: -------------------------------------------------------------------------------- 1 | pragma solidity =0.8.17; 2 | 3 | library Strings2 { 4 | function toHexString(bytes memory input) public pure returns (string memory) { 5 | require(input.length < type(uint256).max / 2 - 1); 6 | bytes16 symbols = "0123456789abcdef"; 7 | bytes memory hex_buffer = new bytes(2 * input.length + 2); 8 | hex_buffer[0] = "0"; 9 | hex_buffer[1] = "x"; 10 | 11 | uint256 pos = 2; 12 | uint256 length = input.length; 13 | for (uint256 i = 0; i < length; ++i) { 14 | uint256 _byte = uint8(input[i]); 15 | hex_buffer[pos++] = symbols[_byte >> 4]; 16 | hex_buffer[pos++] = symbols[_byte & 0xf]; 17 | } 18 | return string(hex_buffer); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/utils/Math.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol) 3 | 4 | pragma solidity =0.8.17; 5 | 6 | /** 7 | * @dev Standard math utilities missing in the Solidity language. 8 | */ 9 | library Math { 10 | /** 11 | * @dev Returns the largest of two numbers. 12 | */ 13 | function max(uint256 a, uint256 b) internal pure returns (uint256) { 14 | return a >= b ? a : b; 15 | } 16 | 17 | /** 18 | * @dev Returns the smallest of two numbers. 19 | */ 20 | function min(uint256 a, uint256 b) internal pure returns (uint256) { 21 | return a < b ? a : b; 22 | } 23 | 24 | /** 25 | * @dev Returns the average of two numbers. The result is rounded towards 26 | * zero. 27 | */ 28 | function average(uint256 a, uint256 b) internal pure returns (uint256) { 29 | // (a + b) / 2 can overflow. 30 | return (a & b) + (a ^ b) / 2; 31 | } 32 | 33 | /** 34 | * @dev Returns the ceiling of the division of two numbers. 35 | * 36 | * This differs from standard division with `/` in that it rounds up instead 37 | * of rounding down. 38 | */ 39 | function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256 ret) { 40 | // (a + b - 1) / b can overflow on addition, so we distribute. 41 | assembly { 42 | if iszero(b) { 43 | revert(0, 0) 44 | } 45 | ret := add(div(a, b), gt(mod(a, b), 0x0)) 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/utils/MerkleProofLib.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity >=0.8.0; 3 | 4 | /// @notice Gas optimized merkle proof verification library. 5 | /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/MerkleProofLib.sol) 6 | /// @author Modified from Solady (https://github.com/Vectorized/solady/blob/main/src/utils/MerkleProofLib.sol) 7 | library MerkleProofLib { 8 | function verify( 9 | bytes32[] calldata proof, 10 | bytes32 root, 11 | bytes32 leaf 12 | ) internal pure returns (bool isValid) { 13 | assembly { 14 | if proof.length { 15 | // Left shifting by 5 is like multiplying by 32. 16 | let end := add(proof.offset, shl(5, proof.length)) 17 | 18 | // Initialize offset to the offset of the proof in calldata. 19 | let offset := proof.offset 20 | 21 | // Iterate over proof elements to compute root hash. 22 | // prettier-ignore 23 | for {} 1 {} { 24 | // Slot where the leaf should be put in scratch space. If 25 | // leaf > calldataload(offset): slot 32, otherwise: slot 0. 26 | let leafSlot := shl(5, gt(leaf, calldataload(offset))) 27 | 28 | // Store elements to hash contiguously in scratch space. 29 | // The xor puts calldataload(offset) in whichever slot leaf 30 | // is not occupying, so 0 if leafSlot is 32, and 32 otherwise. 31 | mstore(leafSlot, leaf) 32 | mstore(xor(leafSlot, 32), calldataload(offset)) 33 | 34 | // Reuse leaf to store the hash to reduce stack operations. 35 | leaf := keccak256(0, 64) // Hash both slots of scratch space. 36 | 37 | offset := add(offset, 32) // Shift 1 word per cycle. 38 | 39 | // prettier-ignore 40 | if iszero(lt(offset, end)) { break } 41 | } 42 | } 43 | 44 | isValid := eq(leaf, root) // The proof is valid if the roots match. 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/utils/Pausable.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) 3 | 4 | pragma solidity =0.8.17; 5 | 6 | interface IPausable { 7 | function paused() external view returns (bool); 8 | } 9 | 10 | /** 11 | * @dev Contract module which allows children to implement an emergency stop 12 | * mechanism that can be triggered by an authorized account. 13 | * 14 | * This module is used through inheritance. It will make available the 15 | * modifiers `whenNotPaused` and `whenPaused`, which can be applied to 16 | * the functions of your contract. Note that they will not be pausable by 17 | * simply including this module, only once the modifiers are put in place. 18 | */ 19 | abstract contract Pausable is IPausable { 20 | uint256 private constant PAUSE_SLOT = 21 | uint256(keccak256("xyz.astaria.AstariaRouter.Pausable.storage.location")) - 22 | 1; 23 | /** 24 | * @dev Emitted when the pause is triggered by `account`. 25 | */ 26 | event Paused(address account); 27 | 28 | /** 29 | * @dev Emitted when the pause is lifted by `account`. 30 | */ 31 | event Unpaused(address account); 32 | 33 | struct PauseStorage { 34 | bool _paused; 35 | } 36 | 37 | function _loadPauseSlot() internal pure returns (PauseStorage storage s) { 38 | uint256 slot = PAUSE_SLOT; 39 | 40 | assembly { 41 | s.slot := slot 42 | } 43 | } 44 | 45 | /** 46 | * @dev Returns true if the contract is paused, and false otherwise. 47 | */ 48 | function paused() public view virtual returns (bool) { 49 | return _loadPauseSlot()._paused; 50 | } 51 | 52 | /** 53 | * @dev Modifier to make a function callable only when the contract is not paused. 54 | * 55 | * Requirements: 56 | * 57 | * - The contract must not be paused. 58 | */ 59 | modifier whenNotPaused() { 60 | require(!paused(), "Pausable: paused"); 61 | _; 62 | } 63 | 64 | /** 65 | * @dev Modifier to make a function callable only when the contract is paused. 66 | * 67 | * Requirements: 68 | * 69 | * - The contract must be paused. 70 | */ 71 | modifier whenPaused() { 72 | require(paused(), "Pausable: not paused"); 73 | _; 74 | } 75 | 76 | /** 77 | * @dev Triggers stopped state. 78 | * 79 | * Requirements: 80 | * 81 | * - The contract must not be paused. 82 | */ 83 | function _pause() internal virtual whenNotPaused { 84 | _loadPauseSlot()._paused = true; 85 | emit Paused(msg.sender); 86 | } 87 | 88 | /** 89 | * @dev Returns to normal state. 90 | * 91 | * Requirements: 92 | * 93 | * - The contract must be paused. 94 | */ 95 | function _unpause() internal virtual whenPaused { 96 | _loadPauseSlot()._paused = false; 97 | emit Unpaused(msg.sender); 98 | } 99 | } 100 | --------------------------------------------------------------------------------