Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
210 commits
Select commit Hold shift + click to select a range
a86f21e
Initial commit
NouDaimon Jun 20, 2022
7cf5c24
feat(read.me): fill initial details
NouDaimon Jun 20, 2022
cb7d3a9
feat(core): core storage and data types
NouDaimon Jun 21, 2022
13ce79f
feat(internal): basic functions
NouDaimon Jun 21, 2022
34211b8
feat(interface): earn vault interface
NouDaimon Jun 21, 2022
8b32b25
feat(spotprice): add chainlink oracle
NouDaimon Jun 21, 2022
12db1b0
feat(order): add price feed to order
NouDaimon Jun 21, 2022
a68e4c1
feat(spotPrice): fetch spot price and add to check
NouDaimon Jun 21, 2022
3503893
feat(config): upgrade solidity compiler version
NouDaimon Jun 21, 2022
e339bc4
feat(transferproxy): tokentransferproxy contract and interface
NouDaimon Jun 21, 2022
e9707a5
feat(constructor): token transfer proxy in constructor of LimitOrder
NouDaimon Jun 21, 2022
d46a2c3
fix(name): change _spotPrice function name
NouDaimon Jun 21, 2022
07159f7
feat(bounds): lower/upper bounds on spot price
NouDaimon Jun 21, 2022
93536c6
feat(swap): arbitrary swapper contract to perform swaps
NouDaimon Jun 23, 2022
6a3d3e2
feat(vault): underlying token function in vault interface
NouDaimon Jun 23, 2022
f7c8bd0
feat(constructor): state variables required for limit order execution
NouDaimon Jun 23, 2022
1ecb309
feat(execute): fee calculations and completion of execute function
NouDaimon Jun 23, 2022
e4e7681
fix(comment): remove comments
NouDaimon Jun 27, 2022
aa450e1
feat(storage): add token => price feed mapping and set in constructor
NouDaimon Jun 27, 2022
656fcce
feat(fees): individual vault fees
NouDaimon Jun 27, 2022
4bba847
fix(style): reorder functions
NouDaimon Jun 27, 2022
5db8375
feat(cancelOrder): proper check for cancelling an order
NouDaimon Jun 27, 2022
56cf7c8
feat(natspec): natspec for functions and move variables to layout
NouDaimon Jun 28, 2022
c665ae6
feat(setters): setTreasury and setProof functions
NouDaimon Jun 28, 2022
168ccbe
feat(solversion): bump up solidity version
NouDaimon Jun 28, 2022
656fbcb
feat(facet): settings facet
NouDaimon Jun 28, 2022
0c4346c
feat(view): internal view functions
NouDaimon Jun 28, 2022
edb5073
feat(refactor): refactor using internal view functions
NouDaimon Jun 28, 2022
6015263
feat(view): view facet and interface
NouDaimon Jun 28, 2022
a118651
feat(facet): limit order actions facet
NouDaimon Jun 28, 2022
383020b
add env example
dhruvinparikh Jun 29, 2022
43f4026
feat(startTime): replace startTime with id
NouDaimon Jun 29, 2022
00a882b
feat(startTime): replace startTime with id
NouDaimon Jun 29, 2022
c843e46
feat(comment): ArbitrarySwapper warning comment
NouDaimon Jun 29, 2022
3df8239
Merge pull request #6 from Opty-Fi/deps
NouDaimon Jun 29, 2022
3fc70d9
Merge branch 'core' of https://github.com/Opty-Fi/stop-loss into core
NouDaimon Jun 29, 2022
2846686
add simple buy logic
dhruvinparikh Jun 30, 2022
0ab4e1b
fix(imports): add solidstate instead of OZ imports
NouDaimon Jun 30, 2022
f4a51d0
feat(style): prefix functions and function arguments, add natspec
NouDaimon Jun 30, 2022
3678057
feat(update): update solidstate version
NouDaimon Jun 30, 2022
e954aa6
feat(solidity): bump solidity version
NouDaimon Jun 30, 2022
247f0ff
feat(swap): facet and diamond for swap, restructuring and refactoring…
NouDaimon Jul 1, 2022
660c885
feat(swap): function visbility
NouDaimon Jul 1, 2022
3327b35
feat(swap): swap interface
NouDaimon Jul 1, 2022
87159ab
feat(limitOrder): swap via swapDiamond
NouDaimon Jul 1, 2022
71c4117
feat(limitOrder): add empty diamond
NouDaimon Jul 1, 2022
3c9a00f
feat(limitOrder): replace chainlink => optyfi oracle
NouDaimon Jul 1, 2022
8566949
feat(limitOrder): internal contract made abstract, diamond implemented
NouDaimon Jul 1, 2022
7c439b4
fix(package): remove chainlink contracts
NouDaimon Jul 1, 2022
952de05
Merge pull request #7 from Opty-Fi/swap
NouDaimon Jul 5, 2022
3486174
Merge branch 'core' into facets
NouDaimon Jul 5, 2022
ad5bf5e
fix(files): move files into correct directory
NouDaimon Jul 5, 2022
8b05a83
fix(functions): add wrongly deleted functionality
NouDaimon Jul 5, 2022
50000ad
fix(functions): remove no longer existing function
NouDaimon Jul 5, 2022
1718142
feat(facets): convert facets to abstract, fix wrongful execute functi…
NouDaimon Jul 5, 2022
0abeca9
Merge pull request #8 from Opty-Fi/facets
NouDaimon Jul 5, 2022
9b8f42e
fix(typo): typo in LimitOrderActions contract
NouDaimon Jul 6, 2022
f5998f8
feat(facets): make facets non-abstract for deployment
NouDaimon Jul 6, 2022
4f159b2
feat(interfaces): general interfaces to capture all diamond functiona…
NouDaimon Jul 6, 2022
c8fb9dd
fix(ethers): import nomicalabs ethers
NouDaimon Jul 6, 2022
4ec377c
feat(view): add view functions
NouDaimon Jul 7, 2022
0bd06bf
feat(settings): settings functions
NouDaimon Jul 7, 2022
0f0581e
feat(config): add ethers and hardhat forking
NouDaimon Jul 7, 2022
d9851cf
feat(test): testing core and LimitOrderSettings test
NouDaimon Jul 7, 2022
533667c
feat(actions): code branch in case deposits forbidden on opUSDC
NouDaimon Jul 7, 2022
0b23884
feat(oracle): add OptyFiOracle contracts for LimitOrder testing
NouDaimon Jul 7, 2022
f20ed1f
feat(DataTypes): remove Side for limit order (unrequired)
NouDaimon Jul 8, 2022
fab69e9
feat(order): remove Id and fetch order from storage
NouDaimon Jul 8, 2022
b0c5d78
feat(actions): modifyOrder function
NouDaimon Jul 8, 2022
e719b63
feat(deposit): functionality for user to receive USDC or deposit to o…
NouDaimon Jul 8, 2022
471c7a6
feat(events): added ILimitOrderInternal to ILimitOrder
NouDaimon Jul 10, 2022
a7aaf70
fix(internal): remove unnecessary check in _cancelOrder
NouDaimon Jul 10, 2022
20da2c3
feat(facets): facet constructors for immutable addresses for multi-ch…
NouDaimon Jul 12, 2022
ef51c7d
feat(tests): tests for LimitOrderActions facet | WIP
NouDaimon Jul 12, 2022
4312f10
add correct operator
dhruvinparikh Jul 12, 2022
73e6f02
feat(merkle): add merklejs and keccack256 packages
NouDaimon Jul 14, 2022
02e9592
feat(config): add dependency compiler and uniswap contracts
NouDaimon Jul 14, 2022
1cdbb81
feat(execute): execute tests with utils, WIP
NouDaimon Jul 14, 2022
6b009e1
correct exchangeData and token transfer proxy
dhruvinparikh Jul 14, 2022
4219e7f
fix(test): clean up console logs
NouDaimon Jul 15, 2022
12e62ba
feat(tests): execute order test with non-zero vault fee
NouDaimon Jul 18, 2022
6594204
fix(treasury): make treasury a later signer to prevent test errors
NouDaimon Jul 18, 2022
1e77367
fix(cleanup): remove console logs from contracts
NouDaimon Jul 18, 2022
f6f6a3e
feat(execute): _execute function tests
NouDaimon Jul 18, 2022
85b2918
fix(cleanup): remove unused variables, mark swap as payable
NouDaimon Jul 19, 2022
42dcab6
feat(cleanup): rename spotPrice => price, add _timestamp() getter
NouDaimon Jul 19, 2022
684445f
feat(titles): add title and author tags to contracts
NouDaimon Jul 19, 2022
7bb04c9
feat(merkle-proofs): separate code/accounts merkle proofs
NouDaimon Jul 19, 2022
a6ebe8b
feat(view): view functions for merkle proofs
NouDaimon Jul 19, 2022
5747cfd
feat(settings): setters for accound + code proof
NouDaimon Jul 19, 2022
ea1cde3
feat(test): account/code proof setters test
NouDaimon Jul 19, 2022
87cce07
fix(test): fix broken tests after acocunt/code proof setters
NouDaimon Jul 19, 2022
ab625f9
feat(proofs): mapping for proofs
NouDaimon Jul 19, 2022
388cee2
feat(settings): setters changed to adapt to mappings of proofs
NouDaimon Jul 19, 2022
fb1625a
feat(view): getters changed to adapt to mappings of proofs
NouDaimon Jul 19, 2022
2daf54c
fix(tests): changed tests to match proof mapping
NouDaimon Jul 19, 2022
499e44d
fix(naming): endtime => expiration
NouDaimon Jul 19, 2022
5871921
feat(errors): add error library
NouDaimon Jul 19, 2022
5208f22
feat(actions): fix all tests failing because of error library, add re…
NouDaimon Jul 19, 2022
663054f
_liquidate and _exchange functions | segment _execute
NouDaimon Jul 20, 2022
cb297b7
_collectFee function | segment _execute
NouDaimon Jul 20, 2022
518f159
_deliver function | segment _execute
NouDaimon Jul 20, 2022
db5842c
feat(natspec): add natspec to segmentation functions and rename varia…
NouDaimon Jul 20, 2022
ef34d1b
feat(update): update OptyFiOracle and tests
NouDaimon Jul 20, 2022
1b71565
fix(unused): remove unused parameter in swapper data types
NouDaimon Jul 20, 2022
dc17849
feat(swapData): construct crucial part of swapData in LO contracts
NouDaimon Jul 20, 2022
3791042
fix(tests): LO Action tests from swapData => swapParams change
NouDaimon Jul 20, 2022
34d6c69
fix(lookup): remove one memory lookup
NouDaimon Jul 21, 2022
8455b75
feat(swapper): tests for core swapper functionality
NouDaimon Jul 21, 2022
462ef32
feat(swap): optimize for loop, add custom errors | _swap function
NouDaimon Jul 21, 2022
1ae7766
feat(swap): custom errors | _canSwap
NouDaimon Jul 21, 2022
042acf7
feat(swap): errors natspec
NouDaimon Jul 21, 2022
b924968
feat(utils): custom errors | TTFP, ERC20Utils
NouDaimon Jul 21, 2022
81ab147
feat(swap): revert tests for swap function
NouDaimon Jul 21, 2022
12cdefc
feat(tenderly): set up tenderly and hardhat deploy
NouDaimon Jul 21, 2022
78d7509
feat(deploy): deploy scripts for oracle, limit order, swapper
NouDaimon Jul 22, 2022
489c132
feat(actions): limit order settings actions | WI P=> needs test
NouDaimon Jul 22, 2022
f3e8383
feat(tasks): minor improvements to deploy scripts and tasks
NouDaimon Jul 26, 2022
d358475
feat(rename): setVaultLiquidationFee => setVaultFee
NouDaimon Jul 26, 2022
6b611cd
feat(task): edit input parameter of set-proof tasks
NouDaimon Jul 26, 2022
1983bff
fix(feedback): typos, missing scripts, improvement on comments
NouDaimon Jul 28, 2022
873126a
fix(arbitraryswapper): remove arbitrary swapper and interface
NouDaimon Jul 28, 2022
000bcb0
feat(attack): malicious swap data attack revert test
NouDaimon Jul 28, 2022
664b514
feat(test): insufficient return revert test
NouDaimon Jul 28, 2022
4e8122c
fix(test): remove only
NouDaimon Jul 28, 2022
2a844eb
feat(ignore): ignore localhost deployments
NouDaimon Jul 28, 2022
8a617cc
feat(__CRITICAL__): fix critical vulnerability => calculate toAmount …
NouDaimon Aug 1, 2022
12be9fd
fix(swapParams): remove toAmount
NouDaimon Aug 1, 2022
2122773
fix(omitted): remove toAmount
NouDaimon Aug 1, 2022
7737ecd
feat(settings): set return limit function
NouDaimon Aug 1, 2022
7bc4369
feat(test): return limit BP revert test
NouDaimon Aug 1, 2022
6a218fe
feat(oracle): optyfi oracle update
NouDaimon Aug 1, 2022
537ccf6
M
NouDaimon Aug 3, 2022
27a6beb
config after submodule
NouDaimon Aug 3, 2022
3503903
feat(internal): events and using new vault function in liquidate
NouDaimon Aug 3, 2022
96852b9
feat(returnLimit): set return limit in createOrder and remove setter
NouDaimon Aug 3, 2022
d8c7d44
fix(env): env fixes WIP
NouDaimon Aug 3, 2022
b3ac2b5
remove optyfi-oracle
dhruvinparikh Aug 3, 2022
0f70281
fix typechain issue
dhruvinparikh Aug 3, 2022
7ee8f56
feat(constructors): remove returnLimitBP from diamond
NouDaimon Aug 4, 2022
814d74a
refactor(tests): refactor tests for new withdraw/deposit vault functions
NouDaimon Aug 5, 2022
c47c71c
feat(tests): add event tests and agnostic caller test
NouDaimon Aug 5, 2022
ec8dcc1
submodule(swapper): added submodule for swapper
NouDaimon Aug 8, 2022
8254086
remove failed submodules
NouDaimon Aug 8, 2022
bfb18a1
removed submodules
NouDaimon Aug 8, 2022
fbdd31f
submodules(fix): fix oracle, add swapper, fix import paths, remove sw…
NouDaimon Aug 8, 2022
9f69118
ignore(prettier): add directories of submodules
NouDaimon Aug 8, 2022
c7e6ae0
Update contracts/limitorder/LimitOrderSettings.sol
NouDaimon Aug 10, 2022
bc3c24e
Update contracts/limitorder/ILimitOrderActions.sol
NouDaimon Aug 10, 2022
11fa21c
Update contracts/limitorder/ILimitOrderSettings.sol
NouDaimon Aug 10, 2022
fc5556d
feat(bounds): change bounding of limit order contracts
NouDaimon Aug 18, 2022
982aa09
Merge branch 'vault-upgrade' of https://github.com/Opty-Fi/stop-loss …
NouDaimon Aug 18, 2022
8f70d76
tests(bounds): add bound tests and change types
NouDaimon Aug 18, 2022
abd198d
feat(bounds): add bound check on create order
NouDaimon Aug 18, 2022
52362ec
feat(tests): add cound create order check
NouDaimon Aug 18, 2022
6a84b3a
init gelator integration
dhruvinparikh Aug 29, 2022
3ff1260
wip canExecuteOrder
dhruvinparikh Aug 30, 2022
df68149
finish canExecuteOrder
dhruvinparikh Aug 30, 2022
6166f4d
add cancel limit order
dhruvinparikh Aug 30, 2022
2c05acf
feat(deliver): remove option for delivering USDC to user directly
NouDaimon Aug 31, 2022
11d24e4
feat(tests): fix tests after depositUSDC removal
NouDaimon Aug 31, 2022
5c7a96b
feat(internal): calculate liquidation amount upon order creation
NouDaimon Aug 31, 2022
9afec31
feat(tests): fix tests for liquidation calculated upon order creation
NouDaimon Aug 31, 2022
51f5f55
Merge branch 'vault-upgrade' into gelato-ops
dhruvinparikh Sep 1, 2022
2e983d5
refactor tests
dhruvinparikh Sep 1, 2022
223a446
test cancelTask
dhruvinparikh Sep 2, 2022
c2a327b
checkpoint: proper encode
dhruvinparikh Sep 5, 2022
1edae22
ops executes order
dhruvinparikh Sep 6, 2022
fcf07fe
canExecute - reuse code
dhruvinparikh Sep 7, 2022
a46c6db
cancel task if non-ops execute
dhruvinparikh Sep 7, 2022
507d02e
fix payload test
dhruvinparikh Sep 8, 2022
5a36992
feat(core): update internal functionality to handle multi-stable coin…
NouDaimon Sep 8, 2022
2fd2c6e
feat(auxilliary): update facets for permissioned/view functions
NouDaimon Sep 8, 2022
488fa05
feat(tests): update tests to match multi-coin support
NouDaimon Sep 8, 2022
b90cba2
fix(modifyOrder): fix placeholder error for checks
NouDaimon Sep 8, 2022
2f64841
Merge branch 'vault-upgrade' into gelato-ops
dhruvinparikh Sep 9, 2022
513e7a1
fix(tests): fix tests post merge
NouDaimon Sep 9, 2022
34c5860
feat(deliver): remove option to receive USDC in case of vault deposit…
NouDaimon Sep 9, 2022
3a8cd66
fix(tests): refactor tests for USDC option removal
NouDaimon Sep 9, 2022
ed95ac6
integrate and test univ3 swap
dhruvinparikh Sep 10, 2022
54e740f
Merge branch 'gelato-ops' into feat/univ3
dhruvinparikh Sep 10, 2022
a1d1712
feat(tests): view facet tests | WIP
NouDaimon Sep 14, 2022
fc5726f
feat(canExecute): add dex params to order struct, make canExecute han…
NouDaimon Sep 15, 2022
15d1ed1
feat(storage): remove unrequired functions, edit create/modify order …
NouDaimon Sep 15, 2022
5972aa3
feat(tests): update tests to include univ2/v3 inclusion in order
NouDaimon Sep 15, 2022
5c0b686
disconnect diamond and swapper
dhruvinparikh Oct 8, 2022
09adf18
chore(config): avoid conflicts
dhruvinparikh Oct 8, 2022
d5b03c5
Merge branch 'master' into stop-loss
dhruvinparikh Oct 8, 2022
65f1459
ci(lint): apply prettier and lint
dhruvinparikh Oct 8, 2022
760cc7f
limitOrder - use returnLimit only instead
dhruvinparikh Oct 10, 2022
a630f41
chore(prettier): fixes
dhruvinparikh Oct 10, 2022
3cb74a2
refactor(typechain): fix dep version
dhruvinparikh Oct 11, 2022
8af24db
refactor(limit-order): fix incorrect case error
dhruvinparikh Oct 11, 2022
2382eae
feat(limit order): add minimum expected amt
dhruvinparikh Oct 11, 2022
2de573b
chore(limit order): deploy and protection
dhruvinparikh Oct 11, 2022
aea6991
feat(stoploss): add permit params support
dhruvinparikh Oct 12, 2022
0ae8c64
test(limitorder): fee
dhruvinparikh Oct 13, 2022
8e6fef4
test(limit order): negatove tests
dhruvinparikh Oct 13, 2022
ae5b00e
test(limitorder): test modifyordert
dhruvinparikh Oct 13, 2022
ef64b9e
feat(limitorder): execute deadline
dhruvinparikh Oct 14, 2022
ab3d0bf
feat(limitorder): add meaningful events
dhruvinparikh Oct 15, 2022
0a5403f
test(limitorder): assert events
dhruvinparikh Oct 15, 2022
90f99b2
test(limitorder): refactor settings trst
dhruvinparikh Oct 15, 2022
d979127
test(limitorder): view test and lint fix
dhruvinparikh Oct 16, 2022
da42a58
ci(limitorder): add limitorder test to ci
dhruvinparikh Oct 16, 2022
b961bd1
test(strategy): fix cvx test
dhruvinparikh Oct 17, 2022
2b64d41
fix(yfi): fix yfi strategy test
dhruvinparikh Oct 17, 2022
80d6522
ci(test:limit-order:mainnet): fix test:limit-order:mainnet
dhruvinparikh Oct 17, 2022
a08e6e7
ci(package.json): fix path
dhruvinparikh Oct 17, 2022
0185706
feat(task): eip712 permit signer
dhruvinparikh Oct 17, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ specification_docs/
deployments/
contracts/protocol/earn-protocol-configuration
contracts/protocol/adapters
contracts/optyfi-oracle
# files
.solcover.js
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
yarn test-fast:vault-strategy:mainnet
yarn test-fast:vault-strategy:polygon
yarn test-fast:vault-strategy:avalanche
yarn test:limit-order:mainnet
- name: Send GitHub Action trigger data to Slack workflow
id: slack
uses: slackapi/slack-github-action@v1.18.0
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ jobs:
yarn test-fast:vault-strategy:mainnet
yarn test-fast:vault-strategy:polygon
yarn test-fast:vault-strategy:avalanche
yarn test:limit-order:mainnet
- name: Send GitHub Action trigger data to Slack workflow
id: slack
uses: slackapi/slack-github-action@v1.18.0
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@
[submodule "contracts/protocol/earn-protocol-configuration"]
path = contracts/protocol/earn-protocol-configuration
url = git@github.com:Opty-Fi/earn-protocol-configuration.git
[submodule "contracts/optyfi-oracle"]
path = contracts/optyfi-oracle
url = git@github.com:Opty-Fi/optyfi-oracle.git
branch = fix/inverse-price-bug
Empty file modified .husky/commit-msg
100755 → 100644
Empty file.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
**/specification_docs
contracts/protocol/earn-protocol-configuration
contracts/protocol/adapters
contracts/optyfi-oracle

# files
*.env
Expand Down
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"plugins": ["prettier"],
"rules": {
"code-complexity": ["error", 11],
"compiler-version": ["error", "^0.6.12"],
"compiler-version": ["error", ">=0.6.12"],
"const-name-snakecase": "off",
"constructor-syntax": "error",
"func-visibility": ["error", { "ignoreConstructors": true }],
Expand Down
3 changes: 2 additions & 1 deletion .solhintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ contracts/utils/
contracts/dependencies/
contracts/mocks/
contracts/protocol/earn-protocol-configuration
contracts/protocol/adapters
contracts/protocol/adapters
contracts/optyfi-oracle
Binary file added .yarn/install-state.gz
Binary file not shown.
344 changes: 264 additions & 80 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Large diffs are not rendered by default.

Empty file modified .yarn/releases/yarn-3.0.0.cjs
100755 → 100644
Empty file.
786 changes: 786 additions & 0 deletions .yarn/releases/yarn-3.2.1.cjs

Large diffs are not rendered by default.

218 changes: 0 additions & 218 deletions contracts/dependencies/compound/ExponentialNoError.sol

This file was deleted.

Loading