Giter VIP home page Giter VIP logo

compound-aragon-app's Introduction

Compound Aragon App

An Aragon app using the Aragon Agent enabling a DAO to interact with the Compound protocol.

The current functionality allows a single cERC20 compound token to be enabled within the app. This token can then be supplied/lent to with the corresponding ERC20 token from the DAO to accrue interest.

✅ Security review status: Audited

The Solidity code in this repo has been audited, see the report.

Deployment Instructions

Instructions for local deployment for development purposes.

Instructions for live net installation for end user usage.

compound-aragon-app's People

Contributors

eenae avatar willjgriff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

compound-aragon-app's Issues

Compound Protocol Local Deployment - ‘yarn run repl -s’: No such file or directory

Steps to recreate:

/usr/bin/env: ‘yarn run repl -s’: No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang lines

Suggest having a section clearly listing the pre-requisites (including version numbers), and links to where they each can be installed.

Deposit DAI: Test Case: SUCCESS

Testing: Deposit DAI - allows DAI to be deposited to the application’s address

Steps:

  1. Create DAO and install Compound App using the application's installation instructions commit cc44981

  2. Click on the "Compound" app from the App Selector menu

Screenshot from 2019-09-10 15-19-27

  1. Click "Transfer"

Screenshot from 2019-09-10 15-20-07

  1. Select DAI as the Token, and input the amount as 10:

Screenshot from 2019-09-10 15-20-34

  1. Click "Submit Deposit"

Screenshot from 2019-09-10 15-21-37

  1. Click "Create transaction"

Screenshot from 2019-09-10 15-22-17

  1. Click "Confirm" in MetaMask

Screenshot from 2019-09-10 15-22-17

  1. Click "Confirm" again in MetaMask and wait for the transactions to be confirmed.

Screenshot from 2019-09-10 15-25-30

  1. Click on the "Compound" app from the App Selector menu, and verify that 10 DAI has been deposited:

Screenshot from 2019-09-10 15-26-56

Supply DAI: Test Case: SUCCESS

Testing

Supply DAI - allows the application to supply DAI to be lent

Pre-Requisites

  • MetaMask, using an account with majority voting weight in the DAO you will create.

Steps

  1. Create DAO and install Compound App using the application's installation instructions commit cc44981

  2. Complete the Deposit DAI Test Case, to ensure that there is sufficient DAI to Supply to be lent.

Screenshot from 2019-09-10 15-26-56

  1. Click "Supply / Redeem" and enter the AMOUNT as 10

Screenshot from 2019-09-10 15-33-21

  1. Click "Supply Tokens"

Screenshot from 2019-09-10 15-34-13

  1. Click "Create transaction"

Screenshot from 2019-09-10 15-34-41

  1. Click "Confirm" in MetaMask and wait for the transaction to be confirmed

Screenshot from 2019-09-10 15-34-41

  1. Click on the "Voting" app in the App Selector menu

Screenshot from 2019-09-10 15-36-44

  1. Click "View vote"

Screenshot from 2019-09-10 15-43-21

  1. Click "Yes" (ensure you are connected with an account that has voting power in the DAO)

Screenshot from 2019-09-10 15-44-56

  1. Click "Create transaction"

Screenshot from 2019-09-10 15-45-27

  1. Click "Confirm" in MetaMask

Screenshot from 2019-09-10 15-45-56

  1. Wait for the transaction to be confirmed by the network

Screenshot from 2019-09-10 15-47-49

  1. Click on the "Compound" app in the App Selector, and validate that DAI has been supplied.

Screenshot from 2019-09-10 15-50-10

  1. You can also verify the transaction using Rinkeby Etherscan based on the Agent's address:

Screenshot from 2019-09-10 15-52-28

Blank token page: Initialize with cETH for dao install

When I run the following command to install the compound app with the cETH token, I get a blank token page:

dao install <organisation_address> compound.open.aragonpm.eth --app-init-args <agent_proxy_address> ["'0xd6801a1dffcd0a410336ef88def4320d6df1883e'"] --environment aragon:rinkeby

Blank_Token_Compound

Any idea what is happening? If I run with cDAI token address, it works fine.

Redeem DAI: Test Case: SUCCESS

Testing

Redeem DAI - allows the application to redeem DAI from being lent

Pre-Requisites

  • MetaMask, using an account with majority voting weight in the DAO you will create.

Steps

  1. Create DAO and install Compound App using the application's installation instructions commit cc44981

  2. Complete the Supply DAI Test Case, supplying sufficient DAI and waiting to earn sufficient interest to be able to withdraw 10 DAI.

Screenshot from 2019-09-10 16-00-02

  1. Click "Supply / Redeem"

Screenshot from 2019-09-10 16-00-24

  1. Select the "Redeem" tab, and input 10 as the AMOUNT

Screenshot from 2019-09-10 16-01-13

  1. Click "Redeem Tokens"

Screenshot from 2019-09-10 16-01-43

  1. Click "Create transaction"

Screenshot from 2019-09-10 16-02-09

  1. Click "Confirm" in MetaMask, and wait for the transaction to be confirmed by the network.

Screenshot from 2019-09-10 16-07-08

  1. Click on the "Voting" app in the App Selector menu:

Screenshot from 2019-09-10 16-11-01

  1. Select "View vote"

Screenshot from 2019-09-10 16-11-49

  1. Click "Yes"

Screenshot from 2019-09-10 16-29-26

  1. Click "Create transaction"

Screenshot from 2019-09-10 17-34-29

  1. Click "Confirm" in MetaMask and wait for the transaction to be confirmed

Screenshot from 2019-09-10 17-35-58

  1. Click on the "Compound" app in the App Selector menu, and see that the app's supplied balance has reduced by 10, and the app's agent balance has increased by 10:

Screenshot from 2019-09-10 17-37-05

  1. You can also validate this on Rinkeby Etherscan:

Screenshot from 2019-09-10 17-38-28

Deposit DAI: MetaMask reports "ALERT: Transaction Error. Exception thrown in contract code."

Testing: Deposit DAI - allows DAI to be deposited to the application’s address

When transferring token to the app, the user must publish 2 signed txns. The 2nd transaction is presented immediately after the 1st has been signed - but shows an "ALERT: Transaction Error".

I suspect this is probably because the 2nd transaction cannot yet be accepted, until the 1st has been mined, possibly due to the contract being called to does not have sufficient allowance yet.

Note: if you click Confirm, the transaction does succeed, but the UX is slightly scary.

Note: the 1st txn uses a suggested gas price of 10, and is mined quickly. The 2nd txn uses a different suggested gas price of 1, and is mined slowly.

Steps to recreate:

  1. Install Compound App using DAI
  2. Click "Transfer"
  3. Select DAI and enter 25 as the amount to Transfer to the app, click "Submit Deposit"
  4. Click "Create Transaction"
  5. In MetaMask, click "Confirm" to confirm the approve transaction
  6. System then shows the second MetaMask transaction for deposit, but with red error:

Screenshot from 2019-09-10 14-31-16

Not possible to redeem all DAI (without getting into some complex Math)

I would like to redeem my entire supply of DAI being supplied by the DAO to Compound.

This is what I do:

  1. Go to the Compound app in the etd DAO on rinkeby

  2. See that my supply balance is 10.000003 DAI

image

  1. Create and pass a vote to redeem 10.000003 DAI

  2. See that my supply balance is 0.000003 DAI

image

  1. Create and pass a vote to redeem 0.000003 DAI

  2. See that my supply balance is shown as 0 DAI

image

  1. See that in etherscan, my Agent app still has some cDAI (0.0000003) unredeemed:

image

What amount of DAI do I put into the app to redeem all of it?

Perhaps there can be some kind of ability to "redeem everything", or maybe to not round the "Supply Balance", meaning that you can always copy / paste the full amount if you desire.

Withdraw DAI: Test Case: SUCCESS

Testing: Withdraw DAI - allows DAI to be withdrawn from the application’s address

Steps:

  1. Create DAO and install Compound App using the application's installation instructions commit cc44981

  2. Complete the Deposit DAI test case to deposit at least 10 DAI

Screenshot from 2019-09-10 15-00-14

  1. Click "Transfer" in the "Compound" app:

Screenshot from 2019-09-10 15-00-57

  1. Select "Withdraw" tab, input the recipient ETH address, input 10 for the amount, and select DAI for the currency:

Screenshot from 2019-09-10 15-01-53

  1. Click "Submit Withdrawal"

Screenshot from 2019-09-10 15-04-50

  1. Click "Create Transaction" to create the vote for the withdrawal

Screenshot from 2019-09-10 15-06-19

  1. Click "Confirm" to confirm the transaction in MetaMask.

Screenshot from 2019-09-10 15-06-23

  1. Click on the "Voting" app from the App Selector menu

Screenshot from 2019-09-10 15-07-55

  1. Click "View Vote" for the vote that has just been created

Screenshot from 2019-09-10 15-08-41

  1. Click "Yes" (making sure you are using an account that has voting rights in the DAO)

Screenshot from 2019-09-10 15-14-23

  1. Click "Create Transaction"

Screenshot from 2019-09-10 15-14-38

  1. Click "Confirm" in MetaMask, and wait for the transaction to be confirmed by the network

Screenshot from 2019-09-10 15-16-11

  1. Click on the "Compound" app from the App Selector menu, and confirm that the funds have been Transferred out:

Screenshot from 2019-09-10 15-16-50

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.