Giter VIP home page Giter VIP logo

proposals's People

Contributors

ethedev avatar nateawelch avatar rossgalloway avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

proposals's Issues

Getting a ("ZERO_BALANCE") error during testing of Proposal33.sol

redeemer.redeem(address(this), 100000 * (10 ** 18));

  ├╴call 0x185a4dc360CE69bDCceE33b3784B0282f7961aea::redeem(Proposaltest@0xb4c79daB8f259C7Aee6E5b2Aa729821864227e84, 100000000000000000000000) (contracts/2022/10/Proposal33.t.sol:188)
  │  ├╴call 0x0AaCfbeC6a24756c20D41914F2caba817C0d8521::transferFrom(Proposaltest@0xb4c79daB8f259C7Aee6E5b2Aa729821864227e84, @0x185a4dc360CE69bDCceE33b3784B0282f7961aea, 100000000000000000000000) <no source map>
  │  │  ├╴delegatecall 0x27C5736b49B89d4765d03734a0a51c461F09672d::transferFrom(Proposaltest@0xb4c79daB8f259C7Aee6E5b2Aa729821864227e84, @0x185a4dc360CE69bDCceE33b3784B0282f7961aea, 100000000000000000000000) <no source map>
  │  │  │  ├╴Transfer(100000000000000000000000) <no source map>
  │  │  │  └╴← (true)
  │  │  └╴← (true)
  │  ├╴call 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2::balanceOf(@0x185a4dc360CE69bDCceE33b3784B0282f7961aea) <no source map>
  │  │  └╴← (0)
  │  └╴error Revert ("ZERO_BALANCE") <no source map>
  └╴error Revert ("ZERO_BALANCE") (contracts/2022/10/Proposal33.t.sol:188)

Add tests for v0.8.10

Description

All the contracts in the utils folder are using the version v0.8.10, with the recent edits taking place to adapt what we had from the older version, we need to add testing to the contracts used in this folder.

Requirements

  • Adding tests for all the contracts inside utils
  • Documenting each test case (adding comments above the code lines)

Proposal 20 - Mistake in VDM's Previous Pay

yearlyUSDToMonthlyUSD(42000 * (10**6), 1)

As I reviewed the last proposal, I discovered that we underpaid VDM for the month of September. The snapshot proposal that was approved here: https://snapshot.org/#/yam.eth/proposal/QmTH6QZnNxrRGhMxyEbwiE7VFPCTz1TYGnDHRJghnvgMR9 was for future months. In that proposal, VDM was approved for move to half time with half pay for the month of October. In the last on chain proposal that Nate wrote, we paid VDM 42000/12 or $3500, when he should have been paid $7000 (84000/2) because that proposal was to pay for work done in the previous month.

yearlyUSDToMonthlyUSD(42000 * (10**6))

In order to fix this now, we should pay VDM the 3500 USDC that we owe him for september, and then also the 3500 USDC we owe him for his part time work in October. We are then not paying him stables for November on, but keeping his stream open until we ratify his new compensation plan.

Update version to v0.8.10

Description

The onchain proposals are using an old solidity version, v0.5.15. Moving forward we need to upgrade it and use v0.8.10 instead.

Requirements

  • Upgrading the upcoming proposals contracts to use v0.8.10
  • Adding tests to make sure everything is working properly

How do we know this picks USDC?

interface IYCRVVault {
function remove_liquidity_one_coin(
uint256 _token_amount,
int128 i,
uint256 min_uamount,
bool donate_dust
) external;

IYCRVVault(yCRVVault).remove_liquidity_one_coin(

I may just have missed it, but I don't see anything in this function and it's definition that says what token gets paid out. Maybe not an issue but I figured I would ask.

Is the variable name spelled right in line 26 (uamount)?

Add Hardhat

Description

We need to add hardhat to support proposal contract development.

Requirements

  • Integrating Hardhat onto this repo
  • Adding hardhat contract test support for v0.8.10
  • Documenting the steps of how to use hardhat

Acceptance Criteria

  • Everything in the requirements section should be achieved, and working as expected.

Bounty

When applying for this bounty, provide an anticipated date for completion of the work in your work plan! And please be descriptive, add documentation where its most likely needed in the code, and add any additional comments to your PR!

Add Foundry

Description

We need to add foundry to support proposal contract development.

Requirements

  • Integrating Foundry onto this repo
  • Adding foundry contract test support for v0.8.10
  • Documenting the steps of how to use foundry

Proposal 20 - Nate's Pay

yearlyUSDToMonthlyUSD(26256 * (10**6), 1)

@ethedev have you had further conversations with Nate about this? Per the discussion where nate first announced that he would be stepping away he mentioned that we wanted to stop his stablecoin payments immediately. That was in early october, so would mean that if we follow that we wouldn't pay him in this proposal (covering october and november).

At the bottom of the proposal, (line 165) nates stream is closed. Are we fully parting ways or just stopping until things get re-negotiated?

Please confirm logic

Can you confirm the logic here:

This code moves all our USDC into this contract

IERC20(address(USDC)).transferFrom(
RESERVES,
address(this),
IERC20(address(USDC)).balanceOf(RESERVES)

This code moves all our yUSDC2 (the old version) into this contract

IERC20(address(yUSDCV2)).transferFrom(
RESERVES,
address(this),
IERC20(address(yUSDCV2)).balanceOf(RESERVES)
);

This code withdraws the yUSDC2 (old version) to USDC.

yUSDCV2.withdraw(type(uint256).max);

This line then sends 100,000 USDC back to the treasury.

USDC.transfer(RESERVES, 100000 * (10**6));

The contract then pays people

This code then deposits all the remaining USDC into yvUSDC (the new version) and sends it back to the treasury.

uint256 usdcBalance = USDC.balanceOf(address(this));
USDC.approve(address(yUSDC), usdcBalance);
yUSDC.deposit(usdcBalance, RESERVES);

This is how I understand the contract working. Please confirm if that is correct.

Either way, I have a few comments:

  1. Why not also pull in the yUSD, unwrap to USDC and move that to the new yvUSDC vault? Or just unwrap it to USDC and use that as part of the buffer to pay contributors.
  2. Variable naming for this is confusing. yUSDCv2 is the old version and yUSDC is the new version?
  3. Would love to see more comments to explain what we are doing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.