Rotki 加密追踪
Rotki 加密追踪:实现自托管式加密货币投资组合追踪,自动聚合多交易所和链上钱包资产,实时计算持仓损益并生成税务报告。 含 13 条反模式约束。
晶体简介
Constraints
Evidence Quality
Medium confidence — review before critical use
59 条不可违反的约束
WHENWhen implementing API endpoint responses
ACTIONWrap each responses in {'result': ..., 'message': ...} structure
CONSEQUENCEFrontend clients expect the standard wrapper format. Missing 'result' or 'message' keys causes client-side parsing errors and unhandled exceptions in consuming applications.
WHENWhen implementing async API endpoints
ACTIONDecorate endpoints with @async_api_call() and return {'result': ..., 'message': ...} dict
CONSEQUENCEWithout the decorator, async tasks cannot be tracked via query_tasks_outcome(). Clients receive incomplete responses and have no way to poll for completion status.
WHENWhen handling user login operations
ACTIONProtect login operations with @login_lock() decorator to prevent race conditions
CONSEQUENCEConcurrent login attempts without the lock cause race conditions in user unlock logic. Multiple greenlets may simultaneously modify user session state, leading to authentication bypass or data corruption.
常见问题
讨论 (0)
暂无讨论,成为第一个发言的人吧!
更新历史
v0.1.0: 首次发布到 Doramagic.ai。基于 tangweigang-jpg/doramagic-skills 的自动化 batch-v1 元数据 + 自动生成 FAQ。