-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test_borrow_apy #91
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iamchrissmith
approved these changes
Nov 22, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
gbalabasquer
approved these changes
Nov 23, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Ignore the Certora specs failing, I already reported to them, and it is also happening on v2
.
iamchrissmith
added a commit
that referenced
this pull request
Dec 2, 2022
* Modularize (#31) * initial separate into d3m target and d3m join contracts * initial update of tests and file reorg/rename * add approval for the join to allow the target to move gems and update the target withdraw to pull the adai first * update interfaces and require successful transferFrom" * update tests and fix reward claimer * allow filing a new target * minor clean up * remove unneeded interface * update interface and add validTarget helper * add missing arg * initial Test Target contract * update test forge path to accept new match arguments * add new line * update Target to not need wat parameter * add test gem for Join testing * allow for bar = 0 case in tests * add give allowance to test token and transfers to target * update Join to fix target cage bug * we don't need internal balance tracking for the test target * add a test rewards contract * add join specific tests for covering the interactions with the Vat * make targets joins and have them hold balance Co-authored-by: Julien <[email protected]> * update testing and d3m Join so that the Target holds the balances in ERC and Vat * rename Join to Hub * rename Target to Join * make Hub compatible with multiple d3m joins: * add balance check to join * update test for hub+joins model * update helper for Hub approach * update copyrights * update tests and require d3m be live for admin actions * use ilks instead * organize files and change Join->Pool * switch to pool internally on hub * update test to use Pool naming * initial update for separation of Plans from Pools * minor test updates * initial breakdown of pool into base * add Plan base * clean up * Update to Eip 4626 (#34) * initial update of tests and file reorg/rename * update tests and fix reward claimer * organize files and change Join->Pool * switch to pool internally on hub * initial update for separation of Plans from Pools * update language for EIP-4626 * fix tests after rename * maxWithdraw and asset balances - PR comments from @hexonaut * fix share transfer amounts * fix tests * remove helper function * remove helper function tests * fix unwind balance * fix asset balance in test pool * move bar to plan * use plan base * Fix tests * Modularize upd 325 (#37) * Clean up vars and add Cage event * Upd revert names * Upd revert names in Pool Base * emit Hope and Nope events on Pool Base * Add Quit event * Add emit for clarity * Add Exit event * uint => uint256 * rm math * wards ocd * start updating aave to use base * shorten names * remove chainlog from d3m hub * remove dai daiJoin from hub * make common interfaces to use in tests * remove ds-value submodule * update aave tests for no ds-value * add todos * do daiJoin work in hub @gbalabasquer * PR comments to clean up hub * clean up add TODO * join directly to vow * PR feedback @talbaneth and @gbalabasquer * Apply suggestions from code review Co-authored-by: talbaneth <[email protected]> * remove collect and move plan to Hub from pool * abstract bar to individual plan implementations * read and assign end on when necessary * don't read the plan * adjust unwind daiJoin interaction to match wind * fix aave tests - WIP * Apply suggestions from code review Co-authored-by: talbaneth <[email protected]> * PR clean up comments * add recover tokens function to pool * remove convertToAssets from base * PR comments: remove bar and pool from bases and gas efficiency * change aave assetBalance calc * fix mom bar filing * update test for Aave share balance transfer in exit * revert convert to shares in exit since we should already be dealing with shares in wad * fix permissionless repay aave test * fix remaining aave test * reorganize interfaces into tests * move constant * remove unused interface functions * remove maxBar from base * remove events * Apply suggestions from code review Co-authored-by: talbaneth <[email protected]> * fix silly variable setting Co-authored-by: talbaneth <[email protected]> * move plans to separate folder * PR comments - update auths * move share to pools out of base * initial switch to returning target assets * WIP change to return targetAsset * accrued if needed before getting balance * integrate @hexonaut 's Aave calc fix * Delete empty file * plan base unit tests * add pool base tests * re-order accrueIfNeeded and maxWithdraw Co-authored-by: talbaneth <[email protected]> * remove unneeded math Co-authored-by: talbaneth <[email protected]> * consistent filing for ilks * better documentations of Ilk in Hub Co-authored-by: talbaneth <[email protected]> * remove unneeded safe math * don't store culled * unused return variable Co-authored-by: talbaneth <[email protected]> * update getTargetAssets * pr feedback * update share balance for aave to be scaled * Mom can disable plans * make files external * initial AaveDai plan tests * more AaveDaiPlan unit tests * add disable to plan base * fix missing override * check dai balance in wind * denominate shares in hub in dai/gems and add transferAllShares function * add approxEq for checking dai depositing * AaveDaiPool tests * move deposit check to pool * clean up remaining hub tests * add Mom tests * update base and share calculations * update aaave deposit checking * remove named return Co-authored-by: talbaneth <[email protected]> * remove debugging * update comments and errors * fix rounding error * fix possible bug with debt > debt ceiling * pr comments and clean up * add file events * pr comments on events and requires * add missing auth and test coverage * consolidate debt usage to totalDebt instead of adding it multiple times * update unwind comment Co-authored-by: talbaneth <[email protected]> * fix adai pool comment Co-authored-by: talbaneth <[email protected]> * update comment * remove hub cage * take global line into account and unwind if needed * Apply suggestions from code review Co-authored-by: talbaneth <[email protected]> * fix indentation * add fees to unwind event * Some changes to exec (bit simplication and check vat.Line) (#40) * Some changes to exec (bit simplication and check vat.Line) * Add comments * Update src/DssDirectDepositHub.sol Co-authored-by: talbaneth <[email protected]> * Update src/DssDirectDepositHub.sol Co-authored-by: talbaneth <[email protected]> * Add tests Co-authored-by: talbaneth <[email protected]> * Add invalid target check to exec() normal path * add cull rebalancing * remove hub rely from pool * remove duplicate rely * remove live/cage from pool * ShareTokenLike -> ATokenLike * don't call internal transfer * type pool and adai * remove hub from pool base * remove params from collect * change plan base to interface * update errors and contract name for plan interface change * convert Pool Base to Interface * add maxDeposit to pools * account for maxDeposit in Hub.exec by either unwinding or limiting wind * remove extra space * revert hub interface integration * maxDeposit is per deposit call * remove validTarget add condition to disable for aave * add smaller maxDeposit test * update plan interface * update Pool Interface * remove extra cast * change from seth check to cast check for forge test * code clean up Co-authored-by: talbaneth <[email protected]> * pr comments clean up * inline amount for collect * catch up Test pool * update maxBar to be used where it should and be internal * add active() to plans * add active to Pools * add check in hub that pool and plan are active or unwind * allow filing interestStrategy Co-authored-by: Julien <[email protected]> Co-authored-by: Brian McMichael <[email protected]> Co-authored-by: talbaneth <[email protected]> Co-authored-by: Gonzalo Balabasquer <[email protected]> * add space * update spacing, visibility and location of RAY * add Natspec comments to base Pool, Plan and Hub contracts (#43) * add docs for Hub * add comments to plan interface * fix ilk cage docs * add pool docs * comment clean up * fix grammar Co-authored-by: talbaneth <[email protected]> * spelling Co-authored-by: talbaneth <[email protected]> * unify wrapping point and punctuation * clarify plan doc * pr comments * contract -> interface * update comments Co-authored-by: talbaneth <[email protected]> Co-authored-by: talbaneth <[email protected]> * Extract test_sets_dai_value from base tests. This is since `asset` is not part of the interface for plan/pool. For example in Compound I just call it `dai` (and not asset). * Remove redundant rely * grammar Co-authored-by: Kurt Barry <[email protected]> * fix if condition for block number (#48) * remove space * fix end address Co-authored-by: Nazzareno Massari <[email protected]> * update end in aave tests Co-authored-by: Nazzareno Massari <[email protected]> * improve skaave failure test * update pragma to be more flexible * add hope/nope to the pool to be able to update the hub * use interfaces in Hub * add nope to hub * add comments for hub.nope() * fix storage ordering and move auth functions * add tests for pool quit and unwind/wind upgrade paths * add test for plan swap * add hub upgrade tests * reorder events * remove unneeded cage event * add getter functions for d3m ilks * add ink/art to cull event * add wad to uncull event * add bar == 0 sets not active * add exec fail test for non-existant ilk * add pre and post hooks for exec and reap * Forge ci (#49) * try forge ci * add ETH_RPC_URL and rpc flags * remove check gas * remove nix * combine workflow commands * remove pull_request trigger * fix blocks * update step names Co-authored-by: Nazzareno Massari <[email protected]> Co-authored-by: Nazzareno Massari <[email protected]> * fix ordering of internal functions in hub * remove unneeded calculateTargetSupply public function * move aave integration test out of pool folder * fix comment typo Co-authored-by: Kurt Barry <[email protected]> * fix integration test relative paths * fix file function consistency * remove unneeded param from unwind * add rate == 1 require to exec * fix spacing * check active on pool/plan in reap * fix cull comment * store tic as timestamp + tau * remove tau cage test fail * fix requires in reap * add bool return to deposit and withdraw * add withdraw require to reap * remove unneeded approval for pool to aave pool for adai * change from recoverTokens to recoverDai for Pools * prevent dup caging of pool * use wad in pool functions * pin solc in ci * add test showing left over ink after cage if debt repaid * Solc upgrade (#47) * initial 0.8.13 upgrade changes * clear warnings * remove safe math from Hub * remove safe math from Test Gem * remove safe math from Dai Pool * remove safe math from dai plan * update ci nix * update dappPkg * update dapp tests for 0.8.13 * add quotes Co-authored-by: Nazzareno Massari <[email protected]> * update nix dapp version * change to 0.6.12 or greater * clean up Co-authored-by: talbaneth <[email protected]> Co-authored-by: Gonzalo Balabasquer <[email protected]> * lock pragma to ^0.8.14 * add unchecked to hub * add unchecked to Aave Plan * remove math functions * fix solc version in scripts Co-authored-by: Gonzalo Balabasquer <[email protected]> * update int overflow check * fix merge problems * fix makefile Co-authored-by: Nazzareno Massari <[email protected]> * add safe math comment back * pin solc in ci to 0.8.14 * fix order of operations Co-authored-by: Nazzareno Massari <[email protected]> * fix fake address Co-authored-by: Nazzareno Massari <[email protected]> * revert fake address change Co-authored-by: Nazzareno Massari <[email protected]> Co-authored-by: talbaneth <[email protected]> Co-authored-by: Gonzalo Balabasquer <[email protected]> * add test for wind/unwind token with less than 18 decimals * move unwind int overflow check to min from require * move int overflow for wind to min checks * refactor toWind to one assignment * make unwind params easier to read * add reentrancy protection in hub * add test that cull fails with no ilk * update mom events * rename intrestStrategy to tack * remove require in file and limit target rate to max bar * set rate to max of base or target rate * unwind if bar is out of bounds * remove make deploy * don't check adai address in constructor * emit gift for king * fix spacing Co-authored-by: talbaneth <[email protected]> * fix spacing Co-authored-by: talbaneth <[email protected]> * reorder pool plan variables * DssDirectDepositHub => D3MHub and D3MAaveDai => D3MAave (#61) * `MAXINT256` (#57) Co-authored-by: Gonzalo Balabasquer <[email protected]> * Fix error message * replace tack filing what * add higher level unchecked for aave plan math * add what param for pre/post debt changes * reorder hub immutables * add comments with links to aave contracts * get rewards claimer from adai * remove recoverDai function * add loss test by @hexonaut * remove hub.nope() * Add FileCopyRightText (#62) * Remove quit (#64) * remove unused var Co-authored-by: talbaneth <[email protected]> * update comment for transfer * add redeemable function for pools * clean up aave plan active * update comments in hub for multiple d3ms Co-authored-by: Julien <[email protected]> * RAY == 1 Co-authored-by: Gonzalo Balabasquer <[email protected]> * add require to prevent winding over MAXINT256 * replace divup with best practice version * remove return on deposit/withdraw * add mode protection * rename getter functions and clear shadow warnings (#65) * rename getter functions and clear shadow warnings * switch _ location * keep vow and end consistent with _ before in functions * fix overflow wind check * remove returns from transfers * remove Pool.active and clean up (#63) * add wild() to pools and plans and allow permissionless caging * add hub tests for wild caging and fix auth * make wild pure * add paused check on pools and plans to prevent any exec action * add ability to pause pool and ensure exec doesn't change * add ability to pause plan and ensure exec doesn't change * add ability to unpause pool and resume exec * add ability to unpause plan and resume exec * add pause to Mom * remove active from pools * remove pause and wild * clean up variables * remove unneeded events * remove spacing * align &s * Update README (#67) * update readme to v2 and add more detail * Update README.md Co-authored-by: Chris Smith <[email protected]> * Update README.md Co-authored-by: Chris Smith <[email protected]> * Update README.md Co-authored-by: Chris Smith <[email protected]> * Update README.md Co-authored-by: Chris Smith <[email protected]> * update image * add holds lp token Co-authored-by: Chris Smith <[email protected]> * fix imgur link to ipfs Co-authored-by: Nazzareno Massari <[email protected]> * fix spacing in aave plan * No governance after cage (#60) * Remove governance access from pool after shutdown * New modifier onlyHub * Remove spacing * Add more tests * Move some tests from AavePool to Base one * Update src/tests/stubs/D3MTestPool.sol Co-authored-by: Chris Smith <[email protected]> * Update src/pools/D3MAavePool.sol Co-authored-by: talbaneth <[email protected]> * Update src/pools/D3MAavePool.sol Co-authored-by: talbaneth <[email protected]> * No need vat.live check on deny * Fix interface message * Remove unnecessary local variable * transferAll => quit * Move more tests to base Co-authored-by: Chris Smith <[email protected]> Co-authored-by: talbaneth <[email protected]> * Add D3MOracle (#59) * Add D3MOracle * peek and read with same behaviour + better tests * Update src/D3MOracle.sol Co-authored-by: talbaneth <[email protected]> * Update src/D3MOracle.sol Co-authored-by: talbaneth <[email protected]> * Update src/D3MOracle.sol Co-authored-by: talbaneth <[email protected]> * Fix message * Add comment * Minor change Co-authored-by: talbaneth <[email protected]> * Assert revert (#72) * Implement AssertRevert * Use assertRevert in all the other test files * Add newline * No more special function * dapp uninstall ds-test * dapp install makerdao/dss-test * Use dss-test dependency * Move test files * rename asset to dai in aave pool * clean up items * enforce spot == RAY * add clarity comment for bar = 0 Co-authored-by: talbaneth <[email protected]> * Fix what filing * uint256 standard Co-authored-by: Gonzalo Balabasquer <[email protected]> * change enum name * do not pass vat to hub * minor clean up items in hub * dapp upgrade dss-test * Introduce _fix function and add tests (#70) * add initial debt repay tests * add test where we wind first * Introduce new function fix * Working on tests * Finish test * Fix reap test * Fix remaining tests and do some clean up in others * clean up hub tests * add test for fix during shutdown * show end fail case where we get bad gems * No fix after shutdown * add test for module cage with debt paid back and fix * More checks and fix some others * fix as internal function * Remove require * Update src/tests/interfaces/interfaces.sol Co-authored-by: talbaneth <[email protected]> * Update src/tests/D3MHub.t.sol Co-authored-by: talbaneth <[email protected]> * Add more checks * Improve test * Remove rebalance in cull as it isn't actually the most correct thing * fix comment * add to gitignore * Remove file * Replace min to require for MAXINT256 check * Fixes Co-authored-by: Gonzalo Balabasquer <[email protected]> Co-authored-by: talbaneth <[email protected]> * Fix FileCopyRightText + Cleanups (#75) * Align pool and plan code style to Compound * more alignemnts * Minor alignment changes and return comment * Move && a bit * return back from interface alignment * Update src/pools/D3MAavePool.sol Co-authored-by: Nazzareno Massari <[email protected]> * Compound (#51) * initial separate into d3m target and d3m join contracts * initial update of tests and file reorg/rename * add approval for the join to allow the target to move gems and update the target withdraw to pull the adai first * update interfaces and require successful transferFrom" * update tests and fix reward claimer * allow filing a new target * minor clean up * remove unneeded interface * update interface and add validTarget helper * add missing arg * initial Test Target contract * update test forge path to accept new match arguments * add new line * update Target to not need wat parameter * add test gem for Join testing * allow for bar = 0 case in tests * add give allowance to test token and transfers to target * update Join to fix target cage bug * we don't need internal balance tracking for the test target * add a test rewards contract * add join specific tests for covering the interactions with the Vat * make targets joins and have them hold balance Co-authored-by: Julien <[email protected]> * update testing and d3m Join so that the Target holds the balances in ERC and Vat * rename Join to Hub * rename Target to Join * make Hub compatible with multiple d3m joins: * add balance check to join * update test for hub+joins model * update helper for Hub approach * update copyrights * update tests and require d3m be live for admin actions * use ilks instead * organize files and change Join->Pool * switch to pool internally on hub * update test to use Pool naming * initial update for separation of Plans from Pools * minor test updates * initial breakdown of pool into base * add Plan base * clean up * Update to Eip 4626 (#34) * initial update of tests and file reorg/rename * update tests and fix reward claimer * organize files and change Join->Pool * switch to pool internally on hub * initial update for separation of Plans from Pools * update language for EIP-4626 * fix tests after rename * maxWithdraw and asset balances - PR comments from @hexonaut * fix share transfer amounts * fix tests * remove helper function * remove helper function tests * fix unwind balance * fix asset balance in test pool * move bar to plan * use plan base * Fix tests * Modularize upd 325 (#37) * Clean up vars and add Cage event * Upd revert names * Upd revert names in Pool Base * emit Hope and Nope events on Pool Base * Add Quit event * Add emit for clarity * Add Exit event * uint => uint256 * rm math * wards ocd * start updating aave to use base * shorten names * remove chainlog from d3m hub * remove dai daiJoin from hub * make common interfaces to use in tests * remove ds-value submodule * update aave tests for no ds-value * add todos * do daiJoin work in hub @gbalabasquer * PR comments to clean up hub * clean up add TODO * join directly to vow * PR feedback @talbaneth and @gbalabasquer * Apply suggestions from code review Co-authored-by: talbaneth <[email protected]> * remove collect and move plan to Hub from pool * abstract bar to individual plan implementations * read and assign end on when necessary * don't read the plan * adjust unwind daiJoin interaction to match wind * fix aave tests - WIP * Apply suggestions from code review Co-authored-by: talbaneth <[email protected]> * PR clean up comments * add recover tokens function to pool * remove convertToAssets from base * PR comments: remove bar and pool from bases and gas efficiency * change aave assetBalance calc * fix mom bar filing * update test for Aave share balance transfer in exit * revert convert to shares in exit since we should already be dealing with shares in wad * fix permissionless repay aave test * fix remaining aave test * reorganize interfaces into tests * move constant * remove unused interface functions * remove maxBar from base * remove events * Apply suggestions from code review Co-authored-by: talbaneth <[email protected]> * fix silly variable setting Co-authored-by: talbaneth <[email protected]> * move plans to separate folder * PR comments - update auths * move share to pools out of base * initial switch to returning target assets * WIP change to return targetAsset * accrued if needed before getting balance * integrate @hexonaut 's Aave calc fix * Delete empty file * plan base unit tests * add pool base tests * re-order accrueIfNeeded and maxWithdraw Co-authored-by: talbaneth <[email protected]> * remove unneeded math Co-authored-by: talbaneth <[email protected]> * consistent filing for ilks * better documentations of Ilk in Hub Co-authored-by: talbaneth <[email protected]> * remove unneeded safe math * don't store culled * unused return variable Co-authored-by: talbaneth <[email protected]> * update getTargetAssets * pr feedback * update share balance for aave to be scaled * Mom can disable plans * make files external * initial AaveDai plan tests * more AaveDaiPlan unit tests * add disable to plan base * fix missing override * check dai balance in wind * denominate shares in hub in dai/gems and add transferAllShares function * add approxEq for checking dai depositing * AaveDaiPool tests * move deposit check to pool * clean up remaining hub tests * add Mom tests * update base and share calculations * update aaave deposit checking * remove named return Co-authored-by: talbaneth <[email protected]> * remove debugging * update comments and errors * fix rounding error * fix possible bug with debt > debt ceiling * pr comments and clean up * add file events * pr comments on events and requires * add missing auth and test coverage * consolidate debt usage to totalDebt instead of adding it multiple times * update unwind comment Co-authored-by: talbaneth <[email protected]> * fix adai pool comment Co-authored-by: talbaneth <[email protected]> * update comment * D3MCompoundDaiPlan - initial implementation, untested * Neat * Add initial version of D3MCompoundDaiPool, missing logic and tests * More ppol work, actually add D3MCompoundDaiPool.sol * Test supply for current rate * D3MCompoundDaiPlan testing * Add test for calculating supplies * Align to latest modularize branch * Add accrueIfNeeded to compound pool * D3MCompoundDai.t.sol - WIP * Align to latest modularize changes * Remove auth modifier from compound's collect() * Support also 0 jump multiplier * Neat * Unify return values * Neat - fix indentation * Add plan test from hub * During test cleanup * Align to modularize latest changes * Support explicit disable() from mom * Make disable overriding on Compound Plan * Align to transferShares changes in hub * Align to modularize - validaion in deposit * Add underlying() validation also in plan ctr * Remove unused function in pool and add overrride * Align to modularize pool changes * Add Compound plan events * Add Compound pool auth and events * Align to compound-cd-audit fixes, commit fa793a3 This is the commit with the response to CS audit for Plan. The base plan and compound plan code are now identical to there. * Align to v2, wip * Align to v2, tests pass * Port test from cs-audit-fixes * Fix merge mistake with filing rate model * Finish porting all new plan tests * Add D3MCompoundDaiPool.t.sol * Align Compound plan test to run base plan tests * Cleare comparisons in D3MCompoundDai.t.sol * Simplify to use just _setRelBorrowTarget in D3MCompoundDai.t.sol * Align to use Like suffix for interfaces * Linter run - break require, remove test comment * Add clarification for Compound APY * Slightly improve plan comment + small neats * Add comp amount comparison to test * Refactors based on AAVE comments -Move administration parts to the top so wards will be in first slot. -Move internal functions to after external related ones. * Add amt to Compund's Collect() event * Fix merge of D3MAaveDaiPool.t.sol * Use compSupplySpeeds in comp claiming tests * Align line break style to rest of the file * Use internal constant, Add TODOs * add 2021 Nov Aave D3M Audit (#52) * fix end address Co-authored-by: Nazzareno Massari <[email protected]> * update end in aave tests Co-authored-by: Nazzareno Massari <[email protected]> * Update End address in D3MCompoundDai.t.sol * Fix typo * Tighten underlying dai comparisons, check deposit cdai * Add nope to compound pool, support hope/nope base tests * align to use >= in solidity pragma * Group storage together for Compound pool and plan * Flip expected and ectual in assertEqAbsolute * Align to V2 branch * Align layout of events/ctr/auth/math/admin to aave * Revert if getAccountSnapshot returns an error * Add TODOs * Add Compound links and explanation for using exchangeRateStored * Algin to V2 changes * Renamings and avoiding unused warning on hooks * Add SPDX-FileCopyrightText to Compound files * Align to V2 * deactivate if cdai implementation changes * Add boundary for barb * Make comp immutable, get dai from cdai * Support collect without claim. Since COMP can be claimed to the pool directly through Compound by a 3rd party make sure it can be recovered later even if comptroller would revert for some reason. * Improve interface links * align to v2 - wip * Finish aliging to asserRevert change * Align to V2 * Add Compound to README * Update to permanent links * Fix failures due to rounding * Validate delegate is not address(0) * Use address instead of token in cDai etherscan link Co-authored-by: Nazzareno Massari <[email protected]> * Move tau to general place in the Readme * Move _calculateTargetSupply up * Add comment about normal rate * Use _hub in pool ctr * Reorder cdai assignment and Avoid casting in plan * Support utilization > 100% * Comment why multiplierPerBlock != 0 and can de divided by * dapp upgrade dss-test (reverting un-intentional downgrade) * _assertEqApprox => assertEq Co-authored-by: Gonzalo Balabasquer <[email protected]> * Remove safe math in tests * Fix copyrights Co-authored-by: Nazzareno Massari <[email protected]> * Handle several review comments in tests * Fix copyrights also in Compound tests * Substract before addition * Neat - better spacings Co-authored-by: Chris Smith <[email protected]> Co-authored-by: Julien <[email protected]> Co-authored-by: Brian McMichael <[email protected]> Co-authored-by: Nazzareno Massari <[email protected]> Co-authored-by: Gonzalo Balabasquer <[email protected]> * Handle minor suggestions (#78) * Destroy Compound interface alignments to match aave * Use storage vars in ctr * Fix aave random failures (#77) * Fix aave random failures * Tighten error in test_unwind_culled_then_mcd_cage * Add reentrancy warning commnets for getTargetAssets (#80) * Add reentrancy warning commnets for getTargetAssets * false => zero * remove unneeded check in getTargetAssets tests * add withdraw DAI balance checks to Aave and Compound - CS Audit Question 7.1 * remove unneeded casting * add check on ATOKEN_REVISION for active * Remove reap, simplify _unwind and rebalance * Add missing frob in _fix * Fix README * Fix Hub tests * Fix Aave integration tests * Fix compound tests and minor changes to aave ones * No need of assetsBalance in unwind * New structure for exec + removing _fix and creating new _normal function * Limit amount of fixIlk * No more modes * cmooney-20220805: Fixes for CS 5.4 Inconsistencies (#84) * cmooney-20220805: Fixes for CS 5.4 Inconsistencies * bound bar in AAVE plan to MAX_BORROW_RATE * Revert "bound bar in AAVE plan to MAX_BORROW_RATE" This reverts commit e2bf302. * Call getTargetAssets once * Remove comment * Remove param in preDebtChange and postDebtChange * Change <= to < in one condition * only call getTargetAssets if plan is active * Minor changes art/Art with extra check * Use overloaded unwind * Move vat.slip * Remove comment * Fix tests * Fix tests failing on block 15308334 * Fix 15308526 * Add comment for rounding that may affect twice * Minor changes _normal structure * Improve readability and comments for fixInk * Use standard assertRevert for lock checks * Add Hub tests for checking art != Art * Add fixInk tests * Treat all the variables the same in normal path * Fix comments * Bit of restructure of normal function * Change order * Better use maxWithdraw for checks in tests * Add test and minor renaming * Add certora (#85) * Add Certora * Add DISPATCHER(true) * Add checks * Fix * Minor changes * less restrictive spec * Use real Vat, DaiJoin and Dai code with solc 0.5.12 * Use D3MTestPool and D3MTestPlan * More checks and CI setup * Move certora.yml to correct place * Fix some asserts * Add exec_exec rule and some minor changes in exec_normal * More checks * multi assert flag via conditional * Improve checks and add comments * Use staging and old certora-cli version until production gets fixed * More checks * Add exec_ilk_culled * check dai in vow for normal path * Add exec_vat_caged * Add cage and cull * Add uncull * Add exit * Add exit_revert * Add cage_revert * Remove unnecessary stuff of cage_revert * Add cull_revert * Add uncull_revert + some variables renaming * Add rely, rely_revert, deny and deny_revert * Add file_ilk_uint256 and file_ilk_uint256_revert * Add file_ilk_address and file_ilk_address_revert * Add ilk_getters * Add exec_vat_caged_revert + minor changes * Add exec_ilk_culled_revert and minor chanegs to exec_vat_caged_revert * Use main staging + split CI runs in several * Use matrix for running all the rules in CI * Fix CI config file * Certora CI only on pushes (for now) * Add to ignore * Add timeout flag * Add exec_normal_revert (without checking if all the revert cases are covered) * Stick to specific certora-cli-alpha-master version * Verify inkAfter can't be higher than max_int256 * Add missing end lines * Add unchecked * Removing some internal functions are renaming other * Move getters to the bottom * Some minor changes * art = ink outside of unchecked * Restrict all operation to maxint256 / RAY to avoid overflows * Bit better structure for _exec * Minor changes to _wipe and uncull * Tidy up * Use NoOp event also in _wipe * Minor renaming * Fix exec_exec * Add comment explaining the system cage path of exec * Fix D3MAavePool comment * More precise pool shares (#87) * More precise account for pools shares after shutdown + force unwinding if assets < ink * No more dapp * Minor changes * Rename test * Add exit tests * Fix exit and exit_revert specs * Fix exec_normal_revert expect with the new changes * Improve exit tests * Improving exec_normal spec * Fix comment * Enforce solc 0.8.14 in make test and use it for CI * Fix test rounding error * Remove unnecessary tests * 1e18 to wad and aave rounding (#88) * switch compound tests from 1e18 to WAD * fix aave test rounding issues * gonza fixing my assertEq dyslexia Co-authored-by: Gonzalo Balabasquer <[email protected]> Co-authored-by: Gonzalo Balabasquer <[email protected]> Co-authored-by: Chris Smith <[email protected]> * Fix spacing in Makefile * Fix for new version of solc-select which puts artifacts inside individual directories * Add test_borrow_apy (#91) * Add test_borrow_apy * hevm => vm * Make comment about Compound UI a bit clearer * Add back a test that was falsely removed Co-authored-by: rockyfour <[email protected]> * Certora: Use solc optimizations where corresponds * Be explicit about optimization options in test script * add final v2 audit * fix rounding expectation Co-authored-by: Julien <[email protected]> Co-authored-by: Brian McMichael <[email protected]> Co-authored-by: talbaneth <[email protected]> Co-authored-by: Gonzalo Balabasquer <[email protected]> Co-authored-by: Kurt Barry <[email protected]> Co-authored-by: Nazzareno Massari <[email protected]> Co-authored-by: Sam MacPherson <[email protected]> Co-authored-by: Christopher Mooney <[email protected]> Co-authored-by: rockyfour <[email protected]> Co-authored-by: rockyfour <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.