Skip to content

Commit

Permalink
OETH - Full Changes (#1271)
Browse files Browse the repository at this point in the history
* Start of VaultTwo

* No vault Two

* Extract units conversion to method

* Exchange rate supporting Vault

* Remove unneeded memory array

* Change to using enums for exchange rate types

* Documentation on _toUnits

* OETH - Allow initialize time control of OUSD resolution (#1273)

* Allow initialize time control of OUSD resolution

* Remove debugging

* Correct mint / redeem with oracle

* add the main deploy file for OETH

* make it possible for the 5/8 multisig to be the governor of deployments

* prettier

* Gas efficiency

* add frax eth deployment

* basic sfraxETH strategy implementation

* add brownie env to git ignore

* prettier

* Remove unused code

* add the infrastructure for fork tests

* hardcode oracle price

* finish up the fraxETH strategy fork tests and fix a bug

* lint and some minor fixes

* deployment file fix

* Slither db update for false positives

* add a test that checks we can withdraw what the checkBalance returns

* minor fix

* Correct license for new contracts

* Deploy is ready

* Add redeem fee variable

* add slither exceptions

* fix tests (#1317)

* OETH - Oracle router changes (#1314)

* start oracle separation

* add slither ignores

* create a suggestion of how to check for prices in the Vault

* remove logs

* better name

* minor refactor

* minor refactor v2

* move unit pricing to a separate function

* refactor

* better comment

* refactor Vault contract and correct price calculation in priceUnit(Mint/Redeem) functions

* add range checks

* Prettier and address cleanup

* Small cleanup

* Add back in missing constant

---------

Co-authored-by: Daniel Von Fange <[email protected]>

* fix oracle tests

* fix tests

* more fixes

* fix slither

* ETH / sfrxeth zapper (#1316)

* Initial draft zapper

* Initial draft zapper

* Add deploy file for zapper

* Remove WETH partial support, out of scope in this PR

* Happy Slither

* WETH support

* move decimals cache to asset struct (#1319)

* WOETH deployment (#1320)

* add WOETH deployment

* deploy separate files

* Let’s just call them decimals

* add decimalsCache to existing Vault

* prettier

* deployment numbering

* fork test fix

* run decimals cache only in forked environment

* prettier

* Remove unused buyback trigger

* rETH support

* support oracles reporting feeds with different decimal format (#1321)

* support oracles reporting feeds with different decimal format

* lint

* gas optimisation

* Add support for stETH

* Use default strat for frxETH

* harvester & unit tests (#1331)

* Start of VaultTwo

* No vault Two

* Extract units conversion to method

* Exchange rate supporting Vault

* Remove unneeded memory array

* Change to using enums for exchange rate types

* Documentation on _toUnits

* OETH - Allow initialize time control of OUSD resolution (#1273)

* Allow initialize time control of OUSD resolution

* Remove debugging

* Correct mint / redeem with oracle

* add the main deploy file for OETH

* make it possible for the 5/8 multisig to be the governor of deployments

* prettier

* Gas efficiency

* add frax eth deployment

* basic sfraxETH strategy implementation

* add brownie env to git ignore

* prettier

* Remove unused code

* add the infrastructure for fork tests

* hardcode oracle price

* finish up the fraxETH strategy fork tests and fix a bug

* lint and some minor fixes

* deployment file fix

* Slither db update for false positives

* add a test that checks we can withdraw what the checkBalance returns

* minor fix

* Correct license for new contracts

* Deploy is ready

* Add redeem fee variable

* add slither exceptions

* fix tests (#1317)

* OETH - Oracle router changes (#1314)

* start oracle separation

* add slither ignores

* create a suggestion of how to check for prices in the Vault

* remove logs

* better name

* minor refactor

* minor refactor v2

* move unit pricing to a separate function

* refactor

* better comment

* refactor Vault contract and correct price calculation in priceUnit(Mint/Redeem) functions

* add range checks

* Prettier and address cleanup

* Small cleanup

* Add back in missing constant

---------

Co-authored-by: Daniel Von Fange <[email protected]>

* fix oracle tests

* fix tests

* more fixes

* fix slither

* ETH / sfrxeth zapper (#1316)

* Initial draft zapper

* Initial draft zapper

* Add deploy file for zapper

* Remove WETH partial support, out of scope in this PR

* Happy Slither

* WETH support

* move decimals cache to asset struct (#1319)

* WOETH deployment (#1320)

* add WOETH deployment

* deploy separate files

* Let’s just call them decimals

* add decimalsCache to existing Vault

* prettier

* deployment numbering

* fork test fix

* run decimals cache only in forked environment

* prettier

* Remove unused buyback trigger

* rETH support

* support oracles reporting feeds with different decimal format (#1321)

* support oracles reporting feeds with different decimal format

* lint

* gas optimisation

* harvester now considers different oracle decimals. Fixing unit tests

---------

Co-authored-by: Daniel Von Fange <[email protected]>

* add some addresses

* fix bug

* Deploy 53 OETH and 54 WOETH (#1334)

* deploy of OETH 053

* add remaining deployment files

* add guardian actions helper

* use updated ABI in brownie

---------

Co-authored-by: Daniel Von Fange <[email protected]>

* Prettier

* Merge cleanup

* Zapper cleanup

* remove console.log

* Zapper: Better event name

* Add slither excludes to triage file

* Remove inline slither comments and add docstrings

* cleaner wording

* Explicity access levels on vars

* Zapper redeploy

* Lint: cleanup extra variable

* Deploy 56 - OUSD Zapper Redeploy (#1364)

* Deploy 56 Zapper

* Remove forceDeploy

* Don't show zapper no return checks

* Move vault check to after redeem is complete.

* Happy Lint, happy Pretttier

* mainnet deploy 58 (#1435)

* set unit test rebasingCreditsPerToken to 1e27 and fix vault value checker tests

* apply changes on master branch

* fix unit test and prettier

---------

Co-authored-by: Domen Grabec <[email protected]>
  • Loading branch information
DanielVF and sparrowDom authored May 15, 2023
1 parent 34ab687 commit 205c647
Show file tree
Hide file tree
Showing 90 changed files with 39,972 additions and 11,607 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ website/network.json
/playground/public/build/

todo.txt
brownie/env-brownie/

crytic-export

Expand Down
108 changes: 108 additions & 0 deletions brownie/abi/OETHVaultValueChecker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
[
{
"inputs": [
{
"internalType": "address",
"name": "_vault",
"type": "address"
},
{
"internalType": "address",
"name": "_ousd",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "int256",
"name": "expectedProfit",
"type": "int256"
},
{
"internalType": "int256",
"name": "profitVariance",
"type": "int256"
},
{
"internalType": "int256",
"name": "expectedVaultChange",
"type": "int256"
},
{
"internalType": "int256",
"name": "vaultChangeVariance",
"type": "int256"
}
],
"name": "checkDelta",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "ousd",
"outputs": [
{
"internalType": "contract IOUSD",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "snapshots",
"outputs": [
{
"internalType": "uint256",
"name": "vaultValue",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "totalSupply",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "time",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "takeSnapshot",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "vault",
"outputs": [
{
"internalType": "contract IVault",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
}
]
149 changes: 149 additions & 0 deletions brownie/abi/oethzapper.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
[
{
"inputs": [
{
"internalType": "address",
"name": "_oeth",
"type": "address"
},
{
"internalType": "address",
"name": "_vault",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "minter",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "asset",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "Zap",
"type": "event"
},
{
"inputs": [],
"name": "deposit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minOETH",
"type": "uint256"
}
],
"name": "depositSFRXETH",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "frxeth",
"outputs": [
{
"internalType": "contract IERC20",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "oeth",
"outputs": [
{
"internalType": "contract IERC20",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "sfrxeth",
"outputs": [
{
"internalType": "contract ISfrxETH",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "vault",
"outputs": [
{
"internalType": "contract IVault",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "weth",
"outputs": [
{
"internalType": "contract IWETH9",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"stateMutability": "payable",
"type": "receive"
}
]
Loading

0 comments on commit 205c647

Please sign in to comment.