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

Research task: create termPenaltyOnPledge method #83

Open
Schwartz10 opened this issue Jul 8, 2024 · 1 comment
Open

Research task: create termPenaltyOnPledge method #83

Schwartz10 opened this issue Jul 8, 2024 · 1 comment

Comments

@Schwartz10
Copy link
Contributor

Schwartz10 commented Jul 8, 2024

It's important to understand what new hypothetical termination penalties you will incur as a miner if you pledge new FIL.

The method interface:

termPenaltyOnPledge(filToPledge *big.Int, sectorSize uint64, percQAP *big.Float) => (cost *big.Int, penalty *big.Int, error)

cost - the cost to pledge the given sector (hypothetically)
penalty - the hypothetical term penalty on the sector

For the variables we need to supply to the TerminateSector call:

	height uint64 => current block height
	sectorSize uint64 => get from the miner ID
	qaPowerSmoothedPositionEstimate *corebig.Int => network params
	qaPowerSmoothedVelocityEstimate *corebig.Int => network params
	rewardSmoothedPositionEstimate *corebig.Int => network params
	rewardSmoothedVelocityEstimate *corebig.Int => network params
	activation uint64 => current block height
	expiration uint64 => hardcode to 18 months
	dealWeight *corebig.Int => hardcode to 0 for now
	verifiedDealWeight *corebig.Int => percQAP passed as a parameter
	expectedDayReward *corebig.Int => network parameter based on sector power
	expectedStoragePledge *corebig.Int => network parameter
	powerBaseEpoch uint64 => ???
	replacedDayReward *corebig.Int => IGNORE FOR NOW

NOTE that this does not have to do with any existing economics pledged in sectors for any particular single miner. It's helpful to understand how 1 FIL will devalue upon pledging

@Schwartz10 Schwartz10 changed the title Research task: create lossOnPledge method Research task: create termPenaltyOnPledge method Jul 8, 2024
@jimpick
Copy link
Collaborator

jimpick commented Jul 18, 2024

PR #84 has a possible implementation for this.

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

No branches or pull requests

2 participants