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

Fix review - simplified refund logic #117

Merged
merged 39 commits into from
Feb 28, 2023

Conversation

FlacoJones
Copy link
Contributor

Removes the following methods from BountyCore.sol:

  • getLockedFunds

  • Modifies the logic of DepositManagerV1::refundDeposit to simple "refund whatever is left" with the following code:

        address depToken = bounty.tokenAddress(_depositId);
        uint256 depositVolume = bounty.volume(_depositId);
        uint256 tokenBalance = bounty.getTokenBalance(depToken);

        uint256 volume;
        if (depositVolume <= tokenBalance) {
            volume = depositVolume;
        } else {
            volume = tokenBalance;
        }

        bounty.refundDeposit(_depositId, msg.sender, volume);

…g the Ongoing+TieredPercentage implementations, interfaces, and methods in OpenQV1 and ClaimManagerV1
…DDRESS_LIMIT, simply checks if token is whitelisted or not
Copy link

@IAm0x52 IAm0x52 left a comment

Choose a reason for hiding this comment

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

Changes look good. The refund logic has been simplified to match the newly simplified funding logic.

@FlacoJones FlacoJones merged commit a2647a9 into audit Feb 28, 2023
@FlacoJones FlacoJones deleted the fix-review-simplified-refund-logic branch August 10, 2023 02:30
@FlacoJones FlacoJones restored the fix-review-simplified-refund-logic branch August 10, 2023 02:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants