Skip to content
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

Merge train for Audit Fixes #47

Open
wants to merge 79 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
ea44176
test and fix
ethereumdegen Apr 25, 2024
a5b8909
add events
ethereumdegen Apr 29, 2024
d5273e0
event emits
ethereumdegen Apr 29, 2024
08bbbff
add fix
ethereumdegen May 6, 2024
16cf4b0
fix burnshares fn
ethereumdegen May 6, 2024
586bfd7
add gas requirement
ethereumdegen May 6, 2024
edf4ba9
add ownable init
ethereumdegen May 6, 2024
c200666
use muldiv
ethereumdegen May 6, 2024
8a40b95
fix
ethereumdegen May 6, 2024
af2b603
update collateral mgr
ethereumdegen May 6, 2024
3e0e864
incorporate liquidity threshold in get pool util ratio
ethereumdegen May 6, 2024
84ce533
remove unnecessary expansion
ethereumdegen May 6, 2024
c798d03
adding public escrwo withdraw
ethereumdegen May 6, 2024
568cb88
add requirement to prep for withdrawl
ethereumdegen May 7, 2024
a887e74
fix
ethereumdegen May 7, 2024
f357316
add tests
ethereumdegen May 7, 2024
8b52a09
apr calc fix
ethereumdegen May 7, 2024
0186a1c
flip min max
ethereumdegen May 7, 2024
6a62895
add a way for protocol owner to extract non-loan-related tokens from …
ethereumdegen May 7, 2024
f5c153b
simple fix
ethereumdegen May 7, 2024
3c56ee2
mean tick
ethereumdegen May 7, 2024
8135d3b
adding offset
ethereumdegen May 7, 2024
b675d09
use safe xfer
ethereumdegen May 7, 2024
c7359d8
reset approval to 0 once finished
ethereumdegen May 7, 2024
d81af4b
fix SCF
ethereumdegen May 7, 2024
eb76c6d
require interest in liquidation
ethereumdegen May 8, 2024
c114789
add extensions to SCF
ethereumdegen May 8, 2024
599e32b
non dynamic name for token
ethereumdegen May 9, 2024
a4bfe5c
prevent use of tokens with fee on xfer
ethereumdegen May 9, 2024
9cf624a
add max market fee
ethereumdegen May 9, 2024
eef86ac
include interest in liq
ethereumdegen May 15, 2024
f1d2069
use 1x instead of 8x
ethereumdegen May 15, 2024
afe9c9b
add
ethereumdegen May 15, 2024
04d4afa
switch fix to retrieve original loan principal amount
rbcp18 May 15, 2024
e84f973
simplify liquidate logic by moving up amount due variable fetch
rbcp18 May 15, 2024
58a4b67
fix pr
ethereumdegen May 16, 2024
fdc7417
add getter
ethereumdegen May 28, 2024
b0fd016
add fix
ethereumdegen May 28, 2024
34e55c7
Merge branch 'feature/add-dune-event-emits' into merge-train
ethereumdegen May 28, 2024
a91740b
Merge branch 'add-uniswap-fee-getter' into merge-train
ethereumdegen May 28, 2024
232e013
Merge branch 'audit-fix-11' into merge-train
ethereumdegen May 28, 2024
cfc79ef
Merge branch 'audit-fix-19' into merge-train
ethereumdegen May 28, 2024
09c5061
Merge branch 'audit-fix-24' into merge-train
ethereumdegen May 28, 2024
f7ddda4
Merge branch 'audit-fix-35' into merge-train
ethereumdegen May 28, 2024
ebb6af1
Merge branch 'audit-fix-39' into merge-train
ethereumdegen May 28, 2024
f67755e
Merge branch 'audit-fix-43' into merge-train
ethereumdegen May 28, 2024
2af9c0d
commitmentid fix check
ethereumdegen May 28, 2024
06ccbd9
Merge branch 'audit-fix-46' into merge-train
ethereumdegen May 28, 2024
a9c1e90
Merge branch 'audit-fix-70' into merge-train
ethereumdegen May 28, 2024
83570f3
Merge branch 'audit-fix/58' into merge-train
ethereumdegen May 28, 2024
9cfd963
Merge branch 'audit-fix/126' into merge-train
ethereumdegen May 29, 2024
c5a339b
fix tests
ethereumdegen May 29, 2024
b57a8ac
Merge branch 'audit-fix/62' into merge-train
ethereumdegen May 29, 2024
63fefa3
merge
ethereumdegen May 29, 2024
021d0c3
merge 72
ethereumdegen May 29, 2024
49e3a31
Merge branch 'audit-fix/109' into merge-train
ethereumdegen May 29, 2024
3c5493a
merge 109
ethereumdegen May 29, 2024
f55314f
Merge branch 'audit-fix/111' into merge-train
ethereumdegen May 29, 2024
0314b5f
Merge branch 'audit-fix/119' into merge-train
ethereumdegen May 29, 2024
cd73d2a
Merge branch 'audit-fix/283' into merge-train
ethereumdegen May 29, 2024
683c554
Merge branch 'mitigate-flash-attacking-oracle' into merge-train
ethereumdegen May 29, 2024
b079668
Merge branch 'audit-fix/239' into merge-train
ethereumdegen May 29, 2024
aec6cf7
Merge branch 'audit-fix/140' into merge-train
ethereumdegen May 29, 2024
1bb7465
merge 32
ethereumdegen May 29, 2024
1eb3381
Merge branch 'audit-fix/47' into merge-train
ethereumdegen May 29, 2024
a14d587
merge
ethereumdegen May 29, 2024
23b3ceb
add
ethereumdegen May 29, 2024
96e28c3
merge 138
ethereumdegen May 29, 2024
e167277
Merge branch 'audit-fix/269' into merge-train
ethereumdegen May 29, 2024
dbff5b5
merge 122
ethereumdegen May 29, 2024
53cf7fa
Merge branch 'audit-fix/125' into merge-train
ethereumdegen May 29, 2024
0d1ead3
special rules for first deposit
ethereumdegen May 29, 2024
9dd7cca
merge 28c
ethereumdegen May 29, 2024
c4e85ed
merge 289
ethereumdegen May 29, 2024
d000cdb
fix tests
ethereumdegen May 29, 2024
9aa04f0
Merge branch 'audit-fix/285' into merge-train
ethereumdegen May 29, 2024
c2b61c4
Merge branch 'audit-fix/243' into merge-train
ethereumdegen May 29, 2024
14afa39
revert semver check
ethereumdegen May 29, 2024
7517c8a
fi xhardhat config
ethereumdegen May 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
incorporate liquidity threshold in get pool util ratio
  • Loading branch information
ethereumdegen committed May 6, 2024
commit 3e0e864d9e4faaa2ec85d363553a5d69313fb5dd
Original file line number Diff line number Diff line change
@@ -759,10 +759,15 @@ contract LenderCommitmentGroup_Smart is
if (getPoolTotalEstimatedValue() == 0) {
return 0;
}


return uint16(Math.min(

MathUpgradeable.mulDiv( getTotalPrincipalTokensOutstandingInActiveLoans() , 10000 ,
(getPoolTotalEstimatedValue().percent(liquidityThresholdPercent) ) )

, 10000));

return uint16( Math.min(
getTotalPrincipalTokensOutstandingInActiveLoans() * 10000 /
getPoolTotalEstimatedValue() , 10000 ));
}


Loading