mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 16:25:21 +00:00
c5fc1c6b4f
* wip: update hard spec * feat: updated hard spec * feat: updated incentive spec
16 lines
321 B
Markdown
16 lines
321 B
Markdown
<!--
|
|
order: 6
|
|
-->
|
|
|
|
# Begin Block
|
|
|
|
At the start of each block, interest is accumulated, and automated liquidations are attempted
|
|
|
|
```go
|
|
// BeginBlocker updates interest rates and attempts liquidations
|
|
func BeginBlocker(ctx sdk.Context, k Keeper) {
|
|
k.ApplyInterestRateUpdates(ctx)
|
|
k.AttemptIndexLiquidations(ctx)
|
|
}
|
|
```
|