code-423n4 / 2021-12-yetifinance-findings

0 stars 0 forks source link

`console.log()` should be deleted #256

Closed code423n4 closed 2 years ago

code423n4 commented 2 years ago

Handle

WatchPug

Vulnerability details

console.log() should not be in production code, removing them can also save gas.

https://hardhat.org/hardhat-network/reference/#:~:text=do%20spend%20a%20minimal%20amount%20of%20gas

Instances include:

https://github.com/code-423n4/2021-12-yetifinance/blob/5f5bf61209b722ba568623d8446111b1ea5cb61c/packages/contracts/contracts/AssetWrappers/WJLP/WJLP.sol#L152-L160

console.log("Active Pool JLP Balance");
console.log(JLP.balanceOf(activePool));
console.log("Active Pool WJLP Balance");
console.log(balanceOf(activePool));

console.log("stability Pool JLP Balance");
console.log(JLP.balanceOf(stabilityPool));
console.log("stability Pool WJLP Balance");
console.log(balanceOf(stabilityPool));
kingyetifinance commented 2 years ago

Duplicate issue #106