mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-14 07:26:51 +00:00
comments
This commit is contained in:
@@ -16,6 +16,7 @@ use solana_program::{
|
||||
|
||||
// TODO Admin fn for min difficulty?
|
||||
// TODO Admin fn for spam/liveness tolerances?
|
||||
// TODO Alternative to bincode?
|
||||
// TODO Is downgrade necessary?
|
||||
|
||||
declare_id!("mineRHF5r6S7HyD9SppBfVMXMavDkJsxwGesEvxZr2A");
|
||||
|
||||
@@ -94,7 +94,7 @@ pub fn process_mine<'a, 'info>(
|
||||
.saturating_mul(2u64.saturating_pow(difficulty));
|
||||
sol_log(&format!("Base {}", reward));
|
||||
|
||||
// Apply staking multiplier, only if last deposit was at least 1 block ago to prevent flash loan attacks
|
||||
// Apply staking multiplier, only if last deposit was at least 1 block ago to prevent flash loan attacks.
|
||||
if clock.slot.gt(&proof.last_deposit_slot) {
|
||||
// TODO Move staking requirement into config? Admin adjustable?
|
||||
let max_stake = reward.saturating_mul(TWO_YEARS);
|
||||
|
||||
@@ -15,12 +15,10 @@ pub struct Bus {
|
||||
/// The ID of the bus account.
|
||||
pub id: u64,
|
||||
|
||||
// TODO Update logic to count up rather than down
|
||||
/// The quantity of rewards this bus can issue in the current epoch epoch.
|
||||
/// The quantity of rewards this bus has left to issue in the current epoch epoch.
|
||||
pub rewards: u64,
|
||||
|
||||
// TODO Come up with better name
|
||||
/// The rewards that would have been paid out this epoch if the bus had no limit.
|
||||
/// The rewards that would have been paid out by this bus in the current epoch if the bus had no limit.
|
||||
pub theoretical_rewards: u64,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user