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

Linear accrual #2009

Closed
annamehr opened this issue Mar 12, 2024 · 1 comment
Closed

Linear accrual #2009

annamehr opened this issue Mar 12, 2024 · 1 comment

Comments

@annamehr
Copy link
Collaborator

NAV management prefillment from data gathered from the runtime API

Spec linear accrueing in NAV dashboard

Already briefed Tim on prefill of asset prices.

UI can get prices when calling runtime API LoansAPI:Portfolio
Presentvalue needs to be taken and prefilled in the price fields

api.call.loansApi.portfolio(PoolId) -> Vec<(LoanId, LoanInfo)>

struct LoanInfo {
/// Related active loan
	pub active_loan: ActiveLoan<T>,

	/// Present value of the loan
	pub present_value: T::Balance,

	/// Current outstanding principal of this loan
	pub outstanding_principal: T::Balance,

	/// Current outstanding interest of this loan
	pub outstanding_interest: T::Balance,

	/// Current price for external loans
	/// - If oracle set, then the price is the one coming from the oracle,
	/// - If not set, then the price is a linear accrual using the latest
	///   settlement price.
	/// See [`ExternalActivePricing::current_price()`]
	pub current_price: Option<T::Balance>,
}
}
@annamehr annamehr changed the title Linear accruel Linear accrual Mar 12, 2024
@annamehr
Copy link
Collaborator Author

Duplicate. #2044

@annamehr annamehr closed this as not planned Won't fix, can't repro, duplicate, stale Mar 25, 2024
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

1 participant