Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Commit

Permalink
Dutch Auctions Via Seaport - Gas Golfing, Tests Galore, and many bugs…
Browse files Browse the repository at this point in the history
… squashed (#112)

* seaport wip

* removed AH

* latest flow to account for insights from seaport team

* fix for testCancelAuction to be correct

* seaport wip

* royalty engine added, with mock

* add updates to loan proof gen, and seaport test dpeloyer

* remove comments, disable mock for tests, needs to be fuzzed

* remove dead code

* more cleanup, mocks dynamic, use tokenID 99 for royalties enabled

* cleanup, removing dead code, and gas golfing

* golfing

* natspec update

* more natspec cleanup

* mend

more natspec cleanup

* mend

more natspec cleanup

* mend

more natspec cleanup

* add liquidation fees calculator

* updates for warping, cleanup in general

* implemented collateraltoken errors

* Fix install instructions and add markdown filetree (#116)

* Fix install instructions and add markdown filetree

* Cleaned up filetree

* cleanup

* tests passing using a combo of match and fufillment

* tests passing - v3 changes

* move match flow down so the buffer is closer to the actual bid

* fix static values for the test

* implement testNewLienExceeds2XEpoch() (#105)

* implement testNewLienExceeds2XEpoch()

* lien duration check

* commitToLien now caps duration at 2 weeks

* privatevault commitolienfix

* add length cap on refinance

* moved timeToSecondEpochEnd into method

* minor changes

* implement _timeToSecondEndIfPublic

* remove isValidVault check in onlyVaults function

Co-authored-by: = <santiagogregoryl@gmail.com>

* replaced transferfrom with safertransferfrom (#111)

* replaced transferfrom with safertransferfrom

* update ierc721

Co-authored-by: Joseph Delong <joseph@delong.me>

* implement testFinalAuctionEnd() (#115)

* Refinance update (#110)

* lien duration check

* updates requested

Co-authored-by: Joseph Delong <joseph@delong.me>

* add sdk pointer for v3 fixes

* Golfed CeilDiv🏌

* Hole 9 on LienToken

* Finished up LienToken

* Fixed syntax

* clearing house is now a beacon

* split opensea fees apart from seaport file

* remove jsons for deploying and use compiled considerations

* rather than looping the array copy it to memory then update the position with the new lien

* removed log

* Golfed ceilDiv and LienToken (#117)

* Fix install instructions and add markdown filetree (#116)

* Fix install instructions and add markdown filetree

* Cleaned up filetree

* implement testNewLienExceeds2XEpoch() (#105)

* implement testNewLienExceeds2XEpoch()

* lien duration check

* commitToLien now caps duration at 2 weeks

* privatevault commitolienfix

* add length cap on refinance

* moved timeToSecondEpochEnd into method

* minor changes

* implement _timeToSecondEndIfPublic

* remove isValidVault check in onlyVaults function

Co-authored-by: = <santiagogregoryl@gmail.com>

* replaced transferfrom with safertransferfrom (#111)

* replaced transferfrom with safertransferfrom

* update ierc721

Co-authored-by: Joseph Delong <joseph@delong.me>

* implement testFinalAuctionEnd() (#115)

* Refinance update (#110)

* lien duration check

* updates requested

Co-authored-by: Joseph Delong <joseph@delong.me>

* Golfed CeilDiv🏌

* Hole 9 on LienToken

* Finished up LienToken

* Fixed syntax

Co-authored-by: Joseph Delong <joseph@delong.me>
Co-authored-by: = <santiagogregoryl@gmail.com>
Co-authored-by: Andrew Redden <=>

* remove reserve from the code, its unused, add validate stack guard on getMaxPotentialDebt

* fixes and tests for adding liens against invalid stacks

* fix invalid rename

* getter to get opensea fee fees and payee data

* fix typo

* updates for uni v3 liquidiator to check the underlying token amounts if mins are set

* cleanup and poitner update

* liquidationInitialAsk Issue #99 (#121)

* Added reverts for invalid liquidationInitialAsks

* Added testing for liquidationInitialAsk revert cases

* fixes and tests for adding liens against invalid stacks

* fix invalid rename

* getter to get opensea fee fees and payee data

* fix typo

* Fixed expectReverts for liquidationInitialAsk cases

Co-authored-by: Andrew Redden <=>

* Feat/exceeds initial ask (#120)

* initial incorrect implementation

* maybe broken liquidationinitialask test

* fix maxpotentialdebt and added invalid hash enum

* fix liquidationinitialask

* implemented expectreverts in reverttesting

* update testhelpers

Co-authored-by: Andrew Redden <=>
Co-authored-by: Andrew Redden <opensource@andrewredden.com>

* implement testLiquidationPaymentsOverbid and testLiquidationNftTransfer (#122)

* cleanup dead code

* cleanup

* remove unused check

* remove validator asset

* cleanup and more fixes

* remove unused interface

* remove comments

* remove dead test

* update readme

* removed comments from test helper

* more nits

Co-authored-by: Andrew Redden <=>
Co-authored-by: = <santiagogregoryl@gmail.com>
Co-authored-by: Joseph Delong <joseph@delong.me>
Co-authored-by: GregTheDev <40359730+0xgregthedev@users.noreply.github.com>
Co-authored-by: GregTheDev <mapler98@gmail.com>
  • Loading branch information
5 people committed Nov 22, 2022
1 parent e5de841 commit 7e95746
Show file tree
Hide file tree
Showing 43 changed files with 2,780 additions and 1,042 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ out

lcov.info

scripts/loanProofGenerator.js

.idea
.idea

scripts/loanProofGenerator.js
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@
[submodule "lib/astaria-sdk"]
path = lib/astaria-sdk
url = git@github.com:AstariaXYZ/astaria-sdk.git
[submodule "lib/seaport"]
path = lib/seaport
url = https://github.com/projectopensea/seaport
33 changes: 0 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
# Astaria contest details

- 50,000 USDC main award pot
- Join [Sherlock Discord](https://discord.gg/MABEWyASkp)
- Submit findings using the issue page in your private contest repo (label issues as med or high)
- [Read for more details](https://docs.sherlock.xyz/audits/watsons)
- Starts October 20, 2022 15:00 UTC
- Ends November 03, 2022 15:00 UTC

# Resources

TBD

# Audit scope


[astaria-gpl](https://github.com/AstariaXYZ/astaria-gpl)

[astaria-core](https://github.com/sherlock-audit/2022-10-astaria)

All contracts in these repos are in scope unless specified below

Not in scope

```
libraries/Base64.sol
libraries/CollateralLookup.sol
scripts/deployments/strategies/*
utils
test
```

# Astaria Docs
```ml
src
Expand Down
3 changes: 2 additions & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ remappings = [
'solmate/=lib/solmate/src/',
'gpl/=lib/gpl/src/',
'clones-with-immutable-args/=lib/clones-with-immutable-args/src/',
"core/=./src/"
'core/=./src/',
'seaport/=lib/seaport/contracts',
]
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
2 changes: 1 addition & 1 deletion lib/astaria-sdk
2 changes: 1 addition & 1 deletion lib/gpl
Submodule gpl updated from ce7d52 to afdd1d
1 change: 1 addition & 0 deletions lib/seaport
Submodule seaport added at dfce06
4 changes: 1 addition & 3 deletions remappings.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
auction-house/=lib/auction-house/src/
auction/=lib/auction-house/src/
clones-with-immutable-args/=lib/clones-with-immutable-args/src/
contracts/=lib/seaport/contracts/
forge-std/=lib/forge-std/src/
eip4626/=lib/foundry_eip-4626/src/
gpl/=lib/gpl/src/
solmate/=lib/solmate/src/
seaport/=lib/seaport/contracts/
core/=./src/

3 changes: 3 additions & 0 deletions scripts/loanProofGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ if (detailsType === 0) {
"uint256",
"uint256",
"uint256",
"uint256",
];
} else if (detailsType === 1) {
mapping = [
Expand All @@ -25,6 +26,7 @@ if (detailsType === 0) {
"uint256",
"uint256",
"uint256",
"uint256",
];
} else if (detailsType === 2) {
mapping = [
Expand All @@ -43,6 +45,7 @@ if (detailsType === 0) {
"uint256",
"uint256",
"uint256",
"uint256",
];
}
// Create tree
Expand Down
4 changes: 2 additions & 2 deletions scripts/typechain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# This script is used to generate typechain types for the contracts in the myArray+=(item)

# define array and add all contracts from out.sol that are in typechainabi
# define array and add all contracts from optimized-out.sol that are in typechainabi

accepted_file_names=("AuctionHouse.sol" "CollateralToken.sol" "LienToken.sol" "MultiRolesAuthority.sol" "PublicVault.sol" "Vault.sol" "WithdrawProxy.sol" "AstariaRouter.sol" "VaultImplementation.sol")
accepted_file_names=(CollateralToken.sol" "LienToken.sol" "MultiRolesAuthority.sol" "PublicVault.sol" "Vault.sol" "WithdrawProxy.sol" "AstariaRouter.sol" "VaultImplementation.sol")
forge build
# loop through the array and generate types for each contract
Expand Down
Loading

0 comments on commit 7e95746

Please sign in to comment.