Skip to content

Commit

Permalink
Merge pull request #9 from pooltogether/fixes/c4-audit
Browse files Browse the repository at this point in the history
C4 audit mitigations
  • Loading branch information
PierrickGT authored Jul 15, 2021
2 parents bff8877 + ec57ada commit 12c1fb5
Show file tree
Hide file tree
Showing 22 changed files with 2,065 additions and 1,441 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
abis
artifacts
cache
deployments/localhost/
node_modules
types
deployments/localhost/

# Solidity Coverage
coverage
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
types
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all",
"tabWidth": 2
}
12 changes: 2 additions & 10 deletions Constant.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
export const ADAI_ADDRESS_KOVAN = '0xdCf0aF9e59C002FA3AA091a46196b37530FD48a8';
export const LENDING_POOL_ADDRESSES_PROVIDER_REGISTRY_ADDRESS_KOVAN =
'0x1E40B561EC587036f9789aF83236f057D1ed2A90';

export const USDC_VAULT_ADDRESS_MAINNET = '0x5f18C75AbDAe578b483E5F43f12a39cF75b973a9';
export const USDC_ADDRESS_MAINNET =
'0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48';

export const DAI_VAULT_ADDRESS_MAINNET = '0x19D3364A399d251E894aC732651be8B0E4e85001';
export const DAI_VAULT_ADDRESS_MAINNET = '0xdA816459F1AB5631232FE5e97a05BBBb94970c95'; // yvDAI vault on Yearn API version 0.4.3
export const DAI_ADDRESS_MAINNET = '0x6B175474E89094C44Da98b954EedeAC495271d0F';

export const BINANCE_ADDRESS = '0x564286362092D8e7936f0549571a803B203aAceD';
export const BINANCE7_ADDRESS = '0xBE0eB53F46cd790Cd13851d5EFf43D12404d33E8';
export const DAI_RICH_ADDRESS = '0xF977814e90dA44bFA03b6295A0616a897441aceC';
export const USDC_RICH_ADDRESS = '0x55FE002aefF02F77364de339a1292923A15844B8';

export const YEARN_GOV_ADDRESS = '0x0';
export const YEARN_GOV_ADDRESS = '0x0';
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@

<br />

# PoolTogether YearnV2 Yield Source 👻

[![Coverage Status](https://coveralls.io/repos/github/jmonteer/pooltogether-yearnv2-yield-source/badge.svg?branch=master)](https://coveralls.io/github/jmonteer/pooltogether-yearnv2-yield-source?branch=master) [![built-with openzeppelin](https://img.shields.io/badge/built%20with-OpenZeppelin-3677FF)](https://docs.openzeppelin.com/) [![Coveralls](https://github.com/jmonteer/pooltogether-yearnv2-yield-source/actions/workflows/main.yml/badge.svg)](https://github.com/jmonteer/pooltogether-yearnv2-yield-source/actions/workflows/main.yml)
# PoolTogether YearnV2 Yield Source

[![Coverage Status](https://coveralls.io/repos/github/pooltogether/pooltogether-yearnv2-yield-source/badge.svg?branch=master)](https://coveralls.io/github/pooltogether/pooltogether-yearnv2-yield-source?branch=master)
[![Coveralls](https://github.com/pooltogether/pooltogether-yearnv2-yield-source/actions/workflows/main.yml/badge.svg)](https://github.com/pooltogether/pooltogether-yearnv2-yield-source/actions/workflows/main.yml)
[![built-with openzeppelin](https://img.shields.io/badge/built%20with-OpenZeppelin-3677FF)](https://docs.openzeppelin.com/)

PoolTogether Yield Source that uses [Yearn](https://yearn.finance/) V2 to generate yield by depositing the deposit token in any Yearn Vault that accepts that token.

Expand Down Expand Up @@ -89,7 +90,7 @@ Start Mainnet fork in a terminal window with the command:
yarn start-fork
```

In another window, start the scripts to deploy and create a YearnV2 Yield Source Prize Pool, deposit USDC into it, send some profit to the Vault, award the prize and withdraw.
In another window, start the scripts to deploy and create a YearnV2 Yield Source Prize Pool, deposit USDC into it, send some profit to the Vault, award the prize and withdraw.

```
yarn deploy-fork && yarn run-fork
Expand Down
4 changes: 2 additions & 2 deletions contracts/external/yearn/IYVaultV2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ interface IYVaultV2 is IERC20 {

function withdraw(uint256 maxShares) external returns (uint256);

// function withdraw(uint256 maxShares, address recipient) external returns (uint256);
function withdraw(uint256 maxShares, address recipient) external returns (uint256);

function withdraw(uint256 maxShares, address recipient, uint256 maxLoss) external returns (uint256);

Expand Down Expand Up @@ -118,4 +118,4 @@ interface IYVaultV2 is IERC20 {
* is subject to guardian defined by the Vault.
*/
function guardian() external view returns (address);
}
}
35 changes: 0 additions & 35 deletions contracts/test/YearnV2YieldSourceProxyFactoryHarness.sol

This file was deleted.

Loading

0 comments on commit 12c1fb5

Please sign in to comment.