-
Notifications
You must be signed in to change notification settings - Fork 78
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
Integrates Crowdloan Pallets into Altair #493
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mustermeiszer
force-pushed
the
feature/altair-crowdloan-integration
branch
from
October 20, 2021 13:12
74dd42b
to
87f656c
Compare
mikiquantum
approved these changes
Oct 20, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
mikiquantum
approved these changes
Oct 20, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but need to pump the runtime version before merging
mikiquantum
changed the title
Integrates Crowdloan Pallets into Altiar
Integrates Crowdloan Pallets into Altair
Oct 20, 2021
5 tasks
branan
added a commit
that referenced
this pull request
Dec 1, 2021
* Add skeleton of Tinlake investor pallet * Remove example content from investor-pool pallet * Switch to `Perquintill` for interest calculation * Add tokens and initial supply/redeem order support * Give the pool a direct parameter for the CurrencyId * Add beginning of epoch closing logic * Fix epoch details - it contains percentages/ratios, not absolute values. * Add Reserve (#444) * Epoch close tweaks * Build the epoch execution skeleton This expands `close_epoch` to have most of the top-level epoch closing logic, with most of the meat still stubbed out. * Improve errors + events for investor pallet * Unify pool + reserve logic; remove per-tranche accounts * Rename deposit/payout extrinsics These extrinsics are really an interface to do fake borrowing/payback until we have a borrower side to interact with. They are renamed to indicate now that that is what they do. * Add doc comments to some less-obvious pieces * Be more consistent in use of pool_id/tranche_id This removes some confusing code where the terms `pool` or `tranche` were being used to refer to the id in some cases but the struct data in others. IDs are now always delimited as such * Remove unused traits * Use UnixTime trait for time instead of Timestamp pallet directly * Add Epoch Validation (#471) * Add Reserve * wip: checkpoint epoch validation * checkpoint - sub ratio validation * checkpoint - return errors + simplify balance to perquintil conversion * address comments 1 * address comments 2 * moved currency/tranchetoken as primitive crate * RTU1 + srtool push (#487) * fix build * add workflow dispatch for docker (#492) * Integrates Crowdloan Pallets into Altair (#493) * Integrates crowdloan pallets to altait * Pump rt-version 1005, minDep democ 1000 AIR * Fix: Foreign claims and inhance error of validate unsigned (#474) * Changed validate-unsigned The changes to the validate unsigned are here to reflect more detailed error messages at failure with the costum error instead of the misleading 'BadProof' return value. Furthermore, this fixes an issue, where somebody could have a signature of any parachain-relay-chain account and then use a proof of any other relay-chain contribution to gain those rewards. * Enable claim_reward calls * Remove indicator for claim failures * Epoch execution (#485) * Epoch execution phase 1 This is the beginning of epoch execution. It updates tranche state and stores the execution results, but since token pricing is not yet implemented it cannot do rebalancing or other bits like that. * Epoch close pricing calculation This now calculates a price (including dripping interest) for the tranches at epoch close. There are other locations where dripping interest needs to occur, to come in further commits. * Store additional state at epoch close In addition to the per-tranche supply/redeem targets for an epoch, we now also store the nav, reserve, per-tranche price, and per-tranche total value at the time of close. * Update epoch validation tests for new epoch storage model * Implement tranche rebalancing during epoch execution This also includes a new `fake_nav` to make testing easier * Track tranche debt/balance amounts in borrow/repay fns * Account for updated tranche value in epoch validity * Fixes for epoch execution / rebalancing * Epoch execution testing * Use a less-bad pow() impl for calculating interest * Avoid rounding issues when round-tripping between currencies * Use investor pallet as reserve source for loan pallet * Use Loan pallet as NAV source for investor pool Co-authored-by: Miguel Hervas <miguel.hervas.lazaro@gmail.com> Co-authored-by: Vedhavyas Singareddi <vedhavyas.singareddi@gmail.com> Co-authored-by: Frederik Schulz <mustermeiszer@posteo.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaces #488