Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

C4 token fixes #121

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

C4 token fixes #121

wants to merge 3 commits into from

Conversation

@@ -32,7 +31,7 @@ contract OverlayV1OVLCollateral is ERC1155Supply {
Position.Info[] public positions;

IOverlayV1Mothership public immutable mothership;
IOverlayTokenNew immutable public ovl;
IOverlayToken immutable public ovl;
Copy link
Contributor

@mesozoic-technology mesozoic-technology Jan 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the removal of the new token. The auditors found a bug in it that would not have been good. But not one of them chimed in about the pattern itself being a no go.

I don't find a risk in this pattern. It's a highly specialized permissioned function that is only invoked from non manipulable immutable smart contracts.

This is essentially the nature of our entire system. Our entire system does these things and I find no anxiety in collapsing some of the functions in this highly controlled and narrow domain.

}

// See: OpenZeppelin Contracts v4.4.0 (token/ERC20/extensions/ERC20Burnable.sol)
function burnFrom(address _account, uint256 _amount) external onlyBurner {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be contradictory to the advice from one of the reviewers that burn shall not be able to burn from any account.

We should consider if that is a desired system design where tokens are only burnt whence owned by a collateral manager at the time. Burn on transfer in. Burn on transfer out.

A well designed transferBurn function could also satisfy these requirements.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants