Skip to content
This repository was archived by the owner on Aug 26, 2024. It is now read-only.

Commit 0c26e97

Browse files
committed
feat: remove guardrails
1 parent 1924616 commit 0c26e97

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

tasks/admin/revenue.ts

+31-31
Original file line numberDiff line numberDiff line change
@@ -222,43 +222,43 @@ task("revenue:admin:withdraw", "Calculate the fees accrued from admin fees")
222222
console.log("USD FEE VALUE", parseFloat(formatEther(nativeFee)) * priceUsd);
223223
console.log("USD THRESHOLD VALUE", parseFloat(taskArgs.threshold) * priceUsd);
224224

225-
if (ionicFee > threshold) {
226-
// const accTx = await cToken.accrueInterest();
227-
// await accTx.wait();
228-
console.log(`Withdrawing fee from ${await cToken.read.symbol()} (underlying: ${underlying})`);
229-
console.log("deployer: ", deployer);
230-
const tx = await cToken.write._withdrawIonicFees([ionicFee]);
231-
await publicClient.waitForTransactionReceipt({ hash: tx });
232-
console.log("tx: ", tx);
233-
console.log(
234-
`Pool: ${comptroller.address} - Market: ${market} (underlying: ${underlying}) - Ionic Fee: ${formatEther(
235-
nativeFee
236-
)}`
237-
);
238-
} else {
239-
console.log(`Pool: ${comptroller.address} - Market: ${market} - No Ionic Fees: ${ionicFee}`);
240-
}
225+
// if (ionicFee > threshold) {
226+
// const accTx = await cToken.accrueInterest();
227+
// await accTx.wait();
228+
console.log(`Withdrawing fee from ${await cToken.read.symbol()} (underlying: ${underlying})`);
229+
console.log("deployer: ", deployer);
230+
let tx = await cToken.write._withdrawIonicFees([ionicFee]);
231+
await publicClient.waitForTransactionReceipt({ hash: tx });
232+
console.log("tx: ", tx);
233+
console.log(
234+
`Pool: ${comptroller.address} - Market: ${market} (underlying: ${underlying}) - Ionic Fee: ${formatEther(
235+
nativeFee
236+
)}`
237+
);
238+
// } else {
239+
// console.log(`Pool: ${comptroller.address} - Market: ${market} - No Ionic Fees: ${ionicFee}`);
240+
// }
241241

242242
const adminFee = await cToken.read.totalAdminFees();
243243
const nativeFeeAdmin = (adminFee * nativePrice) / 10n ** 18n;
244244

245245
console.log("USD FEE VALUE", parseFloat(formatEther(nativeFeeAdmin)) * priceUsd);
246246
console.log("USD THRESHOLD VALUE", parseFloat(taskArgs.threshold) * priceUsd);
247-
if (adminFee > threshold) {
248-
// const accTx = await cToken.accrueInterest();
249-
// await accTx.wait();
250-
console.log(`Withdrawing fee from ${await cToken.read.symbol()} (underlying: ${underlying})`);
251-
const tx = await cToken.write._withdrawAdminFees([ionicFee]);
252-
await publicClient.waitForTransactionReceipt({ hash: tx });
253-
console.log("tx: ", tx);
254-
console.log(
255-
`Pool: ${comptroller.address} - Market: ${market} (underlying: ${underlying}) - Admin Fee: ${formatEther(
256-
nativeFeeAdmin
257-
)}`
258-
);
259-
} else {
260-
console.log(`Pool: ${comptroller.address} - Market: ${market} - No Ionic Fees: ${ionicFee}`);
261-
}
247+
// if (adminFee > threshold) {
248+
// const accTx = await cToken.accrueInterest();
249+
// await accTx.wait();
250+
console.log(`Withdrawing fee from ${await cToken.read.symbol()} (underlying: ${underlying})`);
251+
tx = await cToken.write._withdrawAdminFees([adminFee]);
252+
await publicClient.waitForTransactionReceipt({ hash: tx });
253+
console.log("tx: ", tx);
254+
console.log(
255+
`Pool: ${comptroller.address} - Market: ${market} (underlying: ${underlying}) - Admin Fee: ${formatEther(
256+
nativeFeeAdmin
257+
)}`
258+
);
259+
// } else {
260+
// console.log(`Pool: ${comptroller.address} - Market: ${market} - No Ionic Fees: ${ionicFee}`);
261+
// }
262262
}
263263
}
264264
});

0 commit comments

Comments
 (0)