Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pallets/subtensor/src/coinbase/run_coinbase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,16 @@ impl<T: Config> Pallet<T> {
log::debug!(
"incentives: hotkey: {hotkey:?} is SN owner hotkey or associated hotkey, skipping {incentive:?}"
);

// Record the miner burn as a TAO outflow. The incentive is
// denominated in alpha, so convert to its TAO equivalent at
// the current spot price (no slippage, since no swap occurs).
let current_price: U96F32 = T::SwapInterface::current_alpha_price(netuid.into());
let tao_equivalent: TaoBalance = current_price
.saturating_mul(asfloat!(incentive))
.saturating_to_num::<u64>()
.min(i64::MAX as u64)
.into();
Comment thread
JohnReedV marked this conversation as resolved.
// Check if we should recycle or burn the incentive
match RecycleOrBurn::<T>::try_get(netuid) {
Ok(RecycleOrBurnEnum::Recycle) => {
Expand Down
Loading