Skip to content
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

No emmission of events after sensitive action in RCNftHub2.sol and in RCtreasury.sol #55

Closed
code423n4 opened this issue Jun 15, 2021 · 2 comments
Labels

Comments

@code423n4
Copy link
Contributor

@code423n4 code423n4 added 1 (Low Risk) bug Something isn't working labels Jun 15, 2021
code423n4 added a commit that referenced this issue Jun 15, 2021
@Splidge
Copy link
Collaborator

Splidge commented Jun 16, 2021

no emission of events in deposit() and withdrwal() function in RCNftHub2.sol

deposit() and withdraw() both emit standard ERC721 Transfer events via the respective _mint and _burn calls.

no emssion of events in topupMarketBalance() , payRent(), payout(), refund() in RCtreasury.sol

  • topupMarketBalance() will probably only be used once as it's estimated that 1xDai could prevent rounding issues for a decade or more, regardless it does emit an ERC20 Transfer event.
  • payRent() emits LogRentCollection from the market that calls it, this makes it nice and clear which market collected the rent
  • payout() emits a variety of events based on why the payout was given, again from the market that calls it:
    • LogRentReturned in the event of an invalid outcome,
    • LogWinningsPaid for winnings from the prize pot and
    • LogStakeholderPaid for the market creator, affiliate, card affiliates and artist
  • refund(), there is no refund() function but there is a refundUser() which does emit LogAdjustDeposit, I assume this is the one you mean as there's only 6 instances of the word "refund" in the Treasury and they're all in refundUser()

Note that payRent(), payout() and refundUser() all have the onlyMarkets modifier so we can be sure that the markets are the only contracts calling these functions and so the events will always be sent.

@dmvt
Copy link
Collaborator

dmvt commented Jul 9, 2021

I agree with the sponsor on this one

@dmvt dmvt closed this as completed Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants