-
Notifications
You must be signed in to change notification settings - Fork 0
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
Users getting InsufficientAccountLiquidity error when trying to purchase #206
Comments
Display of all errors of this type: |
InsufficientAccountLiquidity error in the protocol: |
Nov-06-2024 10:06:17 AM UTC transfer +0.007 ETH |
Executed a simulation of the collect credit at block 128_600_355 for the user 0x1C5a7f61b07DD43F394b5B02aBeb8FcA52814E26 and after looking at the stack trace the result is that after borrowing the user had more debt than collateral and is rejecting the authorization properly.
|
// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.10;
import "forge-std/Test.sol";
import "./../interface.sol";
interface IExaAccount {
function collectCredit(uint256 maturity, uint256 amount, uint256 timestamp, bytes calldata signature) external;
function accountLiquidity(
address account,
address marketToSimulate,
uint256 withdrawAmount
) external returns (uint256 sumCollateral, uint256 sumDebtPlusEffects) ;
}
contract ContractTest is Test {
address user = 0x1C5a7f61b07DD43F394b5B02aBeb8FcA52814E26;
address keeper = 0xcDdB23654595C224A563f62943D9Ff189138c04e;
function setUp() public {
vm.createSelectFork("optimism", 128_600_355); //fork optimism at block 128600355
}
function testOPAccountLiquidity() public {
vm.prank(keeper);
IExaAccount(user).collectCredit(1734566400, 15780000, 1732799485, hex"c2a988d9088815e0d0d07b51839b358e22fa8ff95f871f50c8edb2caa1e5ca023b6b0072d90483234b19bdd76002d9f93bded4439afb4c5e7b5cf481d74bdfbe1b");
}
}
Used codebase: https://github.com/SunWeb3Sec/DeFiHackLabs |
The user added enough funds for the transaction and they were correctly poked into his account.
When trying to make a credit purchase he got a rejection.
Sentry trace
Sentry issue
The text was updated successfully, but these errors were encountered: