Platform: Code4rena
Start Date: 18/04/2024
Pot Size: $36,500 USDC
Total HM: 19
Participants: 183
Period: 7 days
Judge: Koolex
Id: 367
League: ETH
Rank: 27/183
Findings: 4
Award: $408.37
π Selected for report: 1
π Solo Findings: 0
π Selected for report: Maroutis
Also found by: 0x486776, 0xShitgem, 0xabhay, 0xleadwizard, 0xlemon, 0xnilay, 0xtankr, 3docSec, AM, Aamir, Abdessamed, Al-Qa-qa, AlexCzm, Circolors, CodeWasp, Daniel526, Egis_Security, Emmanuel, Giorgio, Honour, Hueber, Infect3d, Krace, KupiaSec, LeoGold, Limbooo, PoeAudits, SBSecurity, SpicyMeatball, T1MOH, The-Seraphs, TheSavageTeddy, TheSchnilch, Topmark, VAD37, ZanyBonzy, adam-idarrha, bhilare_, btk, carlitox477, cinderblock, dimulski, falconhoof, grearlake, gumgumzum, iamandreiski, itsabinashb, josephdara, ke1caM, kennedy1030, ljj, n0kto, n4nika, neocrao, oakcobalt, petro_1912, pontifex, poslednaya, shaflow2, shikhar229169, web3km, ych18, zhaojohnson, zigtur
0.2831 USDC - $0.28
https://github.com/code-423n4/2024-04-dyad/blob/main/src/core/VaultManagerV2.sol#L88 https://github.com/code-423n4/2024-04-dyad/blob/main/script/deploy/Deploy.V2.s.sol#L64-L65
The vulnerability is present in the VaultManagerV2::addKerosene
, as it verifies the vault being added from the keroseneManager
contract.
The kerosene manager contract is intended to contain all the non-kerosene token related vaults that are to be used for TVL calculation while calculating the price of kerosene token inside UnboundedKerosineVault::assetPrice
.
From the deploy scripts it can be noticed that to the keroseneManager
, weth and wsteth vaults are added, as these are the vaults from where TVL will be calculated.
But, the thing is that addKerosene
function is intended to add kerosene token related vaults to the vaultsKerosene
mapping corresponding to the user's DNFT id, and as a result of which non-kerosene vaults can also be added by user to vaultsKerosene
.
vaultsKerosene
mapping.weth
vaults and wsteth
vaults are non-kerosene vaults and contribute to non-kerosene value which is the exogeneous collateral, but a user adding these vaults to their vaultsKerosene
will make them also contribute to the kerosene value.
(Given a user added weth and wsteth to their vaults.)
Therefore, while calculating the VaultManagerV2::collatRatio
of a user's DNFT, it will include their weth and wseth vaults in both non-kerosene value (intended) as well as in kerosene value (unintended).
Thus, having a collateral ratio pumped by 2x.Below is a Unit Test written to justify the finding.
Add the test in the file: test/fork/v2.t.sol
Run the test (Replace $ETH_MAINNET_RPC_URL with your eth mainnet rpc url):
forge test --mt test_NonKeroseneVaultsContributeToKeroseneVaults --fork-url $ETH_MAINNET_RPC_URL -vv
Add the imports:
import {DNft} from "../../src/core/DNft.sol"; import {ERC20} from "@solmate/src/tokens/ERC20.sol";
function test_NonKeroseneVaultsContributeToKeroseneVaults() public { address user = makeAddr("user"); vm.deal(user, 100 ether); Licenser licenser = Licenser(MAINNET_VAULT_MANAGER_LICENSER); vm.prank(MAINNET_OWNER); licenser.add(address(contracts.vaultManager)); DNft dnft = DNft(MAINNET_DNFT); vm.startPrank(user); uint256 id = dnft.mintNft{value: 10 ether}(user); // user adds eth vault to their vaults contracts.vaultManager.add(id, address(contracts.ethVault)); // now due to incorrect vault address check in addKerosene, user is able to add non-kerosene vault // to their vaultsKerosene contracts.vaultManager.addKerosene(id, address(contracts.ethVault)); // user adds weth to the vault deal(MAINNET_WETH, user, 10 ether); // get 10 weth to the user ERC20(MAINNET_WETH).approve(address(contracts.vaultManager), 10 ether); contracts.vaultManager.deposit(id, address(contracts.ethVault), 10 ether); // notice that the user has added only 10 eth as collateral uint256 userNonKeroseneValue = contracts.vaultManager.getNonKeroseneValue(id); // user mints `userNonKeroseneValue` amount of DYAD token contracts.vaultManager.mintDyad(id, userNonKeroseneValue, user); // it is intended that there mint should fail as they are only 100% collateralized // but the same amount of 10 weth value being considered in their kerosene value makes them 200% coll (i.e., 2e18) which is more than 150% req overcollaterlization // as a result of which dyas is minted with only 100% collateralization vm.stopPrank(); // the collateralization comes out to be 200% due to considering non-kerosene vaults in kerosene vaults console.log("Collateralization Ratio - %e", contracts.vaultManager.collatRatio(id)); }
Manual Review, Unit Test in Foundry
Instead of validating the vaults being added to vaultsKerosene
via keroseneManager
contract, use another licenser contract for the kerosene vaults. As keroseneManager
is for vaults to be used for TVL calculation.
The usage of dedicated licenser for kerosene vaults is recommended which allows the owner of the DYAD protocol to add the kerosene vaults, and make keroseneManagerV2
to validate the kerosene vaults being added via that contract.
Invalid Validation
#0 - c4-pre-sort
2024-04-29T05:26:41Z
JustDravee marked the issue as duplicate of #966
#1 - c4-pre-sort
2024-04-29T08:37:38Z
JustDravee marked the issue as sufficient quality report
#2 - c4-judge
2024-05-04T09:46:29Z
koolexcrypto marked the issue as unsatisfactory: Invalid
#3 - c4-judge
2024-05-28T15:28:26Z
koolexcrypto marked the issue as duplicate of #1133
#4 - c4-judge
2024-05-29T07:06:44Z
koolexcrypto marked the issue as satisfactory
π Selected for report: Maroutis
Also found by: 0x486776, 0xShitgem, 0xabhay, 0xleadwizard, 0xlemon, 0xnilay, 0xtankr, 3docSec, AM, Aamir, Abdessamed, Al-Qa-qa, AlexCzm, Circolors, CodeWasp, Daniel526, Egis_Security, Emmanuel, Giorgio, Honour, Hueber, Infect3d, Krace, KupiaSec, LeoGold, Limbooo, PoeAudits, SBSecurity, SpicyMeatball, T1MOH, The-Seraphs, TheSavageTeddy, TheSchnilch, Topmark, VAD37, ZanyBonzy, adam-idarrha, bhilare_, btk, carlitox477, cinderblock, dimulski, falconhoof, grearlake, gumgumzum, iamandreiski, itsabinashb, josephdara, ke1caM, kennedy1030, ljj, n0kto, n4nika, neocrao, oakcobalt, petro_1912, pontifex, poslednaya, shaflow2, shikhar229169, web3km, ych18, zhaojohnson, zigtur
0.2831 USDC - $0.28
https://github.com/code-423n4/2024-04-dyad/blob/main/script/deploy/Deploy.V2.s.sol#L95 https://github.com/code-423n4/2024-04-dyad/blob/main/src/core/VaultManagerV2.sol#L75
The vulnerability is present in the DeployV2
script where it adds the unboundedKerosineVault
to vaultLicenser
contract.
The vaultLicenser
contract is used in VaultManagerV2::add
function which validates adding only licensed vaults in vaults
mapping. The vaults
contains all the vaults for a DNFT id issued to a user, and those vaults contributes to the user's non-kerosene collateral value.
But, licensing the unboundedKerosineVault
allows the user to make a kerosene token vault contribute to the non-kerosene value by adding it to the vaults
via VaultManagerV2::add
.
Allowing the user to add unboundedKerosineVault
in the vaults
mapping will make it contribute to the non-kerosene value.
As unboundedKerosineVault
is intended for only contributing to a user's kerosene collateral value, but due to this identified vulnerability it will also contribute to the non-kerosene value.
Therefore, a user who has added unboundedKerosineVault
in their vaultsKerosene
as intended as well as in vaults
which was unintended, will make their collateral deposited to be counted in the same vault more than one time and making their collateral value to be 2x their actual deposit.
Thus, allowing users to mint more amount of DYAD token, even if they are undercollateralized.
The deploy scripts perform the following action:
vaultLicenser.add(address(unboundedKerosineVault));
As a result of which they are allowed to add unboundedKerosineVault
in their vaults
mapping corresponding to their DNFT id and this is the unintended behavior.
The user also adds unboundedKerosineVault
in their vaultsKerosene
which is intended functionality.
But the vaults
mapping was intended to store only non-kerosene token related vaults, thus showing unintended behavior.
Now same vault being in both vaults
and vaultsKerosene
will make the getTotalUsdValue
to output 2x the actual collateral amount, as getKeroseneValue
will return their kerosene value as intended from the amount deposited in unboundedKerosineVault
, but due to the unintended addition of the same vault in vaults
mapping will also make getNonKeroseneValue
to also return the same collateral amount, but from a kerosene token based vault.
Thus, making the same vault to return collateral amount both for kerosene value as well as non-kerosene value.
Manual Review
vaultLicenser.add(address(unboundedKerosineVault));
The above action was responsible for this vulnerability.
Therefore, consider not adding unboundedKerosineVault
to vaultLicenser
as it is only for non-kerosene token vaults.
Make a seperate licenser contract for the vaultsKerosene
and add unboundedKerosineVault
in that.
Context
#0 - c4-pre-sort
2024-04-29T05:26:31Z
JustDravee marked the issue as duplicate of #966
#1 - c4-pre-sort
2024-04-29T08:37:37Z
JustDravee marked the issue as sufficient quality report
#2 - c4-judge
2024-05-04T09:46:29Z
koolexcrypto marked the issue as unsatisfactory: Invalid
#3 - c4-judge
2024-05-28T15:28:28Z
koolexcrypto marked the issue as duplicate of #1133
#4 - c4-judge
2024-05-29T07:06:48Z
koolexcrypto marked the issue as satisfactory
π Selected for report: 0xAlix2
Also found by: 0xfox, 0xlemon, 0xnev, 3docSec, Aamir, Abdessamed, Dudex_2004, Egis_Security, Evo, FastChecker, Honour, Jorgect, KupiaSec, Limbooo, MrPotatoMagic, SpicyMeatball, TheSchnilch, alix40, bhilare_, favelanky, forgebyola, ke1caM, kennedy1030, koo, oakcobalt, petro_1912, shikhar229169
32.4128 USDC - $32.41
https://github.com/code-423n4/2024-04-dyad/blob/main/src/core/VaultManagerV2.sol#L150
The vulnerability is present in the VaultManagerV2::withdraw
, where it compares the DYAD minted against the remaining non-kerosene value remaining in the vault.
But, when a user withdraws a kerosene token from their vault, the DYAD Minted is compared by checking it against non-kerosene value subtracted by the value of kerosene amount the user wants to burn.
if (getNonKeroseneValue(id) - value < dyadMinted) revert NotEnoughExoCollat();
As, this check is dedicated for ensuring that user has more non-kerosene value than the DYAD minted.
But, even during withdrawal of kerosene token, it checks the net non-kerosene value by subtracting from it the withdrawal value of kerosene token and that is irrelevant, as this check is purely for non-kerosene value.
The user will not be able to withdraw their kerosene token even if they are fully collateralized as it considers the user's non-kerosene value by subtracting their kerosene withdrawal value and as a result of which it incorrectly reverts with NotEnoughExoCollat
even there exo collateral is sufficient.
Consider the case where user has deposited $100 worth of weth in weth vault, and has $100 worth of kerosene token in unbounded kerosene vault and has minted 100 DYAD token.
Therefore, non-kerosene value - $100 (from weth vault) and, kerosene value - $100 (from unbounded kerosene vault)
Now, the user has sufficient exogeneous collateral as (DYAD <= non-kerosene value) and along with fully collateralized(200 / 100 = 2 = 200% collateralization).
But while withdrawing $50 worth of kerosene token from unbounded kerosene vault, there net non-kerosene value is considered by subtracting this $50 value of withdrawal even for the kerosene withdrawals, and thus it incorrectly reverts with NotEnoughExoCollat
even there exo collateral is sufficient.
Manual Review
For kerosene token withdrawals, don't perform the below check as it is only required for withdrawing non-kerosene token collateral.
if (getNonKeroseneValue(id) - value < dyadMinted) revert NotEnoughExoCollat();
Other
#0 - c4-pre-sort
2024-04-26T21:24:49Z
JustDravee marked the issue as duplicate of #397
#1 - c4-pre-sort
2024-04-29T08:48:07Z
JustDravee marked the issue as sufficient quality report
#2 - c4-judge
2024-05-11T19:22:22Z
koolexcrypto marked the issue as satisfactory
#3 - c4-judge
2024-05-13T18:33:04Z
koolexcrypto changed the severity to 3 (High Risk)
π Selected for report: shikhar229169
Also found by: 0x486776, 0xSecuri, 0xfox, 3th, Circolors, Honour, KupiaSec, Maroutis, Sancybars, Stormreckson, Strausses, ke1caM, kennedy1030
368.3793 USDC - $368.38
https://github.com/code-423n4/2024-04-dyad/blob/main/src/core/VaultManagerV2.sol#L205
The vulnerability is present in the VaultManagerV2::liquidate
function where it doesn't have any check for whether the vault has enough exogeneous collateral leading to no liquidation even if the non-kerosene value is less than DYAD minted.
It is intended that the position of user's DNFT has enough exogeneous collateral and should be 150% overcollateralized. But there will arise a case when a position is no doubt 150% collateralized by the support of kerosene value, but the non-kerosene value is reduced below the DYAD token minted. As a result of which the vault doesn't have enough required exogeneous collateral. But due to the missing check for enough non-kerosene value collateral in liquidate function, the liquidation will never happen and reverts.
The position will never be liquidated, for the above discussed case. As a result of which the (DYAD Minted > Non Kerosene Value), making the value of DYAD to fall.
Add the below test file in test/fork/v2.t.sol
Add the imports:
import {DNft} from "../../src/core/DNft.sol"; import {ERC20} from "@solmate/src/tokens/ERC20.sol"; import {OracleMock} from "../OracleMock.sol"; import {IVaultManager} from "../../src/core/VaultManagerV2.sol";
Run the test (Replace the $ETH_MAINNET_RPC_URL by your eth mainnet rpc url):
forge test --mt test_LiquidationReverts_EvenIfVaultHasNotEnoughExoCollateral --fork-url $ETH_MAINNET_RPC_URL
function test_LiquidationReverts_EvenIfVaultHasNotEnoughExoCollateral() public { address user = makeAddr("user"); vm.deal(user, 100 ether); Licenser licenser = Licenser(MAINNET_VAULT_MANAGER_LICENSER); vm.prank(MAINNET_OWNER); licenser.add(address(contracts.vaultManager)); DNft dnft = DNft(MAINNET_DNFT); vm.startPrank(user); uint256 id = dnft.mintNft{value: 10 ether}(user); // user adds vault contracts.vaultManager.add(id, address(contracts.ethVault)); contracts.vaultManager.addKerosene(id, address(contracts.wstEth)); // user adds weth to the vault deal(MAINNET_WETH, user, 10 ether); // get 10 weth to the user ERC20(MAINNET_WETH).approve(address(contracts.vaultManager), 10 ether); contracts.vaultManager.deposit(id, address(contracts.ethVault), 10 ether); // user adds wsteth to the vault deal(MAINNET_WSTETH, user, 10 ether); // get 10 wsteth to the user ERC20(MAINNET_WSTETH).approve(address(contracts.vaultManager), 10 ether); contracts.vaultManager.deposit(id, address(contracts.wstEth), 10 ether); // user mints DYAD token uint256 nonKeroseneValue = contracts.vaultManager.getNonKeroseneValue(id); // user mints DYAD equal to the usd value of their non-kerosene collateral uint256 dyadToMint = nonKeroseneValue; contracts.vaultManager.mintDyad(id, dyadToMint, user); // now the value of weth falls to 90% _manipulateWethPrice(); // now get the nonKeroseneValue uint256 newNonKeroseneValue = contracts.vaultManager.getNonKeroseneValue(id); // non kerosene usd value reduced, as weth price reduced assert(newNonKeroseneValue < dyadToMint); // now it is intened that the user should be liquidated by a liquidator // but due to missing exogeneous collateral check, the liquidation will not happen vm.stopPrank(); address liquidator = makeAddr("liquidator"); vm.deal(liquidator, 100 ether); vm.startPrank(liquidator); uint256 liquidatorId = dnft.mintNft{value: 10 ether}(liquidator); // the liquidation reverts as mentioned, even if (dyadMinted > nonKeroseneValue) // thus shows unintended behaviour vm.expectRevert(IVaultManager.CrTooHigh.selector); contracts.vaultManager.liquidate(id, liquidatorId); vm.stopPrank(); } function _manipulateWethPrice() internal { (, int256 ans, , , ) = contracts.ethVault.oracle().latestRoundData(); OracleMock oracleMock = new OracleMock(uint256(ans)); vm.etch(address(contracts.ethVault.oracle()), address(oracleMock).code); vm.warp(1); OracleMock(address(contracts.ethVault.oracle())).setPrice(uint256(ans) * 90e18 / 100e18); }
Manual Review, Unit Test in Foundry
Update the line 214 in VaultManagerV2.sol
- if (cr >= MIN_COLLATERIZATION_RATIO) revert CrTooHigh(); + if (cr >= MIN_COLLATERIZATION_RATIO && getNonKeroseneValue(id) >= dyad.mintedDyad(address(this), id)) revert CrTooHigh();
Context
#0 - c4-pre-sort
2024-04-29T08:03:44Z
JustDravee marked the issue as sufficient quality report
#1 - 0xMax1
2024-04-30T08:42:34Z
Kerosene should be included in the transfer upon liquidation.
@shafu0x I suggest we label issue 338 as sponsor confirmed
.
#2 - shafu0x
2024-04-30T11:51:51Z
I agree. Good find.
#3 - koolexcrypto
2024-05-05T13:44:00Z
Good finding. would have been great if balances (numbers) are added in the comments of the PoC.
#4 - c4-judge
2024-05-05T13:44:17Z
koolexcrypto marked the issue as satisfactory
#5 - koolexcrypto
2024-05-08T08:23:05Z
@shafu0x
Could you please help with the severity assessment here?
The impact is obviously high, However, I'm not sure about the likelihood.
Here is an example, the user added extra kerosene (i.e. above 50%),
Another scenario, would be that the kerosene added by the user is equal or less than 50%, and the price of kerosene goes up enough to cover 150% as CR.
So, likelihood depends on two events:
Given the info above, would you say the likelihood is low, medium or high?
#6 - c4-judge
2024-05-08T08:40:23Z
koolexcrypto marked the issue as primary issue
#7 - c4-judge
2024-05-09T12:16:30Z
koolexcrypto marked the issue as selected for report
#8 - shafu0x
2024-05-09T13:42:12Z
As @0xMax1 mentioned we fix this by also moving kerosene in the case of a liquidation. I think this should fix it.
#9 - koolexcrypto
2024-05-10T10:02:11Z
I believe you are referring to another issue maybe? This one is, the liquidation will revert if CR >= 1.5 but the non-kerosene collateral value is less than 100% . So, minted dyad is not backed by (at least) 100% of non-kerosene collateral.
#10 - koolexcrypto
2024-05-15T19:30:16Z
After discussing the likelihood of this with the sponsor, I believe the issue stands as high.
#11 - adamidarrha
2024-05-16T10:10:30Z
This issue should be invalid. The issue is about the state where positions have exogenous collateral less than the DYAD minted, suggesting such positions should be liquidated. However, the protocol specifications do not mandate liquidation under these circumstances if the position remains overall sufficiently collateralized with kerosene..
Additionally, there appears to be confusion regarding the sponsor's feedback. Their confirmation was intended for a different issue #128 not this one. It's crucial to reconfirm with the sponsors whether the observed functionality aligns with their expectations, as their previous comments were misapplied to this issue.
#12 - T1MOH593
2024-05-16T11:02:07Z
Protocol docs state:
If a Noteβs collateral value in USD drops below 150% of its DYAD minted balance, it faces liquidation.
There is no mention that position is subject to liquidation when exogenous collateral < DYAD minted
.
Yes there is that check in withdraw()
and mintDyad()
, but from reviewer's perspective it is no more than sanity check. Because bypassing this check as it is doesn't harm protocol due to the nature of Kerosine price (it has valuation of surplus collateral).
That's because if someone has say 90% of exogenous collateral and 60% of Kerosine, then somebody else has more than 100% in exogenous collateral and protocol is totally fine. Because as noted before Kerosine has value only if there is surplus collateral in protocol.
To sum up I think submission is invalid.
#13 - AlexCZM
2024-05-16T11:47:15Z
Idk how much weight it has, but I want to add sponsor confirmed in private thread that a dnft is only liquidatable if the CR of your whole position is under 150%
.
#14 - McCoady
2024-05-16T12:21:42Z
The core invariant of the protocol is TVL (which is measured as the non Kerosene collateral) > DYAD total supply
Positions being able to fall below a 1:1 exogenous collateral to dyad minted ratio allows for the protocol to break it's core invariant meaning this is a valid issue regardless of the sponsors intentions.
As pointed out in issue #1027 as the value of the collateral in the protocol is all significantly correlated (to the price of ETH) a significant drop in ETH price can cause a large % of open positions to drop below this 1:1 ratio meaning it becomes very likely this core invariant is broken.
#15 - Brivan-26
2024-05-17T10:46:48Z
The confusion around this issue is that it didn't succeed in combining two findings. There are two invariants related to minting/liquidating DYAD:
This issue does not highlight the first invariant. It only talks about liquidation and it assumes that if the USD value of exogenous collateral drops below a 1:1 ratio, liquidation should happen, while this is a wrong assumption. Liquidation should happen if the total collateral USD value (including both exogenous and kerosene tokens) drops below 150%
However, the first invariant (when minting DYAD, a 1:1 ratio should hold) is a valid finding as it demonstrates a core invariant break, but it is not highlighted in this issue, an example of an issue that highlights this is #459
#16 - McCoady
2024-05-17T11:18:37Z
The core invariant of the whole protocol is that total TVL does not drop below total Dyad minted. Being able to liquidate positions that have fallen below the 1:1 ratio is merely a mitigation to protect the protocol from this happening.
Issue #1027, despite being marked a duplicate of this issue, more adequately points out that the protocol wide invariant being broken is the main concern, rather than it being a specific issue in the liquidation function. Adding a 100% exogenous collateral check on individual positions would mitigate chances of it happening.
Given there is no option to post collateral in non-ETH sources (other stable coins), if ETH price were to drop & TVL to fall below DYAD minted it would lead to the stablecoin to depegging as it would no longer be backed 1:1. Being able to liquidate positions with less than a 1:1 ratio is more a mitigation to protect the health of the entire protocol rather than a bug in itself.
#17 - koolexcrypto
2024-05-28T15:50:41Z
Thank you everyone for your input.
This issue stays as a valid high since the core invariant in the protocol can be broken leading to DYAD's depeg.
π Selected for report: 0xAlix2
Also found by: 0x175, 0x486776, 0xnev, 3docSec, 3th, Aamir, Abdessamed, AlexCzm, Angry_Mustache_Man, Circolors, DedOhWale, Emmanuel, Giorgio, Honour, Jorgect, KupiaSec, Maroutis, Myrault, SBSecurity, Stefanov, T1MOH, VAD37, Vasquez, adam-idarrha, alix40, ducanh2706, falconhoof, iamandreiski, ke1caM, kennedy1030, koo, lian886, ljj, miaowu, pontifex, sashik_eth, shikhar229169, vahdrak1
7.3026 USDC - $7.30
https://github.com/code-423n4/2024-04-dyad/blob/main/src/core/VaultManagerV2.sol#L221-L226
The vulnerability is present in the VaultManagerV2::liquidate
where it only repays the exogeneous collateral (in vaults
) to the liquidator and doesn't pay the kerosene collateral (in vaultsKerosene
) which makes the liquidator to pay more DYAD than what they have received in collateral, thus disincentivizing them.
As a user's position comprises both of kerosene and non-kerosene collateral, but when a user's non-kerosene collateral falls below such that it causes the overall collateral ratio to fall below, then the liquidator's liquidating them is only paid in the non-kerosene value which is now actually less than the DYAD to be paid after fall of non-kerosene collateral's price fall.
vaults
and not vaultsKerosene
for collateral payment in liquidate
function.Consider the scenario as below:
weth
vault to their vaults[id]
and UnboundedKerosineVault
to their vaultsKerosene
.weth
vault and $50 value of kerosene collateral in UnboundedKerosineVault
.weth
is the only non-kerosene collateral they deposited. Therefore DYAD minted = 100 DYADcappedCr
= 1.4liquidationEquityShare
= (cappedCr - 1) * 0.2 = (1.4 - 1) * 0.2 = 0.08liquidationAssetShare
= (liquidationEquityShare + 1) / cappedCr = (0.08 + 1) / 1.4 = 0.7714 = 77.14%vaults
mapping are used for repayment of collateral to liquidator, that means only weth
vault is used.Manual Review
Along with the usage of vaults
for payment of collateral, also use vaultsKerosene
, so that the kerosene collateral can also be paid to the liquidator.
Context
#0 - c4-pre-sort
2024-04-28T10:21:32Z
JustDravee marked the issue as duplicate of #128
#1 - c4-pre-sort
2024-04-29T09:06:43Z
JustDravee marked the issue as sufficient quality report
#2 - c4-judge
2024-05-11T19:43:12Z
koolexcrypto marked the issue as satisfactory