0g-chain/x/hard/spec/06_begin_block.md
Kevin Davis c5fc1c6b4f
Add hard and incentive spec updates (#817)
* wip: update hard spec

* feat: updated hard spec

* feat: updated incentive spec
2021-02-19 17:14:48 +01:00

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)
}
```