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

feature/plmc-486-change-is_funded-to-use-usd-amounts-of-evaluations-instead #216

Conversation

JuaniRios
Copy link
Contributor

@JuaniRios JuaniRios commented Mar 26, 2024

What?

use the usd amount bonded at the time of evaluating for calculating if a project reached the threshold for passing to the funding round

Why?

Using the plmc price at the time of ending the evaluation opens us up for an exploit on the exchanges

How?

use the field in ProjectDetails evaluation_round_info.total_bonded_usd

Testing?

pallet test plmc_price_change_doesnt_affect_evaluation_end

Anything else?

Changed the const price provider to use a thread_local! key for the price map so we can change the price.

@JuaniRios JuaniRios self-assigned this Mar 26, 2024
@JuaniRios JuaniRios requested a review from lrazovic March 26, 2024 12:16
…-amounts-of-evaluations-instead

# Conflicts:
#	integration-tests/src/tests/credentials.rs
#	pallets/funding/src/functions.rs
#	pallets/funding/src/instantiator.rs
#	pallets/funding/src/lib.rs
#	pallets/funding/src/tests.rs
@JuaniRios JuaniRios merged commit 81850c6 into main Mar 26, 2024
@JuaniRios JuaniRios deleted the feature/plmc-486-change-is_funded-to-use-usd-amounts-of-evaluations-instead branch March 26, 2024 13:19
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.

None yet

2 participants