Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 0 additions & 10 deletions core/contracts/Clearinghouse.sol
Original file line number Diff line number Diff line change
Expand Up @@ -414,14 +414,6 @@ contract Clearinghouse is EndpointGated, ClearinghouseStorage, IClearinghouse {
: IProductEngine.HealthType.INITIAL;

require(getHealth(sender, healthType) >= 0, ERR_SUBACCT_HEALTH);
// TODO: remove this when we support wS spot.
if (productId == 145) {
ISpotEngine.Balance memory balance = spotEngine.getBalance(
productId,
sender
);
require(balance.amount >= 0, ERR_SUBACCT_HEALTH);
}
emit ModifyCollateral(amountRealized, sender, productId);
}

Expand All @@ -432,8 +424,6 @@ contract Clearinghouse is EndpointGated, ClearinghouseStorage, IClearinghouse {
{
require(!RiskHelper.isIsolatedSubaccount(txn.sender), ERR_UNAUTHORIZED);
require(txn.productId != QUOTE_PRODUCT_ID);
// TODO: remove this when we support wS spot.
require(txn.productId != 145, ERR_INVALID_PRODUCT);
productToEngine[txn.productId].mintLp(
txn.productId,
txn.sender,
Expand Down
5 changes: 1 addition & 4 deletions core/contracts/Endpoint.sol
Original file line number Diff line number Diff line change
Expand Up @@ -285,10 +285,7 @@ contract Endpoint is IEndpoint, EIP712Upgradeable, OwnableUpgradeable {
string memory referralCode
) public {
require(bytes(referralCode).length != 0);
require(
!RiskHelper.isIsolatedSubaccount(subaccount) && productId != 145,
ERR_UNAUTHORIZED
);
require(!RiskHelper.isIsolatedSubaccount(subaccount), ERR_UNAUTHORIZED);

address sender = address(bytes20(subaccount));

Expand Down
12 changes: 10 additions & 2 deletions core/contracts/OffchainExchange.sol
Original file line number Diff line number Diff line change
Expand Up @@ -938,7 +938,11 @@ contract OffchainExchange is
// use the default fee rates.
if (block.chainid == 80094 || block.chainid == 80084) {
// defaults for Berachain maker: 2bps / taker: 5bps
userFeeRates = FeeRates(200_000_000_000_000, 500_000_000_000_000, 1);
userFeeRates = FeeRates(
200_000_000_000_000,
500_000_000_000_000,
1
);
} else {
userFeeRates = FeeRates(0, 200_000_000_000_000, 1);
}
Expand All @@ -958,7 +962,11 @@ contract OffchainExchange is
// use the default fee rates.
if (block.chainid == 80094 || block.chainid == 80084) {
// defaults for Berachain maker: 2bps / taker: 5bps
userFeeRates = FeeRates(200_000_000_000_000, 500_000_000_000_000, 1);
userFeeRates = FeeRates(
200_000_000_000_000,
500_000_000_000_000,
1
);
} else {
userFeeRates = FeeRates(0, 200_000_000_000_000, 1);
}
Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vertex-core",
"version": "3.0.0",
"version": "3.0.1",
"license": "UNLICENSED",
"description": "EVM implementation of Vertex",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion lba/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vertex-lba",
"version": "3.0.0",
"version": "3.0.1",
"license": "UNLICENSED",
"description": "Vertex LBA contracts",
"scripts": {
Expand Down
Loading