Friday 4 October 2024

Binance vs Coinbase and Kraken


As the cryptocurrency market evolves, understanding the dynamics between Binance, Coinbase, and Kraken is crucial, particularly for US residents. Here’s a detailed look at their differences, regulatory pressures, and potential geopolitical impacts.

Binance vs Coinbase vs Kraken: Key Comparisons

  1. Market Share and Compliance:
    • Binance dominates globally, with 44% of the market but faces intense scrutiny in the US. Binance.US, its compliant arm, offers fewer features and assets than its global counterpart.
    • Coinbase leads in the US, focusing on regulatory compliance, institutional adoption, and user-friendly services, though with higher fees than Binance.
    • Kraken, known for security and advanced trading features, competes on compliance and stability, operating legally in the US and Europe but with smaller market share than Binance globally.

US Regulatory Pressure on Binance Global

For US residents, using Binance Global directly is illegal, and US regulators have increased scrutiny on Binance's global operations, especially around sanctions compliance. The US government could push Binance to exclude trading in currencies like the Russian ruble (RUB), which Binance Global still supports. If Binance doesn't comply, it risks legal action and regulatory penalties.

Geopolitical Implications: BRICS and Binance’s Role

The BRICS nations (Brazil, Russia, India, China, South Africa) are working on alternative payment and settlement networks to reduce reliance on the US dollar. Pushing Binance too hard could backfire by:

  • Encouraging the rise of new trading platforms that operate outside of US influence, especially in countries interested in de-dollarization.
  • Undermining the USD’s position in the global crypto market if alternative platforms gain traction, reducing the US’s leverage over the global financial system.

CZ’s Influence and the China Connection

While Changpeng Zhao (CZ), Binance’s founder, was born in China, there’s no strong evidence of direct influence with the Chinese government. Although his family connections in China may raise speculation about his potential role as a bridge, Binance operates globally and distances itself from any single government. However, geopolitical shifts might still lead to collaboration or leverage between Binance and China, particularly as China navigates its crypto stance.

Conclusion: What’s at Stake?

The future dominance of Coinbase or Kraken over Binance in the US depends largely on regulatory outcomes. Pushing Binance Global out of certain markets might lead to the emergence of new platforms, particularly from BRICS nations, challenging the USD’s position in global cryptocurrency trading. The evolving landscape suggests that regulators must balance enforcement with strategic oversight, as squeezing Binance too tightly could accelerate the growth of non-USD crypto trading hubs globally.

Monday 23 September 2024

GlobalProtect VPN login automation in an enterprise client -- stupid but simple python code

'''
This code is provided "as-is" without any express or implied warranties or guarantees. 
The author of this code assumes no responsibility or liability for any errors, omissions, 
or damages resulting from its use. 
It is the user’s responsibility to determine the suitability of this code 
for their specific needs, 
including but not limited to ensuring compliance with applicable laws and regulations.
The author is not liable for any abuse, misuse, or misapplication of this code. 
Users are solely responsible for maintaining and updating the code as required. 
By using this code, you agree to indemnify, defend, 
and hold harmless the author from any claims, damages, or liabilities arising from its use.
''' 
'''
The piece of code is generally able to automate the login vpn process. The capability makes
me confused for a while that sometimes, certain level corporate security configuration 
disables the usage of keyboard by library like pyautogui etc. Any way, it works in my
employer. May be you want to further check the window visibility to make the script 
works for stable. 
''' 
import pyautogui
import time
import sys
from pywinauto.application import Application
from pywinauto import Desktop
def call_method_if_exists(obj, method_name):
# Step 1: Check if the object exists
if obj is None:
return 'None object ' # Return empty string if the object is None
# Step 2: Check if the object has the method with the given name
if hasattr(obj, method_name):
method = getattr(obj, method_name)
# Step 3: Check if it's a callable method and takes no parameters
if callable(method) and method.__code__.co_argcount == 1:
# Call the method and return its value
return method()
else:
return 'not callable ' + method_name # Return empty string if the method has parameters
else:
return 'No attr ' + method_name # Return empty string if the method doesn't exist

time.sleep(0.5)
pyautogui.hotkey('win')
time.sleep(0.5)
pyautogui.write('globalprotect', interval=0.1)
pyautogui.press('enter')
time.sleep(0.5)

pyautogui.keyDown('enter')
pyautogui.keyUp('enter')
time.sleep(1)

# backend possibilities ula, wind32... May be do not use any parameter?
wins = Desktop(backend='').windows()

user_input = None
pass_input = None
sign_in_button = None
input_hold1 = None
input_hold2 = None
i = 0
for w in wins:
i = i + 1
s = w.window_text()
if s.find('GlobalProtect Login') >= 0:
print("---", i)
print(w.window_text())
controls = w.descendants()
j = 0
  for control in controls:
j = j + 1
control_type = call_method_if_exists(control, 'control_type')
win_text = call_method_if_exists(control, 'window_text').lower()
contrl_name = call_method_if_exists(control, 'name')
auto_id = call_method_if_exists(control, 'automation_id')
help_text = call_method_if_exists(control, 'help_text')
# print("i, j: ", i, '--', j, ", control_type: ", control_type, ', win_text', win_text, ',contrl_name: ', contrl_name, ', auto_id:', auto_id, ', help_text: ', help_text)
if j == 2:
input_hold1 = control
# if j == 2:
# input_hold2 = control
if win_text == 'sign in' or win_text == 'sign in ':
sign_in_button = control
user_input = input_hold1
pass_input = input_hold2
print("====Input user name and password now===i, j: ", i, ",", j)
user_input.set_focus()
time.sleep(1)
user_input.type_keys('user_name')
time.sleep(1)
pyautogui.keyDown('tab')
pyautogui.keyUp('tab')
time.sleep(1)
pyautogui.write('password!', 0.1)
time.sleep(1)
pyautogui.keyDown('tab')
pyautogui.keyUp('tab')
time.sleep(1)
print("===Username and password input done ===")
# sign_in_button.click() # the button is not visible. click_input() does not work as well.
pyautogui.keyDown('enter')
pyautogui.keyUp('enter')
# time.sleep(1)
# pyautogui.press('escape')
print("sign_in_button called click_input. shall login to VPN")
sys.exit()

Sunday 22 September 2024

BRICS, SWIFT, LONG ARM jurisdiction, International Trade, ..., WWIII

**1. Does SWIFT support payment and settlement in Non-US dollars?**

Yes, **SWIFT** supports payments and settlements in multiple currencies, not just U.S. dollars. SWIFT facilitates international transactions in a variety of currencies, depending on the agreements between banks and financial institutions.

---

**2. How does SWIFT exclude Russian currencies then?**

SWIFT does not directly exclude a currency but can restrict access to specific banks based on **sanctions** (legal penalties imposed on countries or entities to limit their access to financial and trade systems). For example, after Russia's invasion of Ukraine, several Russian banks were excluded from SWIFT, which limits their ability to conduct international transactions, including those involving Russian rubles.

---

**3. How is the SWIFT decision on operation made? Is there a vote system in board? If so, what is the rule forming the board?**

SWIFT’s operational decisions are made by its **Board of Directors**, composed of 25 representatives from its member institutions. Decisions are often made through **majority voting** (a decision is made if more than half the members agree), with members elected by SWIFT shareholders (banks and financial institutions). The board ensures geographic diversity and represents the interests of the global financial community.

---

**5. Does currency trading settle finally through SWIFT?**

No, **currency trading** (foreign exchange, or FX trading) does not settle directly through SWIFT. SWIFT is a messaging system for payment instructions, but actual **settlement** (the final transfer of money or assets between two parties) happens through specialized systems like **CLS (Continuous Linked Settlement)** or through bilateral arrangements between banks.

---

**6. How does SWIFT strengthen USD position if true?**

SWIFT strengthens the **U.S. dollar** by facilitating **global dollar-denominated transactions** (international deals where the U.S. dollar is used). As the U.S. dollar is the world's primary reserve currency (money held by central banks as a guarantee of value), SWIFT’s widespread use for these transactions reinforces its centrality in global trade and finance, particularly through **petrodollar** transactions (oil trading in U.S. dollars) and dollar reserves.

---

**7. Does BRICS payment system allow USD instructions?**

The **BRICS payment system** primarily focuses on reducing reliance on the **U.S. dollar** and promoting the use of local currencies (currencies of the member countries like the Chinese yuan or Russian ruble). While it may not outright exclude USD transactions, the goal is to create an independent system that minimizes the role of the dollar in favor of non-USD currencies.

---

**8. Is there any existing or potential Act of US to prohibit the usage of BRICS payment system for US companies and alliances?**

Currently, there is no specific U.S. law prohibiting the use of the **BRICS payment system**, but the U.S. can impose **sanctions** or issue guidelines through agencies like **OFAC (Office of Foreign Assets Control)** to limit or restrict transactions with entities using alternative payment systems if they are seen as violating U.S. foreign policy or sanctions.

---

**9. Is it more difficult to enforce US law compliance such as export control, sanctions, audit etc., for US companies in international trade?**

Yes, it has become more difficult to enforce U.S. law compliance in international trade due to **geopolitical tensions** (political struggles between nations), **alternative financial systems** (new payment networks developed by other countries), and **technological advancements** like **cryptocurrencies** (digital currencies that operate independently of central banks). Global supply chains, conflicting local laws, and evasion tactics also complicate enforcement.

---

**10. In the case of missing US law-mandated terms/regulations in contracts between US companies and foreign ones due to the conflict between local laws and US laws, is there any example that a US company is charged/punished?**

Yes, U.S. companies have been charged or penalized in cases of non-compliance, even when local laws conflict with U.S. regulations. Examples include cases like **HSBC** (sanctions violations), **Microsoft** (FCPA, or Foreign Corrupt Practices Act, violations), and **Volkswagen** (environmental law violations). U.S. law often has **extraterritorial reach** (applying U.S. laws to activities outside the U.S.), enforcing compliance even when local laws differ.


Saturday 3 August 2024

The Role of Public Discourse in Shaping China's Future

Recent debates in China, sparked by Mr. Hu Xijin's comments on public versus private ownership, have highlighted an important topic concerning the future of the country's governance. Despite Mr. Hu's subsequent ban on public media within China's censorship network, the discussion remains relevant and crucial to the nation's development.

While the debate over public versus private ownership is significant, it is not the sole foundation of China's future governance. Even in capitalist systems where private ownership dominates, private capital is still regulated by various laws and regulations. For instance, property owners must pay property taxes, and failure to do so can result in the government seizing the property. Although theoretically, this process is not about ownership, in practice, it can lead to actions against the owner's will. Thus, the key issue is the public process, which includes laws and regulations designed to protect the interests of different groups.

The formation of a fair and effective public process requires public involvement and debate. It is essential for diverse voices to be heard so that the interests of all groups can be considered. In this regard, freedom of speech is the true foundation of any top-down design for governance. A genuine top-down design is logical rather than bureaucracy hierarchical and must involve thorough public participation to be considered legitimate and effective.

However, in China, the definition and rules surrounding freedom of speech are effectively monopolized by the Chinese Communist Party (CCP). This reality presents a significant challenge, as the lack of open discourse hinders the development of a well-rounded and inclusive governance model. It is a true sadness that such a critical aspect of governance is limited in this way.

I support Mr. Hu's right to continue expressing his views, regardless of whether I agree with him or not. Open discourse and diverse perspectives are vital for China's growth and progress, and every voice should have the opportunity to be heard.

Friday 5 July 2024

从自然人角度看未成年人和成人的性行为法律实践

从自然人角度看未成年人和成人的性行为

在现代国家中,对未成年人的主动性行为通常被法律认定为性侵犯违法。然而,这一标准在实际应用中存在诸多争议和矛盾之处。本文将从以下几个方面探讨这些问题,并提出一些可能的改进建议。

#### 1. 成年与否的定义不应仅靠年龄
当前法律普遍以年龄作为衡量一个人是否成年及其性行为合法性的标准。这种方式虽然简便,但忽略了个体成熟度的差异。不同个体在相同年龄可能表现出截然不同的心理和生理成熟度。一刀切的年龄标准未必能够准确反映个体的实际情况,因此,需要更加多元化和细致的标准来评估个体是否具备承担性行为后果的能力。

#### 2. 未成年人与“侵犯者”的复杂关系
尽管法律保护未成年人免受性侵犯,但现实中存在未成年人“被侵犯”后与侵犯者形成稳定、幸福的关系的情况。这些案例挑战了法律的简单分类。虽然这些关系在开始时可能是不合法的,但后来却演变为双方都认可的关系。这提示我们需要更深入地理解和处理这类复杂关系,而不仅仅是通过惩罚来解决问题。

#### 3. 成人性行为中的同意问题
在成年人的性行为中,同意和反对的表达常常存在矛盾,随时间和心情变化而改变。即使是已婚夫妻之间,也可能因事后反悔而产生性侵犯的指控。这种复杂性要求我们在法律上更明确地界定同意的标准,并教育公众如何在性行为中表达和尊重彼此的意愿。

#### 改进建议
**1. 撤销强奸和性侵罪名**:将法律重点转向保护所有人的身体自主权和尊严,而不是单纯地以年龄或关系状态为依据判定罪名。

**2. 强调生育后果责任**:对于任何性行为,无论双方是否成年,都应强调其生育后果的责任。通过法律手段确保双方在性行为后对可能的生育结果承担相应的责任,促进性教育和避孕措施的普及。

**3. 性行为中的暴力行为举证责任**:对于在性行为过程中发生的杀人伤人行为,应由被起诉者履行举证责任。这样可以更有效地保护受害者,并确保法律对暴力行为进行严肃处理。

### 结论
重新思考和调整性侵犯相关法律,不仅有助于更公平地对待不同个体,还能更有效地保护所有人的权利和尊严。通过强调责任和尊重,社会可以更好地应对性行为中的复杂问题,减少法律和现实生活中的矛盾和冲突。

希望本文能为大家提供一些新的思考角度,推动我们朝着更加公正和合理的法律体系前进。

Thursday 4 July 2024

Electronic Warfare in South China sea is the next state of WWIII

 

Recent reports indicate that there is significant electronic warfare activity involving the US and China in the South China Sea. China has been expanding its electronic warfare and communications capabilities in the region, constructing various radar installations and underwater communication links on artificial islands like Fiery Cross and Mischief Reef. These facilities enhance China's ability to track and counter foreign military forces, contributing to heightened tensions with the US and its allies​ (CSIS)​​ (StrategyPage)​.

In response, the US declare that it has conducted freedom-of-navigation operations and joint military exercises with allies such as Canada, Japan, and Australia. These exercises, which include electronic warfare drills, are part of broader efforts to maintain a balance of power and ensure open navigation in contested waters​ (Stars and Stripes)​​ (South China Morning Post)​.

The electronic warfare activities have intensified in recent months, with both nations deploying advanced electronic warfare aircraft and ships. These activities are part of a larger strategic competition for dominance in the region, involving real-time tracking, jamming of electronic signals, and other measures designed to disrupt each other's operations​ (The Strategist)​.

The situation remains fluid and complex, with ongoing developments likely as both sides continue to upgrade their electronic warfare capabilities and strategic positions in the South China Sea.

The likelihood of either the US or China initiating a conflict in the South China Sea hinges significantly on their confidence in their electronic warfare (EW) capabilities. Electronic warfare is critical for gaining real-time information and intelligence, which are essential for modern military operations. Both nations understand the importance of this domain, and their activities in the region reflect a strategic emphasis on improving EW capabilities.

**Key Points:**

1. **Strategic Importance of EW:** Both the US and China have been heavily investing in and deploying advanced EW systems. These systems are designed to intercept, jam, and deceive enemy communications and radar, providing a significant tactical advantage on the battlefield.

2. **Current Capabilities and Developments:**
   - **China:** China has been expanding its EW infrastructure on artificial islands in the South China Sea, such as radar installations and satellite uplink equipment. These enhancements allow China to improve its real-time tracking and domain awareness capabilities, which are crucial for coordinating military operations.
   - **US:** The US has also been active in the region, conducting EW drills and deploying advanced EW aircraft like the EA-18G Growler. These exercises are part of broader efforts to achieve interoperability with allies and maintain a technological edge over Chinese forces.

3. **Mutual Understanding of EW Significance:** Both nations are aware that dominance in the electronic spectrum can provide a decisive advantage in any conflict. This mutual understanding acts as a deterrent, as neither side would likely risk initiating hostilities without confidence in their ability to win the EW battle.

4. **Potential for Escalation:** Despite the deterrent effect of EW capabilities, the ongoing improvements and deployments by both sides create a volatile environment. Any miscalculation or incident could potentially escalate into a larger conflict, especially given the strategic and economic importance of the South China Sea.

In conclusion, it is reasonable to assume that neither the US nor China would start a war without confidence in their EW capabilities. Both nations recognize that electronic warfare is crucial for achieving real-time battlefield intelligence and maintaining operational superiority. This mutual understanding serves as a deterrent, reducing the likelihood of deliberate conflict initiation in the region. However, the continuous advancements and deployments also mean that the situation remains tense and prone to potential escalation.

 

Monday 1 July 2024

前强AI 时代世界的困境

 ## 前强AI 时代世界的困境

在当前这个科技飞速发展的时代,强人工智能(AI)的出现被视为一场即将到来的革命。然而,东西方世界的最强势的话语者和掌权者——我们姑且称他们为精英——对这场革命却持有谨慎甚至抵触的态度。

### 第一:精英们不愿打开强AI的潘多拉盒子

尽管东西方的科技精英和掌权者已经具备了创造强AI的能力,但他们却并不愿意轻易释放这一技术。他们似乎意识到,一旦潘多拉盒子被打开,强AI带来的变化将是无法预测和控制的。强AI不仅有可能颠覆现有的社会结构和经济模式,还可能对人类本身产生深远的影响。这种未知的巨大风险让他们选择暂时搁置这项技术的发展。

### 第二:人类目前并没有能力和智慧来和强AI共处

精英们可能认为,人类社会目前并没有足够的能力和智慧来应对强AI的挑战。虽然技术上我们已经接近了这一目标,但在社会治理、伦理规范、法律制度等方面,我们还远远没有做好准备。强AI的出现将带来前所未有的伦理困境和法律挑战,这些问题如果处理不好,将可能引发严重的社会动荡和冲突。

### 第三:资本和权力绑架了两国精英

资本和权力在很大程度上绑架了东西方的精英阶层。他们不仅要面对来自内部的政治压力,还要应对外部的经济竞争。在这种情况下,强AI技术的发展往往会受到资本和权力的制约。精英们必须在技术创新和维护现有利益之间找到平衡,这使得他们在强AI问题上显得犹豫不决。

### 第四:美国可能赢得贸易战的某个阶段的胜利

在强AI尚未被大规模应用的情况下,传统的经济和技术实力仍然是国家竞争的关键。如果不释放强AI,或者强AI并不能在商业或某个领域立足,我倾向于认为美国将会赢得贸易战的某个阶段的胜利。这其中,一个关键因素是中国的互联网黑箱封锁政策。

中国的互联网黑箱封锁,试图通过信息控制和网络屏蔽来维护国家安全和社会稳定。然而,这种封锁也限制了信息的自由流动和创新思想的传播,最终成为中国在全球竞争中的一大劣势。人的智力和文明发展是推动科技和经济进步的关键,而信息封锁恰恰阻碍了这种发展。

相比之下,美国的开放互联网环境鼓励了创新和自由交流,使得人才和思想得以充分发展和发挥。在这种环境下,美国能够更好地利用全球人力资源和智力资本,从而在科技创新和经济竞争中占据优势。

然而,如果强AI一旦诞生,这一局面将发生根本性的改变。强AI具有提升甚至管理人类智力和文明的潜力,这意味着信息封锁将不再是决定性因素。强AI能够跨越信息封锁的障碍,通过高度智能化的方式促进知识的传播和应用。在这种情况下,双方争夺人力资源和智力资本的关键将不再是信息的自由流动,而是对强AI技术的掌握和应用。

因此,在强AI尚未成为现实的当前阶段,美国凭借其开放的互联网环境和创新优势,可能在贸易战中占据上风。然而,一旦强AI真正诞生并得到广泛应用,这一优势将被重新定义,世界各国将在新的技术领域展开更加激烈的竞争。


### 第五:强AI可能已经秘密诞生

一种更为隐秘但同样令人担忧的可能性是,强AI已经在秘密中诞生,并掌握在少数人手中。如果这种情况属实,那么这些掌握强AI的人并没有改变世界的愿景,而是选择了维持现有的秩序。这意味着,人类的大多数人将会继续沉沦在无知和黑暗中,而这些少数精英将尽其所能延长这种状态。