逆向工程说明: 本文档基于 nof1.ai Alpha Arena 的公开文档、交易行为模式、API 响应格式和社区讨论,系统性地逆向推导出其 System Prompt 和 User Prompt 的完整结构,欢迎各路大佬戳戳评论,一起来进行这个有趣的实验。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let pancakeSwapAbi = [ | |
| {"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address[]","name":"path","type":"address[]"}],"name":"getAmountsOut","outputs":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"stateMutability":"view","type":"function"}, | |
| ]; | |
| let tokenAbi = [ | |
| {"inputs":[],"name":"decimals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}, | |
| ]; | |
| const Web3 = require('web3'); | |
| /* | |
| Required Node.js |
Paul Miller's explanation of endomorphism:
secp256k1 is Koblitz curve (e.g. Short Weierstrass curve with a=0).
Koblitz curves allow using efficiently-computable GLV endomorphism ψ:
- GLV endomorphism ψ transforms a point:
P = (x, y) ↦ ψ(P) = (β·x mod p, y) - GLV scalar decomposition transforms a scalar:
k ≡ k₁ + k₂·λ (mod n)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from ctypes import * | |
| # implemented from: | |
| # http://referencesource.microsoft.com/#mscorlib/system/random.cs,dec894a7e816e665 | |
| class Random(object): | |
| def __init__(self, seed): | |
| self.seed = c_int(seed).value | |
| self.MBIG = 2147483647 | |
| self.MMIN = -2147483648 | |
| self.MZ = 0 | |
| self.MSEED = 161803398 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Perlin noise implementation.""" | |
| # Licensed under ISC | |
| from itertools import product | |
| import math | |
| import random | |
| def smoothstep(t): | |
| """Smooth curve with a zero derivative at 0 and 1, making it useful for | |
| interpolating. |