Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Fix host collateral error when renewing contracts #3160

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

Conversation

ChrisSchinnerl
Copy link
Contributor

I'm not 100% sure if this math makes sense but I'm pretty confident.
The comments were a bit misleading since it sounded like basePrice and baseCollateral are already covered by the last contract while they are actually the minimum amount of money that has to be put in the contract to cover the existing data on the host.

In my opinion the hostCollateral should also be the possible max collateral + the baseCollateral. That way we don't end up with a potential underflow later. It's also a bit more correct since baseCollateral is not a subset of the hostCollateral but rather the hostCollateral is the sum of the baseCollateral (collateral for existing data) plus the maxCollateral (the maximum additional collateral that will be put into the contract by the host if the renter spends all of the renterPayout for storage).

@ChrisSchinnerl ChrisSchinnerl force-pushed the fix-collateral branch 2 times, most recently from c02d623 to 7caee39 Compare July 12, 2018 15:25
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.

None yet

1 participant