Skip to content

Review the operations with hatching price #18

@EnchanterIO

Description

@EnchanterIO

It seems like the operations with attribute p0 are not congruent/correct.

From the first short review: sometimes to calculate the unlocked tokens the contract multiplies with p0 and sometimes divides.

Example:

fundsAllocated() {
    unlockedInternal += _externalAllocated / p0;
claimTokens() {
    uint256 previouslyUnlockedInternal = (paidExternal / p0)
hatchContribute() {
    initialContributions[msg.sender].lockedInternal += contributed * p0;

I think it works only by accident given the p0 is 1 by default. Would be great to review the math here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions